readCel | R Documentation |
This function reads all or a subset of the data in an Affymetrix CEL file.
readCel(filename,
indices = NULL,
readHeader = TRUE,
readXY = FALSE, readIntensities = TRUE,
readStdvs = FALSE, readPixels = FALSE,
readOutliers = TRUE, readMasked = TRUE,
readMap = NULL,
verbose = 0,
.checkArgs = TRUE)
filename |
the name of the CEL file. |
indices |
a vector of indices indicating which features to
read. If the argument is |
readXY |
a logical: will the (x,y) coordinates be returned. |
readIntensities |
a logical: will the intensities be returned. |
readStdvs |
a logical: will the standard deviations be returned. |
readPixels |
a logical: will the number of pixels be returned. |
readOutliers |
a logical: will the outliers be return. |
readMasked |
a logical: will the masked features be returned. |
readHeader |
a logical: will the header of the file be returned. |
readMap |
A |
verbose |
how verbose do we want to be. 0 is no verbosity, higher numbers mean more verbose output. At the moment the values 0, 1 and 2 are supported. |
.checkArgs |
If |
A CEL files consists of a header, a set of cell values,
and information about outliers and masked
cells.
The cell values, which are values extract for each cell (aka feature
or probe), are the (x,y) coordinate, intensity and standard deviation
estimates, and the number of pixels in the cell.
If readIndices=NULL
, cell values for all cells are returned,
Only cell values specified by argument readIndices
are returned.
This value returns a named list with components described below:
header |
The header of the CEL file. Equivalent to the
output from |
x,y |
(cell values) Two |
intensities |
(cell value) A |
stdvs |
(cell value) A |
pixels |
(cell value) An |
outliers |
An |
masked |
An |
The elements of the cell values are ordered according to argument
indices
. The lengths of the cell-value elements equals the
number of cells read.
Which of the above elements that are returned are controlled by the
readNnn
arguments. If FALSE
, the corresponding element
above is NULL
, e.g. if readStdvs=FALSE
then
stdvs
is NULL
.
The Affymetrix image analysis software flags cells as outliers and masked. This method does not return these flags, but instead vectors of cell indices listing which cells of the queried cells are outliers and masked, respectively. The current community view seems to be that this should be done based on statistical modeling of the actual probe intensities and should be based on the choice of preprocessing algorithm. Most algorithms are only using the intensities from the CEL file.
The Fusion SDK allocates memory for the entire
CEL file, when the file is accessed (but does not actually read the
file into memory). Using the indices
argument will therefore
only affect the memory use of the final object (as well as speed), not
the memory allocated in the C function used to parse the file. This
should be a minor problem however.
It is considered a bug if the file contains information not accessible by this function, please report it.
James Bullard and Kasper Daniel Hansen
readCelHeader()
for a description of the header output.
Often a user only wants to read the intensities, look at
readCelIntensities()
for a function specialized for
that use.
for (zzz in 0) { # Only so that 'break' can be used
# Scan current directory for CEL files
celFiles <- list.files(pattern="[.](c|C)(e|E)(l|L)$")
if (length(celFiles) == 0)
break;
celFile <- celFiles[1]
# Read a subset of cells
idxs <- c(1:5, 1250:1500, 450:440)
cel <- readCel(celFile, indices=idxs, readOutliers=TRUE)
str(cel)
# Clean up
rm(celFiles, celFile, cel)
} # for (zzz in 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.