Return the LD-block identifier of each row of a collection
that keys its rows by block — a GwasSumStats, or a
GwasFineMappingResult fine-mapped over one.
Per ROW, like genomicRegion and unlike
studyName / methodNames: a block id is
provenance for a particular fit, not an axis the collection is indexed
on, so the returned vector is always the same length as nrow(x)
and can be used to label or join rows directly.
It keys the external block manifest the blocks were defined in, and so
carries the true block BOUNDARIES — unlike range(x), which is
the span of the variants that survived QC. A collection with no block
axis (every QTL flavour) returns NA for every row rather than
erroring, so code that handles both flavours needs no class test.
See also
genomicRegion for the window that was analysed.
Examples
data(gwasFineMappingExample, qtlFineMappingExample)
blockId(gwasFineMappingExample)
#> [1] "region_1"
# A QTL result has no block axis, so one NA per row rather than an error.
blockId(qtlFineMappingExample)
#> [1] NA