Build a QtlSumStats from Bhat / Shat (effect-size) Matrices
Source:R/mashWrapper.R
qtlSumStatsFromBetaMatrix.RdAssemble 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
GenotypeHandleembedded in the collection, orNULL(default) – mash operates across conditions per variant and needs no LD reference.- context, trait
Condition labels; see
qtlSumStatsFromZMatrix. Defaultscontext = 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
qcInforecord. Default"mash".
Value
A QtlSumStats with one entry per condition (column).