Assemble a per-condition QtlSumStats from a
variants x conditions Z-score matrix – the input shape the mash
pipeline uses when only Z is available. Each column is one condition, and
conditions are distinguished by context, trait, or both: the
columns may be different cell types / tissues (contexts), different
molecular phenotypes (traits), or arbitrary context x trait pairs.
Chromosome / position are decoded from the row (variant) identifiers via
parseVariantId (with a synthetic-position fallback for ids
that do not encode coordinates); A1 / A2 / N are
placeholders because a Z-only input carries no alleles or sample sizes
(mash reads only Z). A pass-through qcInfo record is set so the
result clears the mash QC gate.
Usage
qtlSumStatsFromZMatrix(
z,
study,
ldSketch = NULL,
context = colnames(z),
trait = "mash",
genome = "GRCh38",
n = 1000L,
a1 = "A",
a2 = "G",
role = "mash"
)Arguments
- z
Numeric matrix (variants x conditions).
rownames(z)are variant ids (ideallychr:pos:A2:A1);colnames(z)label the conditions.- 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
Condition context label(s): a single value recycled across every column, or a length-
ncol(z)vector (one per condition). Defaults tocolnames(z)– one context per column.- trait
Condition trait label(s): a single value recycled across every column, or a length-
ncol(z)vector. Default"mash". Passcolnames(z)here (with a constantcontext) when the columns are traits rather than contexts.- 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).