Assemble a ColocBoostResult from the raw
objects colocboost::colocboost() returns. Callers normally get one
from colocboostPipeline rather than building it directly.
Usage
ColocBoostResult(
results,
analysis,
gwasStudy = NA_character_,
outcomeInfo = NULL,
ldSketch = NULL,
computingTime = list(),
includeUncolocalized = TRUE
)Arguments
- results
A named list of
colocboostobjects, one per analysis (xqtl_coloc,joint_gwas, or one entry per GWAS study forseparate_gwas).NULLentries – a run that failed or was not requested – are skipped.- analysis
Character vector, parallel to
results, naming the analysis each element came from.- gwasStudy
Optional character vector, parallel to
results, naming the GWAS study for the per-studyseparate_gwasruns.- outcomeInfo
Data frame mapping outcome
nametostudy,context,traitanddataForm.- ldSketch
Optional genotype panel (see
readGenotypes).- computingTime
Optional list of per-analysis timings.
- includeUncolocalized
Keep the outcome-specific (uncolocalized) sets as elements flagged
isColocalized = FALSE. DefaultTRUE: dropping them at write time would make "no colocalization here" and "no signal here" indistinguishable downstream.
Examples
# Built from `colocboost` objects, which colocboostPipeline() supplies;
# colocboostResultExample is one such result, from a real run.
data(colocboostResultExample)
colocboostResultExample
#> ColocBoostResult with 1 confidence set(s)
#> colocalized : 1
#> outcome-only: 0
#> analyses : xqtl_coloc
#> variants : 1 across all sets
#> max cos_npc : 0.9938
# Its unit is a SET of colocalized outcomes rather than a pair, so one row
# can carry any number of them.
colocboostResultExample$outcomes
#> CharacterList of length 1
#> [[1]] eQTL_GENESIM1 psiQTL_GENESIM1
getColocPairs(colocboostResultExample)$nOutcomes
#> [1] 2
# A run that failed or was not requested arrives as NULL and is skipped,
# giving an empty result rather than an error.
nrow(ColocBoostResult(list(NULL), "xqtl_coloc"))
#> [1] 0