Skip to contents

S4 collection of TWAS weights keyed by the identity tuple (study, context, trait, method). Each entry is a TwasWeightsEntry carrying one method's weights for one trait/context/study. Implements the DFrame-subclass collection pattern.

Required columns: study, context, trait, method, entry. Each entry is a TwasWeightsEntry.

Optional columns jointStudies, jointContexts, jointTraits appear when the collection contains rows produced by a jointSpecification-driven joint fit. For such a row, the corresponding identity-tuple column carries the sentinel "joint" and the joint column lists the semicolon-joined members of the joined axis. For non-joint rows the joint columns are NA_character_. Tuple uniqueness is enforced jointly across the identity-tuple columns and any present joint columns.

Construct a GwasFineMappingResult DFrame-subclass collection from per-(study, method, region_id) tuples and a list of FineMappingEntry 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 tagged with its own region_id).

Usage

GwasFineMappingResult(
  study,
  method,
  entry,
  region_id = NULL,
  region = 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 / SimpleList of FineMappingEntry objects.

region_id

Character vector of LD-block identifiers (per tuple). When omitted (NULL), defaults to a per-row synthetic id ("region_1", "region_2", ...) so the (study, method, region_id) triple is unique. Supplying meaningful labels (e.g. "chr22_10516173_17414263") is preferred for downstream consumers that join on region.

region

Optional GRanges (length length(study)) genomic anchor per row. When NULL (default) it is derived from region_id (parsing chr_start_end / chr:start-end; a 0-width chrUn sentinel for ids that do not encode coordinates). Carried forward as provenance (e.g. for cTWAS LD-block placement); not part of the identity key.

ldSketch

An optional GenotypeHandle.

Value

A GwasFineMappingResult object.

Slots

ldSketch

The LD reference GenotypeHandle the weights were derived against, or NULL when the weights were learned from individual-level data. Used downstream for cross-pipeline LD-sketch identity validation.