celToApd {aroma.apd} | R Documentation |
Generates an APD file from an Affymetrix CEL file
Description
Generates an APD file from an Affymetrix CEL file.
Usage
## Default S3 method:
celToApd(filename, apdFile=NULL, mapType="asChipType", writeMap=NULL, ..., verbose=FALSE)
Arguments
filename |
The pathname of the CEL file. |
apdFile |
An optional pathname of the APD file, otherwise it will be the same as the CEL file with extension replaced with 'apd'. |
mapType |
The type of read map for the generated APD file.
If |
writeMap |
An optional write map |
... |
Additional arguments passed to |
verbose |
A |
Value
Returns (invisibly) the pathname of the written APD file.
Author(s)
Henrik Bengtsson
See Also
To create an APD map file from a CDF file, see cdfToApdMap
().
To read an APD file, see readApd
().
To read an APD map file, see readApdMap
().
Examples
library("R.utils") ## Arguments
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# 1. Scan for existing CEL files
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# a) Scan for CEL files
files <- list.files(pattern="[.](cel|CEL)$")
files <- files[!file.info(files)$isdir]
if (length(files) > 0 && require("affxparser")) {
cat("Create an optimal read map for CEL file:", files[1], "\n")
cdffile <- findCdf(readCelHeader(files[1])$chiptype)
res <- cdfToApdMap(cdffile)
cat("Converting CEL file to APD file:", files[1], "\n")
apdfile <- celToApd(files[1])
cat("Created APD file:", apdfile, "\n")
file.remove(apdfile)
cat("Converting CEL file to APD file with an optimized read map:", files[1], "\n")
apdfile <- celToApd(files[1], mapType=res$mapType)
cat("Created APD file:", apdfile, "\n")
writeMap <- invertMap(res$readMap)
for (file in files[-1]) {
cat("Converting CEL file to APD file with an optimized read map:", file, "\n")
apdfile <- celToApd(file, mapType=res$mapType, writeMap=writeMap)
cat("Created APD file:", apdfile, "\n")
}
} # if (length(files) > 0)