Description Usage Arguments Value Examples
Expand list-columns in a Ranges object
1 2 3 4 5 6 7 8 |
data |
A Ranges object |
... |
list-column names to expand then unlist |
.drop |
Should additional list columns be dropped (default = FALSE)?
By default |
.id |
A character vector of length equal to number of list columns.
If supplied will create new column(s) with name |
.keep_empty |
If a list-like column contains empty elements, should those elements be kept? (default = FALSE) |
.recursive |
If there are multiple list-columns, should the columns be treated as parallel? If FALSE each column will be unnested recursively, otherwise they are treated as parallel, that is each list column has identical lengths. (deafualt = FALSE) |
a GRanges object with expanded list columns
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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))
)
expand_ranges(grng)
expand_ranges(grng, .id = "name")
# empty list elements are not preserved by default
grng <- mutate(grng,
exon_id = IntegerList(a = NULL, b = c(4,5), c= 3, d = c(2,5))
)
expand_ranges(grng)
expand_ranges(grng, .keep_empty = TRUE)
expand_ranges(grng, .id = "name", .keep_empty = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.