celToApd {aroma.apd} | R Documentation |
Generates an APD file from an Affymetrix CEL file.
## Default S3 method: celToApd(filename, apdFile=NULL, mapType="asChipType", writeMap=NULL, ..., verbose=FALSE)
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 NULL , no remapping of the cell indices is done.
If "asChipType" , the map type is the same as the chip type
of the CEL file.
If any other character string, it sets the map type to that string.
Note that there must be a APD map file with this type that can
be found by findApdMap ().
|
writeMap |
An optional write map integer vector used
to remap the cell indices for optimal reading speed. If NULL ,
the write map may be obtained from the read map file specified by
the mapType argument. |
... |
Additional arguments passed to writeApd (). |
verbose |
A Verbose object. |
Returns (invisibly) the pathname of the written APD file.
Henrik Bengtsson (http://www.braju.com/R/)
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
().
for (zzz in 0) { verbose <- Arguments$getVerbose(TRUE) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 1. Scan for existing CEL files # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # a) Scan for CEL files path <- filePath("cel/", expandLinks="any") files <- list.files(path=path, pattern="[.](c|C)(e|E)(l|L)$", full.names=TRUE) files <- files[!file.info(files)$isdir] if (length(files) == 0) break cat("Converting CEL file to APD file: ", files[1], "\n") apdfile <- celToApd(files[1]) cat("Created APD file: ", apdfile, "\n") file.remove(apdfile) 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 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") } } # for (zzz in 0) rm(zzz, verbose, pattern)