Learn R Programming

humarray (version 1.2)

select.autosomes: Select ranges only within the 22 autosomes in a ranged data object

Description

Select only data from autosomes from a GRanges/RangedData object. Will exclude X,Y, mitochondrial chromosome rows, and can automatically detect whether chromosomes are coded as 'chr1' or just '1', etc.

Usage

select.autosomes(ranges, deselect = FALSE)

Arguments

ranges

A RangedData or GRanges object

deselect

logical, if TRUE, then will select non-autosomes

Value

an object of the same format as the input (ranges), except with non-autosomal ranges removed.

Examples

Run this code
# NOT RUN {
rand.ranges <- rranges(chr.range=20:26)
rand.ranges # should include some non-autosomes
select.autosomes(rand.ranges) # only autosomes remain
# }

Run the code above in your browser using DataLab