Learn R Programming

xps (version 1.32.0)

symbol2unitID-methods: Conversion between Gene Symbols and UnitIDs

Description

Convert gene symbols to internal UNIT_IDs and vice verse.

Usage

symbol2unitID(object, symbol, unittype = "transcript", as.list = TRUE)

unitID2symbol(object, unitID, unittype = "transcript", as.list = TRUE)

Arguments

object
Object of class "SchemeTreeSet" or "DataTreeSet".
symbol
character vector of gene symbol(s).
unitID
vector of UNIT_IDs.
unittype
character vector, “transcript” or “probeset”.
as.list
if TRUE a list will be returned (default is data.frame).

Value

A list or character vector.

Details

Functions symbol2unitID and unitID2symbol returns the UNIT_ID(s) for selected gene symbols and vice verse.

For exon arrays the internal UNIT_ID(s) depend on unittype.

By default a list is returned, however for as.list=FALSE a character vector of IDs is returned.

See Also

transcriptID2unitID, probesetID2unitID

Examples

Run this code
## load ROOT scheme file
scheme.test3 <- root.scheme(paste(path.package("xps"),"schemes/SchemeTest3.root",sep="/"))

## unitnames not attached
id <- symbol2unitID(scheme.test3, symbol="ACTB", as.list=TRUE)
id
id <- unitID2symbol(scheme.test3, unitID=274, as.list=TRUE)
id

## unitnames attached
scheme.test3 <- attachUnitNames(scheme.test3)
id <- symbol2unitID(scheme.test3, symbol="ACTB", as.list=TRUE)
id
id <- unitID2symbol(scheme.test3, unitID=274, as.list=TRUE)
id
scheme.test3 <- removeUnitNames(scheme.test3)

rm(scheme.test3)
gc()

Run the code above in your browser using DataLab