| RangesList-methods {rtracklayer} | R Documentation |
Genomic coordinates are often specified in terms of a genome identifier,
chromosome name, start position and end position. This information can
be represented by a RangesList
instance, and the rtracklayer package adds convenience methods to
RangesList for the manipulation of genomic ranges. The spaces (or
names) of RangesList are the chromosome names. The
universe slot indicates the genome, usually as given by UCSC
(e.g. “hg18”).
In the code snippets below,
x is a RangesList object.
chrom(x): Gets the chromosome names (a factor) over the
ranges in x.
genome(x), genome(x) <- value: Gets or sets the
genome (a single string or NULL) for
the ranges in x; simple wrappers around
universe and
universe<-, respectively.
GenomicRanges(start, end, chrom = NULL, genome = NULL):
Constructs a RangesList containing ranges specified by
start and end, optionally split into elements based on
chrom, a vector of chromosome identifiers (or NULL for no
splitting). The genome argument should be a
scalar string and is treated as the RangesList
universe. See the examples.
Michael Lawrence
GenomicRanges(c(1,2,3), c(5,2,8))
GenomicRanges(c(1,2,3), c(5,2,8), c("chr1", "chr1", "chr2"))
GenomicRanges(c(1,2,3), c(5,2,8), genome = "hg18")