Description Usage Arguments Value Author(s) See Also Examples
View source: R/rankSeqlevels.R
rankSeqlevels assigns a unique ID to each unique sequence name
in the input vector. The returned IDs span 1:N where N is the number of
unique sequence names in the input vector.
orderSeqlevels is similar to rankSeqlevels except that
the returned vector contains the order instead of the rank.
1 2 | rankSeqlevels(seqnames, X.is.sexchrom=NA)
orderSeqlevels(seqnames, X.is.sexchrom=NA)
|
seqnames |
A character vector or factor containing sequence names. |
X.is.sexchrom |
A logical indicating whether X refers to the sexual chromosome
or to chromosome with Roman Numeral X. If |
An integer vector of the same length as seqnames that tries to
reflect the “natural” order of seqnames, e.g.,chr1,
chr2, chr3, ...
The values in the returned vector span 1:N where N is the number of unique sequence names in the input vector.
H. Pagès for rankSeqlevels, orderSeqlevels added by
Sonali Arora
sortSeqlevels for sorting the sequence levels
of an object in "natural" order.
1 2 3 4 5 6 7 8 | library(BSgenome.Scerevisiae.UCSC.sacCer2)
rankSeqlevels(seqnames(Scerevisiae))
rankSeqlevels(seqnames(Scerevisiae)[c(1:5,5:1)])
newchr <- paste0("chr",c(1:3,6:15,4:5,16:22))
newchr
orderSeqlevels(newchr)
rankSeqlevels(newchr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.