Skip to contents

Assemble a per-condition QtlSumStats from an aligned pair of variants x conditions effect-size (Bhat) and standard-error (Shat) matrices – the beta-scale (EE) counterpart of qtlSumStatsFromZMatrix. Each entry carries BETA, SE, and (derived) Z = BETA / SE mcols, so the result feeds mashPipeline / mashModelFit on either scale (inputScale = "beta" or "z"). Chromosome / position are decoded from the row (variant) ids exactly as in qtlSumStatsFromZMatrix.

Usage

qtlSumStatsFromBetaMatrix(
  bhat,
  shat,
  study,
  ldSketch = NULL,
  context = colnames(bhat),
  trait = "mash",
  genome = "GRCh38",
  n = 1000L,
  a1 = "A",
  a2 = "G",
  role = "mash"
)

Arguments

bhat

Numeric matrix (variants x conditions) of effect sizes. rownames(bhat) are variant ids; colnames(bhat) label the conditions.

shat

Numeric matrix of standard errors, aligned with bhat (identical dimensions and row/column order).

study

Study identifier (recycled across conditions).

ldSketch

A GenotypeHandle embedded in the collection, or NULL (default) – mash operates across conditions per variant and needs no LD reference.

context, trait

Condition labels; see qtlSumStatsFromZMatrix. Defaults context = colnames(bhat), trait = "mash".

genome

Genome build. Default "GRCh38".

n

Placeholder per-variant sample size. Default 1000.

a1, a2

Placeholder alleles. Defaults "A" / "G".

role

Tag stored in the qcInfo record. Default "mash".

Value

A QtlSumStats with one entry per condition (column).