distinctMC | R Documentation |
Keep distinct ranges by including mcols
distinctMC(x, ..., .keep_all = FALSE)
x |
A GenomicRanges object |
... |
|
.keep_all |
If |
Wrapper to distinct for GRanges
objects.
Finds unique ranges and mcols in combination and retains only
the distinct combinations, in keeping with the dplyr
function.
Will default to unique(granges(x))
if no columns are provided
A GRanges object
gr <- GRanges(rep(c("chr1:1-10"), 2))
gr$id <- paste0("range", seq_along(gr))
gr$gene <- "gene1"
gr
distinctMC(gr)
distinctMC(gr, gene)
distinctMC(gr, gene, .keep_all = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.