Row-bind two or more GwasSumStats collections into one – e.g.
the per-LD-block pieces a block-parallel pipeline writes, back into the
single block-keyed collection assembleCtwasInputs requires.
Per-element metadata (blockId, varY, nCase / ...)
is carried through; a collection lacking an optional column is NA-padded.
Arguments
- ...
Two or more
GwasSumStatsobjects, or a singlelistof them.- ldReference
Optional genotype panel (see
readGenotypes) to attach to the combined collection, overriding the unioned one. DefaultNULL.
Details
The three collection-level slots are merged rather than taken from the first
input: genome and the summaryStatsQc options must agree
across the inputs (a mismatch is an error, not a silent first-wins), the
per-element qcInfo$entryAudit concatenates in element order so
qcDiagnostics keeps addressing the right element, and the
LD references combine: genotype panels union into one panel over the shared
genotype handle. That last one matters: block-parallel pipelines narrow each
piece's panel to its own block, so keeping only the first would leave a
multi-block collection whose LD reference covers one block. An
LdMatrix or a GenotypeMixture cannot be unioned that way;
one of the inputs' references must already cover the others, or the
combined one is passed as ldReference.
Examples
data(gwasSumStatsS4Example)
combineGwasSumStats(gwasSumStatsS4Example)
#> GwasSumStats: 1 studies, genome build hg19
#> LD reference: plink1 @ pecotmr://extdata/toy_canonical