Description Usage Arguments Details Value Author(s) See Also Examples
This convenience function removes non-standard, mitochondrial, and/or sex chromosomes from any GRanges object.
1 2 3 4 5 6 7 8 |
gr |
Any GRanges object, or any another object with associated
|
keep.X, keep.Y, keep.M, keep.nonstandard |
Logicals indicating which non-autosomes should be kept. By default, sex chromosomes are kept, but mitochondrial and non-standard chromosomes are removed. |
genome |
An optional string that, if supplied, will be used to set the
genome of |
Standard chromosomes are defined using the
standardChromosomes
function
from the GenomeInfoDb
package.
A GRanges object in which both ranges and seqinfo
associated
with trimmed chromosomes have been removed.
Mike DeBerardine
GenomeInfoDb::standardChromosomes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # make a GRanges
chrom <- c("chr2", "chr3", "chrX", "chrY", "chrM", "junk")
gr <- GRanges(seqnames = chrom,
ranges = IRanges(start = 2*(1:6), end = 3*(1:6)),
strand = "+",
seqinfo = Seqinfo(chrom))
genome(gr) <- "hg38"
gr
tidyChromosomes(gr)
tidyChromosomes(gr, keep.M = TRUE)
tidyChromosomes(gr, keep.M = TRUE, keep.Y = FALSE)
tidyChromosomes(gr, keep.nonstandard = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.