unnest.GenomicRanges {plyranges} | R Documentation |
Expand list-columns in a Ranges object
## S3 method for class 'GenomicRanges' unnest(data, ..., .drop = FALSE, .id = NULL, .sep = NULL)
data |
A Ranges object |
... |
list-column names to unnest |
.drop |
Determines whether other list columns will be dropped.
By default |
.id |
A character vector of length equal to number of list columns.
If supplied will create new column(s) with name |
.sep |
Combine name of nested Ranges with name of list column seperated
by |
a GRanges object with expanded list columns
grng <- as_granges(data.frame(seqnames = "chr1", start = 20:23, width = 1000)) grng <- mutate(grng, exon_id = IntegerList(a = 1, b = c(4,5), c = 3, d = c(2,5))) unnest(grng) unnest(grng, .id = "name")