Skip to contents

S4 collection of QTL summary statistics keyed by the identity tuple (study, context, trait). Each entry holds a GRanges of summary statistics for that tuple. Class-level slots ldSketch (the LD reference GenotypeHandle) and genome (the genome build, a single character string) apply to every entry; the genome build must be uniform because all entries necessarily share the LD reference.

Required columns: study, context, trait, entry. Optional columns include varY (numeric, per-tuple phenotype variance; NA_real_ when unused). The 3-tuple (study, context, trait) is unique. Each entry is a GRanges whose mcols carry the per-variant statistics (SNP, A1, A2, Z, N; plus optional MAF, INFO, BETA, SE, P).

Virtual base class for summary-statistic collections. Concrete subclasses (QtlSumStats, GwasSumStats) carry a DFrame of per-entry rows plus shared slots ldSketch, genome, and qcInfo. Downstream pipelines should dispatch on SumStatsBase for behaviors that apply to either flavour and on the concrete subclass when the tuple shape matters.

Construct a TwasWeightsEntry payload for one (study, context, trait, method) row of a TwasWeights collection.

Usage

TwasWeightsEntry(
  variantIds,
  weights,
  fits = NULL,
  cvResult = NULL,
  standardized = FALSE,
  dataType = NULL
)

Arguments

variantIds

Character vector of variant IDs.

weights

Numeric vector or matrix.

fits

Optional method-specific fit object (the full-data fit; e.g. the mr.mash fit's {dataDrivenPriorMatrices, w0, V}).

cvResult

Optional cross-validation payload: a list mirroring FineMappingEntry@cvResult with samplePartition, predictions, performance, and (mr.mash only) foldFits — the per-fold fits that fineMappingPipeline's mvSuSiE path consumes as per-fold priors.

standardized

Logical (length 1).

dataType

Optional data-type tag.

Value

A TwasWeightsEntry object.

Slots

ldSketch

A GenotypeHandle carrying the LD reference for downstream QC and RSS analysis.

genome

A single character string giving the genome build that the LD sketch and every entry are aligned to.

ldSketch

A GenotypeHandle carrying the LD reference for downstream QC and RSS analysis.

genome

A single character string giving the genome build that the LD sketch and every entry are aligned to.

qcInfo

A list recording which QC steps ran. Empty list() on construction; populated by summaryStatsQc(). Fine-mapping and TWAS-weights pipelines reject inputs where length(getQcInfo(x)) == 0L — the slot serves as both the gating flag and the audit trail.