S4 container for a single QTL study's regional data. Holds
a genotype handle plus per-context SummarizedExperiment objects
carrying molecular-trait measurements. Each context's SE has
rowRanges describing per-trait genomic positions and
colData carrying per-context phenotype covariates. A single
matrix of genotype-derived covariates (e.g., ancestry PCs) applies
across contexts.
Construct a TwasWeights DFrame-subclass collection
from per-tuple vectors and a list of TwasWeightsEntry
payloads (one per tuple).
Usage
TwasWeights(
study,
context,
trait,
method,
entry,
jointStudies = NULL,
jointContexts = NULL,
jointTraits = NULL,
region = NULL,
traitPos = NULL,
ldSketch = NULL
)Arguments
- study
Character vector of study identifiers. Use the sentinel
"joint"for rows produced by a cross-study joint fit.- context
Character vector of context labels. Use
"joint"for rows produced by a cross-context joint fit.- trait
Character vector of trait identifiers. Use
"joint"for rows produced by a cross-trait joint fit.- method
Character vector of TWAS weight method names.
- entry
List /
SimpleListofTwasWeightsEntryobjects.- 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.- region
Optional
GRanges(lengthlength(study)) giving the genomic anchor of each row's trait – the trait's own coordinates when built from aQtlDataset, or the summary-stat variant-span window when built from aQtlSumStats. Carried forward as provenance (e.g. for cTWAS LD-block placement); not part of the identity key.NULL(default) omits the column.- ldSketch
An optional
GenotypeHandle, orNULLfor individual-level fits.
Slots
studyCharacter (length 1). Study identifier; used in collection classes to tag downstream
FineMappingResult/TwasWeightsentries.genotypesA
GenotypeHandlefor lazy access to genotype dosages.phenotypesNamed list of
SummarizedExperimentobjects, one per QTL context. Each SE has rows = molecular traits with positions inrowRanges(se), columns = samples, and per-context covariates incolData(se). Different contexts may carry different subsets of traits (rows); traits shared across contexts must have identicalrowRangesentries (enforced by validity).genotypeCovariatesNumeric matrix (samples x covariates) of genotype-derived covariates applied uniformly across all contexts (e.g., ancestry PCs).
scaleResidualsLogical (length 1). Whether residualization accessors scale residuals to unit variance.
mafCutoffNumeric (length 1). Minor allele frequency threshold; variants with
MAF < mafCutoffare dropped at extraction time insidegetGenotypes()/getResidualizedGenotypes(). Default 0 (no filter).macCutoffNumeric (length 1). Minor allele count threshold; converted to a MAF threshold using
max(mafCutoff, macCutoff / (2 * n))wherenis the post-narrowing sample count of the extracted block. Default 0 (no filter).xvarCutoffNumeric (length 1). Per-variant genotype variance threshold; variants with column variance below this are dropped at extraction time. Default 0 (no filter).
imissCutoffNumeric (length 1). Per-sample genotype-missingness threshold; samples with a missing-genotype rate above this are dropped at extraction time. Default 0 (no filter).
keepSamplesCharacter vector of sample identifiers to retain prior to per-block QC; intersected with the genotype handle's
sampleIdsand thesamplesargument ofgetGenotypes(). Length 0 means no restriction.keepVariantsCharacter vector of variant identifiers to retain prior to per-block QC. Length 0 means no restriction.