GenomeIntervals {genomeIntervals} | R Documentation |
A user-friendly constructor function for creating both
Genome_intervals
and Genome_intervals_stranded
objects.
GenomeIntervals(chromosome, start, end, strand = NULL, inter.base = NULL, leftOpen = NULL, rightOpen = NULL, ...)
chromosome |
character vector of chromosome names of the
intervals; will become the |
start |
numeric or integer; start (left-most) coordinate of the intervals |
end |
numeric or integer; end (right-most) coordinate of the intervals |
strand |
chacter; specifies which strand the intervals are
located on; if specified an object of class
|
inter.base |
logical; if |
leftOpen |
logical; if |
rightOpen |
logical; if |
... |
any additional annotation for supplied intervals |
The arguments chromosome
, start
, and end
need to
be of the same length, with the first element of each vector
corresponding to the first interval, the second element to the second
interval, and so on.
The same applies to strand
, inter.base
, leftOpen
,
rightOpen
and any additional vectors in '...', if they are
specified.
An object of class Genome_intervals
or
Genome_intervals_stranded
depending on whether strand
has been specified.
J. Toedling
Genome_intervals-class
,
Genome_intervals_stranded-class
## constructing a Genome_intervals object G <- GenomeIntervals(start=c(1,3,4,5,8,10), end=c(5,5,6,8,9,11), chromosome=rep(c("chr2","chrX","chr1"), each=2), leftOpen=rep(c(FALSE, FALSE, TRUE), 2)) show(G) ## constructing a Genome_intervals_stranded object with ## additional interval annotation GS <- GenomeIntervals(start=c(1,3,4,5,8,10), end=c(5,5,6,8,9,11), chromosome=rep(c("chr2","chrX","chr1"), each=2), strand=c("-","-","+","+","+","+"), GC.content=round(runif(6), digits=2)) show(GS)