| seqinfo {GenomicRanges} | R Documentation |
A set of generic functions for getting/setting sequence information from/on an object.
seqinfo(x) seqinfo(x, new2old=NULL, force=FALSE) <- value seqnames(x) seqnames(x) <- value seqlevels(x) seqlevels(x, force=FALSE) <- value seqlengths(x) seqlengths(x) <- value isCircular(x) isCircular(x) <- value isCircularWithKnownLength(x) genome(x) genome(x) <- value
x |
The object from/on which to get/set the sequence information. |
new2old |
The
If |
force |
Force dropping sequence levels currently in use. This is achieved by
dropping the elements in |
value |
Typically a Seqinfo object for the Either a named or unnamed character vector for the A vector containing the sequence information to store for the other setters. |
Various classes implement methods for those generic functions.
The Seqinfo class plays a central role for those generics because:
It implements methods for all the above generics except for
seqinfo. That is, the seqnames, seqlevels,
seqlengths, isCircular, isCircularWithKnownLength
and genome getters are defined for Seqinfo objects.
Classes that implement the seqinfo getter are typically
expected to return a Seqinfo object.
Default seqlevels, seqlengths, isCircular,
isCircularWithKnownLength and genome getters and
setters are provided.
By default, seqlevels(x) does seqlevels(seqinfo(x)),
seqlengths(x) does seqlengths(seqinfo(x)),
isCircular(x) does isCircular(seqinfo(x)),
isCircularWithKnownLength(x) does
isCircularWithKnownLength(seqinfo(x)),
and genome(x) does genome(seqinfo(x)).
So any class with a seqinfo getter that returns a
Seqinfo object also has all those getters working
out-of-the-box.
See the GRanges, GRangesList and GappedAlignments
classes as examples of such classes (those 3 classes are defined
in the GenomicRanges package).
The full list of methods defined for a given generic can
be seen with e.g. showMethods("seqinfo") or
showMethods("seqnames") (for the getters),
and showMethods("seqinfo<-") or showMethods("seqnames<-")
(for the setters aka replacement methods).
Please be aware that this shows only methods defined in packages
that are currently attached.
Seqinfo-class, GRanges-class, GRangesList-class, GappedAlignments-class
showMethods("seqinfo")
showMethods("seqinfo<-")
showMethods("seqnames")
showMethods("seqnames<-")
if (interactive())
?`GRanges-class`