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.- ldSketch
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
getQcDiagnostics keeps addressing the right element, and the
LD sketches 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.
Examples
data(gwasSumStatsS4Example)
combineGwasSumStats(gwasSumStatsS4Example)
#> GwasSumStats: 1 studies, genome build hg19
#> LD sketch: plink1 @ pecotmr://extdata/toy_canonical