The inverse of flattenTupleRanges: ranges are grouped by the
identity tuple they carry and returned to template's elements, so the
collection's class, its per-element payloads and its collection-level slots
all survive a plyranges round trip.
Details
A tuple with no surviving ranges becomes an empty element rather than being dropped, so the collection keeps its shape and its metadata stays aligned.
Examples
data(qtlFineMappingExample)
flat <- flattenTupleRanges(qtlFineMappingExample)
nestTupleRanges(flat, qtlFineMappingExample)
#> QtlFineMappingResult: 1 entries
#> 1 studies, 1 contexts, 1 traits, 1 methods
#> LD sketch: NULL (individual-level fit)