Construct a QtlFineMappingResult DFrame-subclass
collection from per-tuple vectors and a list of FineMappingRow
payloads (one per tuple). The optional ldReference slot records the
LD reference used for RSS-derived fits; pass NULL (the default) for
individual-level fits.
Usage
QtlFineMappingResult(
studyName,
context,
trait,
method,
entry,
jointStudies = NULL,
jointContexts = NULL,
jointTraits = NULL,
traitPos = NULL,
region = NULL,
dataType = NULL,
dataSource = NULL,
weightStandardized = NULL,
ldReference = NULL
)Arguments
- studyName
Character vector of study identifiers (per tuple). Use the sentinel
"joint"for rows produced by a cross-study joint fit.- context
Character vector of context labels (per tuple). Use
"joint"for rows produced by a cross-context joint fit.- trait
Character vector of trait identifiers (per tuple). Use
"joint"for rows produced by a cross-trait joint fit.- method
Character vector of fine-mapping method names (per tuple).
- entry
List /
SimpleListofFineMappingRowobjects.- jointStudies
Optional character vector (length
length(study)) listing the semicolon-joined studies participating in each row's cross-study joint fit, orNA_character_for non-joint rows. WhenNULL(default) the column is omitted.- jointContexts
Optional character vector for cross-context joints. Same shape as
jointStudies.- jointTraits
Optional character vector for cross-trait joints. Same shape as
jointStudies.- traitPos
Optional per-row trait genomic anchor (a
GRangesorNULL), carried forward as provenance; not part of the identity key.NULL(default) omits the column.- region
Optional per-row analysis WINDOW (a
GRangesorNULL) – the interval each row's fit was run over, carried forward as provenance; not part of the identity key.NULL(default) omits the column, andgenomicRegionthen derives the window from the span of the variants present.- dataType
Optional assay / modality label ("bulk_rnaseq", "methylation"), recorded as a per-row provenance column. Length 1 or one per row;
NULL(default) omits the column.- dataSource
Optional per-row label for the kind of input the fit saw,
"individual"or"sumstat". Recorded rather than derived: a combined collection can hold rows of both kinds, and its singleldReferencecannot say which row came from which.- weightStandardized
Optional per-row flag: whether the posterior effect is on the STANDARDIZED genotype scale. The posterior effect IS the prediction weight, so it carries the same scale question as a TWAS weight.
fineMappingPipelinealways passesTRUE: it standardizes genotypes before fitting, and the posterior mean is reported on the scale of theXthe fit was given. The argument exists for a collection assembled by hand, where only the caller knows.- ldReference
An optional genotype panel (see
readGenotypes) (the LD reference for RSS-derived fits), orNULLfor individual-level fits.
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)
QtlFineMappingResult(studyName = "s1", context = "brain", trait = "g1",
method = "susie", entry = list(fe))
#> QtlFineMappingResult: 1 entries
#> 1 studies, 1 contexts, 1 traits, 1 methods
#> LD reference: NULL (individual-level fit)