convertCdf            package:affxparser            R Documentation

_C_o_n_v_e_r_t_s _a _C_D_F _i_n_t_o _t_h_e _s_a_m_e _C_D_F _b_u_t _w_i_t_h _a_n_o_t_h_e_r _f_o_r_m_a_t

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     convertCdf(filename, outFilename, version="4", force=FALSE, ..., .validate=TRUE, verbose=FALSE)

_A_r_g_u_m_e_n_t_s:

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 'FALSE', and the version of the orignal CDF is the same as
          the output version, the new CDF will not be generated,
          otherwise it will.

     ...: Not used.

.validate: If 'TRUE', a consistency test between the generated and the
          original CDF is performed.  Note that the memory overhead for
          this can be quite large, because two complete CDF structures
          are kept in memory at the same time.

 verbose: If 'TRUE', extra details are written while processing.

_V_a_l_u_e:

     Returns (invisibly) 'TRUE' if a new CDF was generated, otherwise
     'FALSE'.

_B_e_n_c_h_m_a_r_k_i_n_g _o_f _A_S_C_I_I _a_n_d _b_i_n_a_r_y _C_D_F_s:

     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).

_C_o_n_f_i_r_m_e_d _c_o_n_v_e_r_t_i_o_n_s _t_o _b_i_n_a_r_y (_X_D_A) _C_D_F_s:

     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.

_A_u_t_h_o_r(_s):

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

_S_e_e _A_l_s_o:

     See 'compareCdfs'() to compare two CDF files. 'writeCdf'().

_E_x_a_m_p_l_e_s:

     for (zzz in 0) {

     # Find the small 'Test3' CDF file
     cdfFile <- findCdf("Test3")
     # Find any CDF file
     if (is.null(cdfFile))
       cdfFile <- findCdf()
     if (is.null(cdfFile))
       break

     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     # Create an identical CDF structure
     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     cdfHeader <- readCdfHeader(cdfFile)
     outFile <- sprintf("%s-copy.cdf", cdfHeader$chiptype)
     convertCdf(cdfFile, outFile, overwrite=TRUE, verbose=TRUE)

     # Clean up
     rm(cdfFile, pathname, cdfHeader)

     } # for (zzz in 0)

