makeSeqnameIds {GenomicRanges}R Documentation

Assign sequence IDs to sequence names

Description

makeSeqnameIds 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.

Usage

makeSeqnameIds(seqnames, X.is.sexchrom=NA)

Arguments

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 NA, makeSeqnameIds does its best to "guess".

Value

An integer vector of the same length as seqnames. The values in the vector span 1:N where N is the number of unique sequence names in the input vector.

Author(s)

H. Pages

See Also

Examples

library(BSgenome.Scerevisiae.UCSC.sacCer2)
makeSeqnameIds(seqnames(Scerevisiae))
makeSeqnameIds(seqnames(Scerevisiae)[c(1:5,5:1)])

[Package GenomicRanges version 1.14.4 Index]