Skip to content

Commit

Permalink
Refactor xcmsRaw R source files.
Browse files Browse the repository at this point in the history
+ Split methods/functions for xcmsRaw into respective files.
+ Put all generics into AllGenerics.R
  • Loading branch information
jorainer committed Jul 21, 2016
1 parent 6cbe435 commit 09d92f2
Show file tree
Hide file tree
Showing 14 changed files with 883 additions and 907 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,27 @@ Collate:
'cwTools.R'
'databases.R'
'fastMatch.R'
'functions-xcmsRaw.R'
'functions-xcmsSet.R'
'init.R'
'matchpeaks.R'
'methods-IO.R'
'methods-netCdfSource.R'
'methods-rampSource.R'
'methods-xcmsPeaks.R'
'methods-xcmsRaw.R'
'methods-xcmsSet.R'
'models.R'
'msn2xcmsRaw.R'
'mzClust.R'
'netCDF.R'
'plotQC.R'
'present.R'
'ramp.R'
'specDist.R'
'write.mzquantML.R'
'writemzdata.R'
'writemztab.R'
'xcmsEIC.R'
'xcmsFragments.R'
'xcmsRaw.R'
'xcmsSource.R'
'zzz.R'
26 changes: 24 additions & 2 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## On the long run it would be nice to have all generics in here.
## Alphabetically ordered.

## A
setGeneric("absent", function(object, class, minfrac) standardGeneric("absent"))

## C
setGeneric("calibrate", function(object, ...) standardGeneric("calibrate"))
setGeneric("collect", function(object, ...) standardGeneric("collect"))

## D
setGeneric("deepCopy", function(object) standardGeneric("deepCopy"))
Expand All @@ -14,7 +18,9 @@ setGeneric("filepaths<-", function(object, value) standardGeneric("filepaths<-")
setGeneric("fillPeaks.chrom", function(object, ...) standardGeneric("fillPeaks.chrom"))
setGeneric("fillPeaks.MSW", function(object, ...) standardGeneric("fillPeaks.MSW"))
setGeneric("fillPeaks", function(object, ...) standardGeneric("fillPeaks"))
setGeneric("findMZ", function(object, find, ppmE=25, print=TRUE) standardGeneric("findMZ"))
setGeneric("findmzROI", function(object, ...) standardGeneric("findmzROI"))
setGeneric("findneutral", function(object, find, ppmE=25, print=TRUE) standardGeneric("findneutral"))
setGeneric("findKalmanROI", function(object, ...) standardGeneric("findKalmanROI"))
setGeneric("findPeaks", function(object, ...) standardGeneric("findPeaks"))
setGeneric("findPeaks.centWave", function(object, ...)
Expand All @@ -29,8 +35,7 @@ setGeneric("findPeaks.MS1", function(object, ...) standardGeneric("findPeaks.MS1

## G
setGeneric("getEIC", function(object, ...) standardGeneric("getEIC"))
setGeneric("getEICOld", function(object, ...) standardGeneric("getEICOld"))
setGeneric("getEICNew", function(object, ...) standardGeneric("getEICNew"))
setGeneric("getMsnScan", function(object, ...) standardGeneric("getMsnScan"))
setGeneric("getPeaks", function(object, ...) standardGeneric("getPeaks"))
setGeneric("getScan", function(object, ...) standardGeneric("getScan"))
setGeneric("getSpec", function(object, ...) standardGeneric("getSpec"))
Expand Down Expand Up @@ -74,6 +79,8 @@ setGeneric("plotScan", function(object, ...) standardGeneric("plotScan"))
setGeneric("plotSpec", function(object, ...) standardGeneric("plotSpec"))
setGeneric("plotSurf", function(object, ...) standardGeneric("plotSurf"))
setGeneric("plotTIC", function(object, ...) standardGeneric("plotTIC"))
setGeneric("plotTree", function(object, ...) standardGeneric("plotTree"))
setGeneric("present", function(object, class, minfrac) standardGeneric("present"))
setGeneric("profinfo", function(object) standardGeneric("profinfo"))
setGeneric("profinfo<-", function(object, value) standardGeneric("profinfo<-"))
setGeneric("profMedFilt", function(object, ...) standardGeneric("profMedFilt"))
Expand Down Expand Up @@ -106,9 +113,24 @@ setGeneric("sampnames<-", function(object, value) standardGeneric("sampnames<-")
setGeneric("scanrange", function(object, ...) standardGeneric("scanrange"))
setGeneric("scanrange<-", function(object, value) standardGeneric("scanrange<-"))
setGeneric("sortMz", function(object, ...) standardGeneric("sortMz"))
setGeneric("specDist", function(object, ...) standardGeneric("specDist"))
setGeneric("specDist.meanMZmatch",
function(peakTable1, peakTable2, matchdist=1, matchrate=1,
mzabs=0.001, mzppm=10, symmetric=TRUE)
standardGeneric("specDist.meanMZmatch"))
setGeneric("specDist.cosine",
function(peakTable1, peakTable2, mzabs = 0.001, mzppm = 10,
mzExp = 0.6, intExp = 3, nPdiff = 2, nPmin = 8,
symmetric = FALSE)
standardGeneric("specDist.cosine"))
setGeneric("specDist.peakCount",
function(peakTable1, peakTable2, mzabs=0.001, mzppm=10,symmetric=FALSE)
standardGeneric("specDist.peakCount"))

## W
setGeneric("write.cdf", function(object, ...) standardGeneric("write.cdf"))
setGeneric("write.mzdata", function(object, ...) standardGeneric("write.mzdata"))
setGeneric("write.mzQuantML", function(object, ...) standardGeneric("write.mzQuantML"))

## X
setGeneric("xcmsSource", function(object, ...) standardGeneric("xcmsSource"))
Expand Down
5 changes: 5 additions & 0 deletions R/DataClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,8 @@ setClass("rampSource",
paste("Could not open mzML/mzXML/mzData file:", object)
} else TRUE
})

############################################################
## xcmsPeaks
setClass("xcmsPeaks", contains = "matrix")

0 comments on commit 09d92f2

Please sign in to comment.