convertCdf {affxparser} | R Documentation |
Converts a CDF into the same CDF but with another format. Currently only CDF files in version 4 (binary/XDA) can be written. However, any input format is recognized.
convertCdf(filename, outFilename, version="4", force=FALSE, ..., .validate=TRUE, verbose=FALSE)
filename |
The pathname of the original CDF file. |
outFilename |
The pathname of the destination CDF file. If the same as the source file, an exception is thrown. |
version |
The version of the output file format. |
force |
If |
... |
Not used. |
.validate |
If |
verbose |
If |
Returns (invisibly) TRUE
if a new CDF was generated, otherwise FALSE
.
Binary CDFs are much faster to read than ASCII CDFs. Here are some example for reading complete CDFs (the differnce is even larger when reading CDFs in subsets):
HG-U133A (22283 units): ASCII 11.7s (9.3x), binary 1.20s (1x).
Hu6800 (7129 units): ASCII 3.5s (6.1x), binary 0.57s (1x).
The following chip types have been converted using convertCdf()
and then verified for correctness using compareCdfs()
:
ASCII-to-binary: HG-U133A, Hu6800.
Binary-to-binary: Test3.
Henrik Bengtsson
See compareCdfs
() to compare two CDF files.
writeCdf
().
############################################################## if (require("AffymetrixDataTestFiles")) { # START # ############################################################## chipType <- "Test3" cdfFiles <- findCdf(chipType, firstOnly=FALSE) cdfFiles <- list( ASCII=grep("ASCII", cdfFiles, value=TRUE), XDA=grep("XDA", cdfFiles, value=TRUE) ) outFile <- file.path(tempdir(), sprintf("%s.cdf", chipType)) convertCdf(cdfFiles$ASCII, outFile, verbose=TRUE) ############################################################## } # STOP # ##############################################################