compress {flagme}R Documentation

Compress an alignment object

Description

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

Usage

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

Arguments

object a peaksAlignment, peaksAlignment or peaksAlignment object to be compressed
verbose logical, whether to print out information
... further arguments

Details

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

Value

an object of the same type as the input object

Author(s)

Mark Robinson

References

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

See Also

peaksAlignment, clusterAlignment, progressiveAlignment

Examples

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)

[Package flagme version 1.0.0 Index]