Description Usage Arguments Value See Also Examples
View source: R/filterChromosomes.R
Filters the chromosomes in a region set. It can either filter using a predefined chromosome set (e.g. "autosomal chromosomes in Homo sapiens") or using a custom chromosome set (e.g. only chromosomes "chr22" and "chrX")
1 | filterChromosomes(A, organism="hg", chr.type="canonical", keep.chr=NULL)
|
A |
a region set in any of the formats accepted by |
organism |
a character indicating the organism from which to get the predefined chromosome sets. It can be the organism code as used in |
chr.type |
a character indicating the specific chromosome set to be used. Usually "autosomal" or "canonical", althought other values could be available for certain organisms. |
keep.chr |
is a character vector stating the names of the chromosomes to keep. Any chromosome not in the vector will be filtered out. If keep.chr is supplied, organism and chr.type are ignored. |
A GRanges
object containing only the regions in the original region set belonging to the selected chromosomes. All regions in non selected chromosomes are removed.
getGenomeAndMask
, listChrTypes
getChromosomesByOrganism
1 2 3 4 | g <- getGenomeAndMask("hg19")$genome
listChrTypes()
g <- filterChromosomes(g, chr.type="autosomal", organism="hg19")
g <- filterChromosomes(g, keep.chr=c("chr1", "chr2", "chr3"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.