compress               package:flagme               R Documentation

_C_o_m_p_r_e_s_s _a_n _a_l_i_g_n_m_e_n_t _o_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Many of the peaks are not similar.  So, the set of pairwise
     similarity matrices can be compressed.

_U_s_a_g_e:

     compress(object,verbose=TRUE,...)
     decompress(object,verbose=TRUE,...)

_A_r_g_u_m_e_n_t_s:

  object: a 'peaksAlignment', 'peaksAlignment' or 'peaksAlignment'
          object to be compressed

 verbose: logical, whether to print out information

     ...: further arguments

_D_e_t_a_i_l_s:

     Using sparse matrix representations, a significant compression can
     be achieved.  Here, we use the 'matrix.csc' class of the 'SpareM'
     package.

_V_a_l_u_e:

     an object of the same type as the input object

_A_u_t_h_o_r(_s):

     Mark Robinson

_R_e_f_e_r_e_n_c_e_s:

     Mark D Robinson (2008).  Methods for the analysis of gas
     chromatography - mass spectrometry data  _PhD dissertation_
     University of Melbourne.

_S_e_e _A_l_s_o:

     'peaksAlignment', 'clusterAlignment', 'progressiveAlignment'

_E_x_a_m_p_l_e_s:

     require(gcspikelite)

     # paths and files
     gcmsPath<-paste(.find.package("gcspikelite"),"data",sep="/")
     cdfFiles<-dir(gcmsPath,"CDF",full=TRUE)
     eluFiles<-dir(gcmsPath,"ELU",full=TRUE)

     # read data, peak detection results
     pd<-peaksDataset(cdfFiles[1:2],mz=seq(50,550),rtrange=c(7.5,8.5))
     pd<-addAMDISPeaks(pd,eluFiles[1:2])

     # pairwise alignment (it is compressed by default)
     ca<-clusterAlignment(pd, usePeaks = TRUE, df = 20)
     object.size(ca)

     # decompress 
     ca<-decompress(ca)
     object.size(ca)

