Create a GwasFineMappingResult Collection
Source:R/GwasFineMappingResult.R
GwasFineMappingResult.RdConstruct a GwasFineMappingResult collection from
per-(study, method) tuples and a list of FineMappingRow
payloads. The collection can represent either a single LD block (one row
per (study, method)) or a genome-wide sweep across blocks (multiple rows
per (study, method), each covering its own genomic range).
Rows are identified by (study, method) plus the element's
own range, which is derived from the variants rather than stored, so it
cannot drift out of step with them and stays correct after
subsetRegion.
Usage
GwasFineMappingResult(
study,
method,
entry,
blockId = NULL,
traitPos = NULL,
ldSketch = NULL
)Arguments
- study
Character vector of study identifiers (per tuple).
- method
Character vector of fine-mapping method names (per tuple).
- entry
List /
SimpleListofFineMappingRowobjects.- blockId
Optional character vector (per tuple) keying the external LD block manifest, e.g.
"chr22_10516173_17414263". Provenance only, not part of the identity key. Supply it when the block BOUNDARIES matter: those are the one thing not recoverable from the variants, since adjacent blocks' spans leave gaps.- traitPos
Optional per-row trait genomic anchor (a
GRangesorNULL), carried forward as provenance; not part of the identity key.NULL(default) omits the column.- ldSketch
An optional genotype panel (see
readGenotypes).
Examples
tl <- data.frame(variant_id = paste0("chr1:", 100 * 1:3, ":A:G"),
pip = c(0.9, 0.5, 0.1), cs = c(1L, 1L, NA))
fe <- fineMappingRow(
variantIds = tl$variant_id, susieFit = list(), topLoci = tl)
GwasFineMappingResult(study = "t1", method = "susie", entry = list(fe))
#> GwasFineMappingResult: 1 entries
#> 1 studies, 1 methods
#> LD sketch: NULL