Description Usage Arguments Value Author(s) See Also Examples
View source: R/readCelRectangle.R
Reads a spatial subset of probe-level data from Affymetrix CEL files.
1 |
filename |
The pathname of the CEL file. |
xrange |
A |
yrange |
A |
... |
Additional arguments passed to |
asMatrix |
If |
A named list
CEL structure similar to what readCel
().
In addition, if asMatrix
is TRUE
, the CEL data fields
are returned as matrices, otherwise not.
Henrik Bengtsson
The readCel
() method is used internally.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ##############################################################
if (require("AffymetrixDataTestFiles")) { # START #
##############################################################
rotate270 <- function(x, ...) {
x <- t(x)
nc <- ncol(x)
if (nc < 2) return(x)
x[,nc:1,drop=FALSE]
}
# Search for some available CEL files
path <- system.file("rawData", package="AffymetrixDataTestFiles")
file <- findFiles(pattern="[.](cel|CEL)$", path=path, recursive=TRUE)
# Read CEL intensities in the upper left corner
cel <- readCelRectangle(file, xrange=c(0,250), yrange=c(0,250))
z <- rotate270(cel$intensities)
sub <- paste("Chip type:", cel$header$chiptype)
image(z, col=gray.colors(256), axes=FALSE, main=basename(file), sub=sub)
text(x=0, y=1, labels="(0,0)", adj=c(0,-0.7), cex=0.8, xpd=TRUE)
text(x=1, y=0, labels="(250,250)", adj=c(1,1.2), cex=0.8, xpd=TRUE)
# Clean up
rm(rotate270, files, file, cel, z, sub)
##############################################################
} # STOP #
##############################################################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.