readCdfUnits | R Documentation |
Reads units (probesets) from an Affymetrix CDF file. Gets all or a subset of units (probesets).
readCdfUnits(filename, units=NULL, readXY=TRUE, readBases=TRUE, readExpos=TRUE,
readType=TRUE, readDirection=TRUE, stratifyBy=c("nothing", "pmmm", "pm", "mm"),
readIndices=FALSE, verbose=0)
filename |
The filename of the CDF file. |
units |
An |
readXY |
If |
readBases |
If |
readExpos |
If |
readType |
If |
readDirection |
If |
stratifyBy |
A |
readIndices |
If |
verbose |
An |
A named list
where the names corresponds to the names
of the units read. Each element of the list is in turn a
list
structure with three components:
groups |
A |
type |
An |
direction |
An |
Note that in affxparser all cell indices are by
convention one-based, which is more convenient to work
with in R. For more details on one-based indices, see
2. Cell coordinates and cell indices
.
James Bullard and Kasper Daniel Hansen. Modified by Henrik Bengtsson to read any subset of units and/or subset of parameters, to stratify by PM/MM, and to return cell indices.
[1] Affymetrix Inc, Affymetrix GCOS 1.x compatible file formats, June 14, 2005. http://www.affymetrix.com/support/developer/
readCdfCellIndices
().
##############################################################
if (require("AffymetrixDataTestFiles")) { # START #
##############################################################
# Find any CDF file
cdfFile <- findCdf()
# Read all units in a CDF file [~20s => 0.34ms/unit]
cdf0 <- readCdfUnits(cdfFile, readXY=FALSE, readExpos=FALSE)
# Read a subset of units in a CDF file [~6ms => 0.06ms/unit]
units1 <- c(5, 100:109, 34)
cdf1 <- readCdfUnits(cdfFile, units=units1, readXY=FALSE, readExpos=FALSE)
stopifnot(identical(cdf1, cdf0[units1]))
rm(cdf0)
# Create a unit name to index map
names <- readCdfUnitNames(cdfFile)
units2 <- match(names(cdf1), names)
stopifnot(all.equal(units1, units2))
cdf2 <- readCdfUnits(cdfFile, units=units2, readXY=FALSE, readExpos=FALSE)
stopifnot(identical(cdf1, cdf2))
##############################################################
} # STOP #
##############################################################
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.