Skip to contents

Concatenates every element's ranges and broadcasts the collection's identity tuple onto each range, so a plyranges predicate can mix tuple and per-range columns: filter(x, .context == "blood" & pip > 0.9).

Usage

flattenTupleRanges(x)

Arguments

x

A RangedTupleList.

Value

A GRanges.

Details

Broadcast columns are prefixed with a dot – .study, .context, .trait, .method – following the tidySummarizedExperiment convention for framework-injected columns (.sample, .feature). The prefix is not cosmetic: a collection's identity column can collide with a per-range column of the same name carrying different information. On gwasFineMappingExample the outer method is "susie" while the per-range method is "susieRss" – the collection's label against the fitter actually used. Prefixing keeps both, and keeps the name stable so a predicate does not change meaning between objects.

Non-atomic mcols columns – the per-element susieFit / cvResult payloads – are dropped. They describe an element, not a range, so there is no row to broadcast them onto. Use the accessors (getSusieFit, getCvResult) for those.

Examples

data(qtlFineMappingExample)
flat <- flattenTupleRanges(qtlFineMappingExample)
head(names(S4Vectors::mcols(flat)))
#> [1] "A1"            "A2"            "N"             "af"           
#> [5] "marginal_beta" "marginal_se"