Learn R Programming

xps (version 1.32.0)

indexUnits-methods: Unit Locations

Description

Returns a data.frame or list with locations of the probes in each probe set.

Usage

indexUnits(object, which = "", unitID = NULL, unittype = "transcript", as.list = TRUE, data = NULL)

pmindex(object, unitID = NULL, as.list = TRUE)

mmindex(object, unitID = NULL, as.list = TRUE)

Arguments

object
Object of class "DataTreeSet".
which
type of probes to be used, for details see validData.
unitID
optional vector of UNIT_IDs.
unittype
character vector, “transcript” or “probeset”.
as.list
if TRUE a list will be returned (default is data.frame).
data
optional data.frame containing (x,y)-coordinates.

Value

A list or data.frame.

Details

Function indexUnits returns a data.frame or list with locations of the probes in each probe set.

By default a data.frame for selected unitIDs or all unitIDs (unitID="*") will be returned with columns . Here "XY" are the selected rows of slot data. For as.list=TRUE a list of unitIDs will be returned containing the selected rows "XY". The names of the elements in the list returned are the UNIT_IDs.

For unitID=NULL a vector of data rows "XY" will be returned.

For expression arrays which can be one of "pm", "mm", or "both". Alternatively, functions pmindex and mmindex can be used for PM probes or MM probes, respectively.

For exon arrays which is described in validData. However, in this case slot data must contain the (x,y)-coordinates of the probesetIDs.

See Also

unitID2transcriptID, unitID2probesetID

Examples

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

## dataXY not attached
id <- indexUnits(data.test3, which="pm", unitID=c(34,36,122))
id

## dataXY attached (only necessary for whole genome and exon arrays)
data.test3 <- attachDataXY(data.test3)
xy <- treeData(data.test3)
id <- indexUnits(data.test3, which="pm", unitID=c(34,36,122), data=xy)
id
id <- indexUnits(data.test3, which="", unitID=c(34,36,122), data=xy)
id
id <- indexUnits(data.test3, which="", unitID=34, as.list=FALSE, data=xy)
id
data.test3 <- removeDataXY(data.test3)

rm(scheme.test3, data.test3)
gc()

Run the code above in your browser using DataLab