Skip to contents

S4 container for a single fine-mapping fit attached to a FineMappingResult row. One entry corresponds to one (study, context, trait, method) tuple.

For joint fits (e.g., multi-trait mvSuSiE or fSuSiE), multiple FineMappingEntry objects in the same FineMappingResult collection may carry references to the same underlying R fit object (R's copy-on-modify semantics keep this memory-efficient).

Construct a QtlDataset S4 object containing one study's individual-level QTL data: a genotype handle and a named list of SummarizedExperiment objects (one per QTL context), plus genotype-derived covariates and a residual-scaling flag.

Usage

QtlDataset(
  study,
  genotypes,
  phenotypes,
  genotypeCovariates = matrix(numeric(0), nrow = 0, ncol = 0),
  scaleResiduals = TRUE,
  mafCutoff = 0,
  macCutoff = 0,
  xvarCutoff = 0,
  imissCutoff = 0,
  keepSamples = character(0),
  keepVariants = character(0),
  keepIndel = TRUE
)

Arguments

study

Character (length 1). Study identifier.

genotypes

A GenotypeHandle.

phenotypes

Named list of SummarizedExperiment objects, keyed by context. Each SE must have rowRanges carrying trait positions and colData carrying per-context phenotype covariates.

genotypeCovariates

Numeric matrix of genotype-derived covariates (e.g., ancestry PCs); rows are samples.

scaleResiduals

Logical (length 1). Default TRUE.

keepIndel

Logical (length 1). When FALSE, variants whose alleles are not single nucleotides (indels) are dropped at extraction. Default TRUE (keep all variants).

Value

A QtlDataset object.

Slots

variantIds

Character vector of variant IDs in the fit.

trimmedFit

The method-specific fit object (SuSiE list, mvSuSiE object, fSuSiE object, etc.). May be shared by reference across joint-fit entries.

topLoci

A long-format data.frame with at minimum variant_id and pip columns; optional cs, coverage, betahat, sd, csLog10bf, z.

sumstats

A list of summary statistics used in the fit, or NULL.