├── .BBSoptions
├── .Rbuildignore
├── .editorconfig
├── .github
├── .gitignore
└── workflows
│ └── check-bioc.yml
├── .gitignore
├── DESCRIPTION
├── LICENSE
├── NAMESPACE
├── NEWS.md
├── R
├── AllGenerics.R
├── DataClasses.R
├── Deprecated.R
├── MPI.R
├── MsExperiment-functions.R
├── MsExperiment.R
├── XcmsExperiment-functions.R
├── XcmsExperiment-plotting.R
├── XcmsExperiment.R
├── XcmsExperimentHdf5-functions.R
├── XcmsExperimentHdf5.R
├── c.R
├── cwTools.R
├── databases.R
├── do_adjustRtime-functions.R
├── do_findChromPeaks-functions.R
├── do_groupChromPeaks-functions.R
├── fastMatch.R
├── functions-Chromatogram.R
├── functions-IO.R
├── functions-MsFeatureData.R
├── functions-OnDiskMSnExp.R
├── functions-Params.R
├── functions-ProcessHistory.R
├── functions-XCMSnExp.R
├── functions-XChromatogram.R
├── functions-XChromatograms.R
├── functions-binning.R
├── functions-imputation.R
├── functions-utils.R
├── functions-xcmsEIC.R
├── functions-xcmsFragments.R
├── functions-xcmsRaw.R
├── functions-xcmsSet.R
├── functions-xcmsSwath.R
├── hidden_aliases.R
├── init.R
├── loadXcmsData.R
├── matchpeaks.R
├── method-filterFeatures.R
├── methods-Chromatogram.R
├── methods-IO.R
├── methods-MChromatograms.R
├── methods-MsFeatureData.R
├── methods-OnDiskMSnExp.R
├── methods-Params.R
├── methods-ProcessHistory.R
├── methods-XCMSnExp.R
├── methods-XChromatogram.R
├── methods-XChromatograms.R
├── methods-group-features.R
├── methods-xcmsEIC.R
├── methods-xcmsFileSource.R
├── methods-xcmsFragments.R
├── methods-xcmsPeaks.R
├── methods-xcmsRaw.R
├── methods-xcmsSet.R
├── models.R
├── mzClust.R
├── plotQC.R
├── specDist.R
├── write.mzquantML.R
├── writemzdata.R
├── writemztab.R
├── xcmsSource.R
└── zzz.R
├── README.md
├── _pkgdown.yml
├── data
├── faahko_sub.RData
├── faahko_sub2.RData
├── xdata.RData
└── xmse.RData
├── inst
├── CHANGELOG
├── CITATION
├── mgf
│ ├── metlin-2724.mgf
│ ├── metlin-68898.mgf
│ └── metlin-72445.mgf
└── xsd
│ └── mzQuantML_1_0_0.xsd
├── logo.png
├── longtests
├── testthat.R
└── testthat
│ ├── test_do_adjustRtime-functions.R
│ ├── test_do_findChromPeaks-functions.R
│ ├── test_do_groupChromPeaks-functions.R
│ ├── test_functions-OnDiskMSnExp.R
│ ├── test_methods-OnDiskMSnExp.R
│ ├── test_methods-XCMSnExp.R
│ ├── test_old_BiocParallel.R
│ ├── test_old_absentPresent.R
│ ├── test_old_functions-IO.R
│ ├── test_old_functions-xcmsRaw.R
│ ├── test_old_functions-xcmsSet.R
│ ├── test_old_methods-IO.R
│ ├── test_old_methods-xcmsRaw.R
│ ├── test_old_methods-xcmsSet.R
│ ├── test_old_xcmsSource.R
│ └── test_specDist.R
├── man
├── AutoLockMass-methods.Rd
├── BlankFlag.Rd
├── DratioFilter.Rd
├── GenericParam.Rd
├── LamaParama.Rd
├── PercentMissingFilter.Rd
├── ProcessHistory-class.Rd
├── RsdFilter.Rd
├── SSgauss.Rd
├── XCMSnExp-class.Rd
├── XCMSnExp-filter-methods.Rd
├── XCMSnExp-inherited-methods.Rd
├── XCMSnExp-peak-grouping-results.Rd
├── XChromatogram.Rd
├── XcmsExperiment.Rd
├── XcmsExperimentHdf5.Rd
├── absent-methods.Rd
├── adjustRtime.Rd
├── applyAdjustedRtime.Rd
├── binYonX.Rd
├── breaks_on_binSize.Rd
├── breaks_on_nBins.Rd
├── c.xcmsSet.Rd
├── calibrate-calibrant-mass.Rd
├── calibrate.Rd
├── chromPeakChromatograms.Rd
├── chromPeakSpectra.Rd
├── chromPeakSummary.Rd
├── chromatogram-method.Rd
├── colMax.Rd
├── collect-methods.Rd
├── correlate-Chromatogram.Rd
├── descendZero.Rd
├── diffreport-methods.Rd
├── dirname.Rd
├── do_adjustRtime_peakGroups.Rd
├── do_findChromPeaks_centWave.Rd
├── do_findChromPeaks_centWaveWithPredIsoROIs.Rd
├── do_findChromPeaks_massifquant.Rd
├── do_findChromPeaks_matchedFilter.Rd
├── do_findPeaks_MSW.Rd
├── do_groupChromPeaks_density.Rd
├── do_groupChromPeaks_nearest.Rd
├── do_groupPeaks_mzClust.Rd
├── doubleMatrix.Rd
├── estimatePrecursorIntensity.Rd
├── etg.Rd
├── exportMetaboAnalyst.Rd
├── extractMsData-method.Rd
├── feature-grouping.Rd
├── featureChromatograms.Rd
├── featureSpectra.Rd
├── featureSummary.Rd
├── figures
│ └── logo.png
├── fillChromPeaks.Rd
├── fillPeaks-methods.Rd
├── fillPeaks.MSW-methods.Rd
├── fillPeaks.chrom-methods.Rd
├── filter-MChromatograms.Rd
├── filterFeatures.Rd
├── filtfft.Rd
├── findChromPeaks-Chromatogram-CentWaveParam.Rd
├── findChromPeaks-Chromatogram-MatchedFilter.Rd
├── findChromPeaks-centWave.Rd
├── findChromPeaks-centWaveWithPredIsoROIs.Rd
├── findChromPeaks-massifquant.Rd
├── findChromPeaks-matchedFilter.Rd
├── findChromPeaks.Rd
├── findChromPeaksIsolationWindow.Rd
├── findEqualGreater.Rd
├── findMZ.Rd
├── findPeaks-MSW.Rd
├── findPeaks-methods.Rd
├── findPeaks.MS1-methods.Rd
├── findPeaks.MSW-xcmsRaw-method.Rd
├── findPeaks.addPredictedIsotopeFeatures-methods.Rd
├── findPeaks.centWave-methods.Rd
├── findPeaks.centWaveWithPredictedIsotopeROIs-methods.Rd
├── findPeaks.massifquant-methods.Rd
├── findPeaks.matchedFilter-xcmsRaw-method.Rd
├── findneutral.Rd
├── getEIC-methods.Rd
├── getPeaks-methods.Rd
├── getScan-methods.Rd
├── getSpec-methods.Rd
├── getXcmsRaw-methods.Rd
├── group-methods.Rd
├── group.density.Rd
├── group.mzClust.Rd
├── group.nearest.Rd
├── groupChromPeaks.Rd
├── groupFeatures-abundance-correlation.Rd
├── groupFeatures-eic-similarity.Rd
├── groupFeatures-similar-rtime.Rd
├── groupOverlaps.Rd
├── groupnames-XCMSnExp.Rd
├── groupnames-methods.Rd
├── groupval-methods.Rd
├── hidden_aliases.Rd
├── highlightChromPeaks.Rd
├── image.xcmsRaw.Rd
├── imputeLinInterpol.Rd
├── imputeRowMin.Rd
├── imputeRowMinRand.Rd
├── isolationWindowTargetMz-OnDiskMSnExp-method.Rd
├── levelplot.xcmsRaw.Rd
├── loadRaw-methods.Rd
├── loadXcmsData.Rd
├── manualChromPeaks.Rd
├── medianFilter.Rd
├── msn2xcmsRaw.Rd
├── na.flatfill.Rd
├── overlappingFeatures.Rd
├── panel.cor.Rd
├── peakPlots-methods.Rd
├── peakTable-methods.Rd
├── peaksWithCentWave.Rd
├── peaksWithMatchedFilter.Rd
├── phenoDataFromPaths.Rd
├── plot.xcmsEIC.Rd
├── plotAdjustedRtime.Rd
├── plotChrom-methods.Rd
├── plotChromPeakDensity.Rd
├── plotChromPeaks.Rd
├── plotChromatogramsOverlay.Rd
├── plotEIC-methods.Rd
├── plotFeatureGroups.Rd
├── plotMsData.Rd
├── plotPeaks-methods.Rd
├── plotPrecursorIons.Rd
├── plotQC.Rd
├── plotRaw-methods.Rd
├── plotScan-methods.Rd
├── plotSpec-methods.Rd
├── plotSurf-methods.Rd
├── plotTIC-methods.Rd
├── plotrt-methods.Rd
├── profGenerate.Rd
├── profMat-xcmsSet.Rd
├── profMedFilt-methods.Rd
├── profMethod-methods.Rd
├── profRange-methods.Rd
├── profStep-methods.Rd
├── pval.Rd
├── rawEIC-methods.Rd
├── rawMat-methods.Rd
├── reconstructChromPeakSpectra.Rd
├── rectUnique.Rd
├── refineChromPeaks.Rd
├── removeIntensity-Chromatogram.Rd
├── retcor-methods.Rd
├── retcor.obiwarp-methods.Rd
├── retcor.peakgroups-methods.Rd
├── retexp.Rd
├── rla.Rd
├── sampnames-methods.Rd
├── showError-xcmsSet-method.Rd
├── specDist-methods.Rd
├── specDist.cosine-methods.Rd
├── specDist.meanMZmatch-methods.Rd
├── specDist.peakCount-methods.Rd
├── specNoise.Rd
├── specPeaks.Rd
├── split.xcmsRaw.Rd
├── split.xcmsSet.Rd
├── stitch-methods.Rd
├── sub-xcmsRaw-logicalOrNumeric-missing-missing-method.Rd
├── updateObject-xcmsSet-method.Rd
├── useOriginalCode.Rd
├── verify.mzQuantML.Rd
├── write.cdf-methods.Rd
├── write.mzQuantML.Rd
├── write.mzdata-methods.Rd
├── writeMSData-XCMSnExp-character-method.Rd
├── writeMzTab.Rd
├── xcms-deprecated.Rd
├── xcmsEIC-class.Rd
├── xcmsFileSource-class.Rd
├── xcmsFragments-class.Rd
├── xcmsFragments.Rd
├── xcmsPeaks-class.Rd
├── xcmsRaw-class.Rd
├── xcmsRaw.Rd
├── xcmsSet-class.Rd
├── xcmsSet.Rd
├── xcmsSource-class.Rd
└── xcmsSource-methods.Rd
├── src
├── Makevars
├── Makevars.win
├── binarySearch.h
├── binners.c
├── binners.h
├── fastMatch.c
├── massifquant
│ ├── DataKeeper.cpp
│ ├── DataKeeper.h
│ ├── OpOverload.cpp
│ ├── OpOverload.h
│ ├── SegProc.cpp
│ ├── SegProc.h
│ ├── TrMgr.cpp
│ ├── TrMgr.h
│ ├── Tracker.cpp
│ ├── Tracker.h
│ ├── dpq.h
│ ├── nmath.h
│ └── xcms_massifquant.cpp
├── mzClust_hclust.c
├── mzROI.c
├── obiwarp
│ ├── lmat.h
│ ├── mat.cpp
│ ├── mat.h
│ ├── vec.cpp
│ ├── vec.h
│ ├── xcms_dynprog.cpp
│ ├── xcms_dynprog.h
│ └── xcms_lmat.cpp
├── util.c
├── util.h
├── xcms.c
├── xcms.h
└── xcms_obiwarp.cpp
├── tests
├── testthat.R
└── testthat
│ ├── test_Chromatogram.R
│ ├── test_MsExperiment-functions.R
│ ├── test_MsExperiment.R
│ ├── test_MsFeatureData.R
│ ├── test_Param_classes.R
│ ├── test_XcmsExperiment-functions.R
│ ├── test_XcmsExperiment-plotting.R
│ ├── test_XcmsExperiment.R
│ ├── test_XcmsExperimentHdf5-functions.R
│ ├── test_XcmsExperimentHdf5.R
│ ├── test_do_adjustRtime-functions.R
│ ├── test_do_findChromPeaks-functions.R
│ ├── test_do_groupChromPeaks-functions.R
│ ├── test_function-filtering.R
│ ├── test_functions-Chromatogram.R
│ ├── test_functions-OnDiskMSnExp.R
│ ├── test_functions-ProcessHistory.R
│ ├── test_functions-XCMSnExp.R
│ ├── test_functions-XChromatogram.R
│ ├── test_functions-XChromatograms.R
│ ├── test_functions-binning.R
│ ├── test_functions-imputation.R
│ ├── test_functions-utils.R
│ ├── test_functions-xcmsSwath.R
│ ├── test_loadXcmsData.R
│ ├── test_matchpeaks.R
│ ├── test_methods-Chromatogram.R
│ ├── test_methods-MChromatograms.R
│ ├── test_methods-OnDiskMSnExp.R
│ ├── test_methods-XCMSnExp.R
│ ├── test_methods-XChromatogram.R
│ ├── test_methods-XChromatograms.R
│ └── test_methods-group-features.R
└── vignettes
├── LC-MS-feature-grouping.Rmd
├── benchmarking.Rmd-notrun
├── biomed-central.csl
├── new_functionality.Rmd-notrun
├── references.bib
├── swath_tomato.Rmd_notrun
├── xcms-direct-injection.Rmd
├── xcms-lcms-ms.Rmd
├── xcms-lcms-ms.bioschemas.html
├── xcms.Rmd
└── xcms.bioschemas.html
/.BBSoptions:
--------------------------------------------------------------------------------
1 | RunLongTests: TRUE
2 |
--------------------------------------------------------------------------------
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | .editorconfig
2 | local_data
3 | .git
4 | .travis.yml
5 | .org
6 | ^.*\.Rproj$
7 | ^\.Rproj\.user$
8 | README.md
9 | Rplots.pdf
10 | .DS_Store
11 | ^\.github$
12 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # top-most EditorConfig file
2 | root = true
3 |
4 | # Unix-style newlines with a newline ending every file
5 | [*]
6 | charset = utf-8
7 | end_of_line = lf
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.R]
12 | indent_style = space
13 | indent_size = 4
14 | max_line_length = 80
15 |
16 | [Makefile]
17 | indent_style = tab
18 |
19 | [.travis.yml]
20 | indent_style = space
21 | indent_size = 2
--------------------------------------------------------------------------------
/.github/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | \#*\#
3 |
4 | inst/doc/example_box/
5 | inst/doc/example_eic/
6 | inst/doc/example_spec/
7 | inst/doc/xcmsDirect.pdf
8 | inst/doc/xcmsInstall.pdf
9 | inst/doc/xcmsMSn.pdf
10 | inst/doc/xcmsPreprocess.pdf
11 |
12 | *.o
13 | src/xcms.so
14 | src/boost/
15 | src/boost_aux/
16 | src/pwiz/
17 |
18 | readme.org
19 | local_data/
20 | .Rproj.user
21 |
22 | .Rhistory
23 | xcms.Rproj
24 |
25 | Rplots.pdf
26 | .DS_Store
27 |
28 | *.dll
--------------------------------------------------------------------------------
/R/databases.R:
--------------------------------------------------------------------------------
1 |
2 | .ppm<-function(Mr, Mm){ ## Mr Mz real Mm Mz Measured
3 | ppm<-abs((10^6)*(Mr-Mm)/Mm) ##abs for positive number
4 | return(ppm)
5 | }
6 |
7 | ppmDev<-function(Mr, ppmE=5){
8 | error<-(ppmE/10^6)*Mr ## just take the ppm as a percentage
9 | deviation<-c(Mr+error, Mr-error)## 1 is high 2 is low
10 | return(deviation)
11 | }
12 |
13 | read.mascot<-function(file, type="csv"){
14 | ## Experimental
15 | if(!file.exists(file))
16 | stop("File doesnt exist")
17 | if(type=="csv"){
18 | lines<-readLines(file) ##check to see if file is ~ normal
19 | if (grep("Protein hit", lines)) {
20 | x<-lines[-seq(grep("Protein hit", lines)+1)]
21 | myDF <-read.csv(textConnection(x), header=T)
22 | } else {
23 | stop("Noncompatable csv file\n")
24 | }
25 | } else if (type=="xml"){
26 | stop("XML files are currently not supported, support comming soon")
27 | }
28 | return(myDF)
29 | }
30 |
31 | # KeggSearch <- function(object, DBsearchMS) {
32 | #
33 | # libname <- 'KEGGSOAP'
34 | # KEGG.status <- try(require(libname, character.only = TRUE, quietly=TRUE))
35 | #
36 | # if (class(KEGG.status) == "try-error")
37 | # stop("Couldn't load KEGGSOAP\n")
38 | #
39 | # if(class(object)=="xcmsSet"){
40 | # groupmat<-groups(object)
41 | # neutralmass <- groupmat[,"mzmed"] + ifelse(DBsearchMS < 0, 1, -1)
42 | #
43 | # KEGGcmpd<-array(0, dim=length(neutralmass))
44 | # for(i in 1:length(neutralmass)){
45 | # KEGGcmpd[i]<-search.compounds.by.mass(neutralmass, range(ppmDev(neutralmass[i], DBsearchMS)))[1]
46 | # }
47 | # return(KEGGcmpd)
48 | # }
49 | # }
50 |
--------------------------------------------------------------------------------
/R/fastMatch.R:
--------------------------------------------------------------------------------
1 |
2 | fastMatch <- function(x,y,tol=0.001, symmetric=FALSE) {
3 |
4 | if (any(is.na(y)))
5 | stop("NA's are not allowed in y !\n")
6 | ok <- !(is.na(x))
7 | ans <- order(x)
8 | keep <- seq_along(ok)[ok]
9 | xidx <- ans[ans %in% keep]
10 | xs <- x[xidx]
11 | yidx <- order(y)
12 | ys <- y[yidx]
13 | if (!is.double(xs))
14 | xs <- as.double(xs)
15 | if (!is.double(ys))
16 | ys<- as.double(ys)
17 | if (!is.integer(xidx))
18 | xidx <- as.integer(xidx)
19 | if (!is.integer(yidx))
20 | yidx <- as.integer(yidx)
21 |
22 | fm <- .Call("fastMatch", xs, ys, xidx, yidx, as.integer(length(x)), as.double(tol) , PACKAGE ='xcms' )
23 | fm2 <- vector("list", length=length(fm))
24 | ##stop("!")
25 | if (symmetric){
26 | for (a in 1:length(fm)) {
27 | if (!is.null(fm[[a]][1])){
28 | tmp<-NULL
29 | for (b in 1:length(fm[[a]])){
30 | if ((abs(x[a]-y[fm[[a]]][b]) == min(abs(x[a]-y[fm[[a]][b]]),
31 | abs(x[a] -y[fm[[a]][b]-1]),
32 | abs(x[a] -y[fm[[a]][b]+1]),
33 | abs(x[a-1]-y[fm[[a]][b]]),
34 | abs(x[a+1]-y[fm[[a]][b]]), na.rm=T)
35 | )) {
36 | tmp<-c(tmp, fm[[a]][b])
37 | }
38 | }
39 | fm2[[a]]<-tmp
40 | }
41 | }
42 | }else {
43 | fm2 <- fm}
44 | fm2
45 | }
46 |
--------------------------------------------------------------------------------
/R/hidden_aliases.R:
--------------------------------------------------------------------------------
1 | #' @title Internal page for hidden aliases
2 | #'
3 | #' @aliases class:Param Param-class
4 | #'
5 | #' @description
6 | #'
7 | #' For S4 methods that require a documentation entry but only clutter the index.
8 | #'
9 | #' @usage NULL
10 | #' @format NULL
11 | #' @keywords internal
12 | #' @return Not applicable
13 | #' @docType methods
14 | hidden_aliases <- NULL
15 |
--------------------------------------------------------------------------------
/R/methods-xcmsEIC.R:
--------------------------------------------------------------------------------
1 | ## Methods for xcmsEIC
2 | #' @include functions-xcmsEIC.R
3 |
4 | ############################################################
5 | #' @rdname hidden_aliases
6 | setMethod("show", "xcmsEIC", function(object) {
7 |
8 | cat("An \"xcmsEIC\" object with", length(object@eic), "samples\n\n")
9 |
10 | cat("Time range: ", paste(round(range(object@rtrange), 1), collapse = "-"),
11 | " seconds (", paste(round(range(object@rtrange)/60, 1), collapse = "-"),
12 | " minutes)\n", sep = "")
13 | cat("Mass range:", paste(round(range(object@mzrange, na.rm = TRUE), 4), collapse = "-"),
14 | "m/z\n")
15 | cat("EICs per sample:", nrow(object@mzrange), "\n")
16 | cat("Retention times:", object@rt, "\n")
17 | cat("xcmsSet group names: ")
18 | if (length(object@groupnames))
19 | cat("present")
20 | else
21 | cat("absent")
22 | cat("\n\n")
23 | memsize <- object.size(object)
24 | cat("Memory usage:", signif(memsize/2^20, 3), "MB\n")
25 | })
26 |
27 | ############################################################
28 | ## groupnames
29 | setMethod("groupnames", "xcmsEIC", function(object) {
30 |
31 | object@groupnames
32 | })
33 |
34 | ############################################################
35 | ## sampnames
36 | setMethod("sampnames", "xcmsEIC", function(object) {
37 |
38 | names(object@eic)
39 | })
40 |
41 | ############################################################
42 | ## mzrange
43 | setMethod("mzrange", "xcmsEIC", function(object) {
44 |
45 | object@mzrange
46 | })
47 |
48 | ############################################################
49 | ## rtrange
50 | setMethod("rtrange", "xcmsEIC", function(object) {
51 |
52 | object@rtrange
53 | })
54 |
--------------------------------------------------------------------------------
/R/methods-xcmsFileSource.R:
--------------------------------------------------------------------------------
1 | ##' @description Return the file name from an xcmsFileSource object.
2 | ##' @param object The xcmsFileSource object from which the file name
3 | ##' should be returned.
4 | ##' @param ... Not used.
5 | ##' @return A character representing the file name.
6 | ##' @noRd
7 | setMethod("fileName", "xcmsFileSource", function(object, ...) {
8 | return(as.character(object))
9 | })
10 |
11 | ##' Reads the MS1 and/or MSn data from an netCDF or mzML file.
12 | ##' @param object The xcmsFileSource object representing the file name.
13 | ##' @param includeMSn Whether MSn data should be imported too.
14 | ##' @return Returns a list with rt, tic, scanindex, mz and intensity.
15 | ##' @noRd
16 | setMethod("loadRaw", "xcmsFileSource", function(object, includeMSn = FALSE) {
17 | return(readRawData(fileName(object), includeMSn = includeMSn))
18 | })
19 |
--------------------------------------------------------------------------------
/R/methods-xcmsPeaks.R:
--------------------------------------------------------------------------------
1 | ## Methods for xcmsPeaks
2 | #' @include DataClasses.R
3 |
4 | #' @rdname hidden_aliases
5 | setMethod("show", "xcmsPeaks", function(object) {
6 | cat("A matrix of", nrow(object), "peaks\n")
7 | cat("Column names:\n")
8 | print(colnames(object))
9 | })
10 |
--------------------------------------------------------------------------------
/R/models.R:
--------------------------------------------------------------------------------
1 | SSgauss <- selfStart(~ h*exp(-(x-mu)^2/(2*sigma^2)), function(mCall, data, LHS, ...) {
2 |
3 | xy <- sortedXyData(mCall[["x"]], LHS, data)
4 |
5 | len <- dim(xy)[1]
6 | xyarea <- sum((xy[2:len,2]+xy[1:(len-1),2])*(xy[2:len,1]-xy[1:(len-1),1]))/2
7 | maxpos <- which.max(xy[,2])
8 |
9 | mu <- xy[maxpos,1]
10 | h <- xy[maxpos,2]
11 | sigma <- xyarea/(h*sqrt(2*pi))
12 |
13 | value <- c(mu, sigma, h)
14 | names(value) <- mCall[c("mu", "sigma", "h")]
15 | value
16 |
17 | }, c("mu", "sigma", "h"))
18 |
19 | etg <- function(x, H, t1, tt, k1, kt, lambda1, lambdat, alpha, beta)
20 | 2*H*exp(0.5)/((1+lambda1*exp(k1*(t1-x)))^alpha + (1+lambdat*exp(kt*(x-tt)))^beta - 1)
21 |
--------------------------------------------------------------------------------
/R/xcmsSource.R:
--------------------------------------------------------------------------------
1 | ## Methods related to xcmsSource
2 | #' @include AllGenerics.R DataClasses.R
3 |
4 | setMethod("xcmsSource", "character", function(object, filetype = character()) {
5 | if (!file.exists(object))
6 | stop("xcmsSource: file not found: ", object)
7 | return(new("xcmsFileSource", object))
8 | })
9 |
--------------------------------------------------------------------------------
/R/zzz.R:
--------------------------------------------------------------------------------
1 | .onAttach <- function(libname, pkgname) {
2 | packageStartupMessage(
3 | paste("\nThis is xcms version", packageVersion("xcms"), "\n"))
4 | }
5 |
6 | .onLoad <- function(libname, pkgname) {
7 | # require(methods)
8 | .setXCMSOptions(pkgname)
9 | }
10 |
11 | .onUnload <- function(libpath) {
12 | ## mzR:::rampCloseAll() # Makes only sense if we used ramp.
13 | library.dynam.unload("xcms", libpath)
14 | }
15 |
--------------------------------------------------------------------------------
/_pkgdown.yml:
--------------------------------------------------------------------------------
1 | url: https://sneumann.github.io/xcms
2 |
3 | template:
4 | bootstrap: 5
5 | bootswatch: flatly
6 |
--------------------------------------------------------------------------------
/data/faahko_sub.RData:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sneumann/xcms/f8fa7f307ff53b17e9b9731f3a0923718e8abd86/data/faahko_sub.RData
--------------------------------------------------------------------------------
/data/faahko_sub2.RData:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sneumann/xcms/f8fa7f307ff53b17e9b9731f3a0923718e8abd86/data/faahko_sub2.RData
--------------------------------------------------------------------------------
/data/xdata.RData:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sneumann/xcms/f8fa7f307ff53b17e9b9731f3a0923718e8abd86/data/xdata.RData
--------------------------------------------------------------------------------
/data/xmse.RData:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sneumann/xcms/f8fa7f307ff53b17e9b9731f3a0923718e8abd86/data/xmse.RData
--------------------------------------------------------------------------------
/inst/CITATION:
--------------------------------------------------------------------------------
1 | citHeader("To cite the XCMS package in publications use:")
2 |
3 | citEntry(entry="article",
4 | author="Smith, C.A. and Want, E.J. and O'Maille, G. and Abagyan,R. and Siuzdak, G.",
5 | title="XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification",
6 | journal="Analytical Chemistry",
7 | year="2006",
8 | volume="78",
9 | pages="779--787",
10 | textVersion = paste("Smith, C.A. and Want, E.J. and O'Maille, G. and Abagyan,R. and Siuzdak, G.:",
11 | "XCMS: Processing mass spectrometry data for metabolite profiling",
12 | "using nonlinear peak alignment, matching and identification,",
13 | "Analytical Chemistry, 78:779-787 (2006)"))
14 |
15 | citEntry(entry="article",
16 | author="Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann",
17 | title="Highly sensitive feature detection for high resolution LC/MS",
18 | journal="BMC Bioinformatics",
19 | year="2008",
20 | volume="9",
21 | pages="504",
22 | textVersion = paste("Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann:",
23 | "Highly sensitive feature detection for high resolution LC/MS",
24 | "BMC Bioinformatics, 9:504 (2008)"))
25 |
26 | citEntry(entry="article",
27 | author="H. Paul Benton, Elizabeth J. Want and Timothy M. D. Ebbels",
28 | title="Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data",
29 | journal="BIOINFORMATICS",
30 | year="2010",
31 | volume="26",
32 | pages="2488",
33 | textVersion = paste("H. Paul Benton, Elizabeth J. Want and Timothy M. D. Ebbels",
34 | "Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data",
35 | "Bioinformatics, 26:2488 (2010)"))
36 |
37 | citFooter(paste("Some functions (e.g. group.mzClust, findPeaks.MSW() or retcor.obiwarp() use 3rd",
38 | "party algorithms, see manpages and related packages",
39 | "for respective citations."))
40 |
--------------------------------------------------------------------------------
/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sneumann/xcms/f8fa7f307ff53b17e9b9731f3a0923718e8abd86/logo.png
--------------------------------------------------------------------------------
/longtests/testthat/test_do_groupChromPeaks-functions.R:
--------------------------------------------------------------------------------
1 | test_that("do_groupPeaks_mzClust works", {
2 | fts <- peaks(fticr_xs)
3 | res <- do_groupPeaks_mzClust(peaks = fts,
4 | sampleGroups = sampclass(fticr_xs))
5 | res_2 <- do_groupPeaks_mzClust(peaks = fts,
6 | sampleGroups = sampclass(fticr_xs),
7 | minFraction = 0, absMz = 2)
8 | expect_true(nrow(res$featureDefinitions) > nrow(res_2$featureDefinitions))
9 |
10 | res_x <- group(fticr_xs, method = "mzClust")
11 | expect_equal(res_x@groups, res$featureDefinitions)
12 | expect_equal(res_x@groupidx, res$peakIndex)
13 | })
14 |
15 | test_that("do_groupChromPeaks_nearest works", {
16 | xs <- faahko_xs
17 | features <- peaks(xs)
18 | sampleGroups <- sampclass(xs)
19 | mzVsRtBalance <- 10
20 | mzCheck <- 0.2
21 | rtCheck <- 15
22 | kNN <- 10
23 |
24 | res <- do_groupChromPeaks_nearest(features, sampleGroups)
25 | res_2 <- do_groupChromPeaks_nearest(features, sampleGroups, absRt = 3)
26 | expect_true(nrow(res$featureDefinitions) < nrow(res_2$featureDefinitions))
27 | res_x <- group(xs, method = "nearest")
28 | expect_equal(res_x@groups, res$featureDefinitions)
29 | })
30 |
--------------------------------------------------------------------------------
/longtests/testthat/test_functions-OnDiskMSnExp.R:
--------------------------------------------------------------------------------
1 | test_that(".obiwarp works", {
2 |
3 | xs <- faahko_xs
4 | od <- faahko_od
5 | xod <- faahko_xod
6 | ## Feature alignment on those:
7 | ## object <- findChromPeaks(faahko_od, param = CentWaveParam(noise = 10000,
8 | ## snthresh = 40))
9 | prm <- ObiwarpParam(binSize = 1)
10 | xs_2 <- retcor.obiwarp(xs, profStep = binSize(prm))
11 | expect_equal(xs_2@rt$raw[[2]], xs_2@rt$corrected[[2]])
12 | expect_true(sum(xs_2@rt$raw[[1]] != xs_2@rt$corrected[[1]]) > 500)
13 | expect_true(sum(xs_2@rt$raw[[3]] != xs_2@rt$corrected[[3]]) > 500)
14 |
15 | ## Manually specify center Sample
16 | centerSample(prm) <- 3
17 | xs_2 <- retcor.obiwarp(xs, profStep = binSize(prm), center = centerSample(prm))
18 | expect_equal(xs_2@rt$raw[[centerSample(prm)]],
19 | xs_2@rt$corrected[[centerSample(prm)]])
20 | res <- .obiwarp(od, param = prm)
21 | expect_equal(res[[3]], unname(rtime(xod, bySample = TRUE)[[3]]))
22 | expect_equal(xs_2@rt$corrected, res)
23 | ## change some settings
24 | gapInit(prm) <- 3.1
25 | gapExtend(prm) <- 0.9
26 | xs_2 <- retcor.obiwarp(xs, profStep = binSize(prm), gapInit = gapInit(prm),
27 | center = centerSample(prm), gapExtend = gapExtend(prm))
28 | expect_equal(xs_2@rt$raw[[centerSample(prm)]],
29 | xs_2@rt$corrected[[centerSample(prm)]])
30 | res <- .obiwarp(od, param = prm)
31 | expect_equal(xs_2@rt$corrected, res)
32 | })
33 |
--------------------------------------------------------------------------------
/longtests/testthat/test_old_BiocParallel.R:
--------------------------------------------------------------------------------
1 | test_that("BiocParallel works with xcmsSet", {
2 | fs <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"),
3 | system.file('cdf/KO/ko19.CDF', package = "faahKO"))
4 |
5 | ## Default.
6 | bpp <- bpparam()
7 | ## bpprogressbar(bpp) <- TRUE
8 | xs2 <- xcmsSet(fs, BPPARAM=bpp, method = "centWave", noise = 10000,
9 | snthresh = 50, profparam = list(profstep = 0))
10 | expect_equal(filepaths(xs2), fs)
11 | bpp <- SerialParam()
12 | xs3 <- xcmsSet(fs, BPPARAM=bpp, method = "centWave", noise = 10000,
13 | snthresh = 50, profparam = list(profstep = 0))
14 | expect_equal(filepaths(xs3), fs)
15 | ## Drop the processHistory
16 | xs2@.processHistory <- list()
17 | xs3@.processHistory <- list()
18 | expect_equal(xs2, xs3)
19 | })
20 |
--------------------------------------------------------------------------------
/longtests/testthat/test_old_functions-IO.R:
--------------------------------------------------------------------------------
1 | test_that("readRawData works", {
2 | cdf_file <- system.file('cdf/KO/ko15.CDF', package = "faahKO")
3 |
4 | ## loadRaw
5 | lr_res <- loadRaw(xcmsSource(cdf_file))
6 | rr_res <- readRawData(cdf_file)
7 | expect_equal(lr_res, rr_res[names(lr_res)])
8 |
9 | mz_file <- system.file("microtofq/MM8.mzML", package = "msdata")
10 | lr_res <- loadRaw(xcmsSource(mz_file))
11 | rr_res <- readRawData(mz_file)
12 | expect_equal(lr_res, rr_res[names(lr_res)])
13 |
14 | ## Check readRawData with and without dropEmptyScans:
15 | msnfile <- system.file("microtofq/MSMSpos20_6.mzML", package = "msdata")
16 | res <- loadRaw(xcmsSource(msnfile), includeMSn = TRUE)
17 | res_2 <- readRawData(msnfile, includeMSn = TRUE)
18 | expect_equal(res, res_2)
19 | res_2 <- readRawData(msnfile, includeMSn = TRUE,
20 | dropEmptyScans = FALSE)
21 | ## Now I expect to have more data:
22 | expect_true(length(res_2$MSn$precursorIntensity) >
23 | length(res$MSn$precursorIntensity))
24 | expect_true(length(res_2$MSn$precursorIntensity) == 1612)
25 | expect_true(length(res$MSn$precursorIntensity) == 1121)
26 | ## Now, the difference is supposed to represent spectra without peaks:
27 | empties <- res_2$MSn$peaksCount == 0
28 | expect_true(sum(empties) == (1612 - 1121))
29 |
30 | ## ## Check also MSn level import. Note: this can not be run automatically
31 | ## ## because the mzML file is gzipped; xcmsSource does not support gz
32 | ## ## input! The test was performed by manually unzipping the file and
33 | ## ## running on the mzML file.
34 | ## msn <- msdata::proteomics(full.names = TRUE, pattern = "TMT_Erwinia")
35 | ## lr_res <- loadRaw(xcmsSource(msn)) ## Can not read .gz files!!!
36 | ## rr_res <- xcms:::readRawData(msn)
37 | ## expect_equal(lr_res, rr_res[names(lr_res)])
38 | ## ## Include MSn
39 | ## lr_res <- loadRaw(xcmsSource(msn), includeMSn = TRUE)
40 | ## rr_res <- xcms:::readRawData(msn, includeMSn = TRUE)
41 | ## expect_equal(lr_res, rr_res[names(lr_res)])
42 | ## ## Rocks!
43 | })
44 |
--------------------------------------------------------------------------------
/longtests/testthat/test_old_methods-IO.R:
--------------------------------------------------------------------------------
1 | test_that("write.cdf,xcmsRaw works", {
2 | file <- system.file('cdf/KO/ko15.CDF', package = "faahKO")
3 | xraw <- xcmsRaw(file, profstep = 0)
4 | cdffile <- paste(tempdir(), "ko15.cdf", sep="/")
5 | write.cdf(xraw, cdffile)
6 | xrawCopy <- xcmsRaw(cdffile)
7 | expect_true(all(xraw@env$mz == xrawCopy@env$mz))
8 | expect_true(all(xraw@env$intensity == xrawCopy@env$intensity))
9 | })
10 |
11 | test_that("write.mzQuantML,xcmsSet works", {
12 | xsg <- group(faahko)
13 | mzqFile <- paste(tempdir(), "faahKO.mzq.xml", sep="/")
14 | write.mzQuantML(xsg, mzqFile)
15 | v <- verify.mzQuantML(filename=mzqFile)
16 | expect_true(v$status == "0")
17 | })
18 |
19 |
--------------------------------------------------------------------------------
/longtests/testthat/test_old_xcmsSource.R:
--------------------------------------------------------------------------------
1 | test_that("xcmsSource works", {
2 | mz_file <- system.file("microtofq/MM8.mzML", package = "msdata")
3 | src <- xcms:::xcmsSource(mz_file)
4 | expect_true(is(src, "xcmsFileSource"))
5 | tmp <- loadRaw(src)
6 | expect_equal(names(tmp), c("rt", "acquisitionNum", "tic", "scanindex",
7 | "mz", "intensity", "polarity"))
8 |
9 | cdf_file <- system.file('cdf/KO/ko15.CDF', package = "faahKO")
10 | src <- xcms:::xcmsSource(cdf_file)
11 | expect_true(is(src, "xcmsFileSource"))
12 | tmp <- loadRaw(src)
13 | expect_equal(names(tmp), c("rt", "acquisitionNum", "tic", "scanindex",
14 | "mz", "intensity", "polarity"))
15 |
16 | ## MSn:
17 | mzmlpath <- system.file("iontrap", package = "msdata")
18 | mzmlfiles <- list.files(mzmlpath, pattern="extracted.mzML",
19 | recursive = TRUE, full.names = TRUE)
20 | src <- xcms:::xcmsSource(mzmlfiles[1])
21 | tmp <- loadRaw(src, includeMSn = TRUE)
22 |
23 | })
24 |
--------------------------------------------------------------------------------
/longtests/testthat/test_specDist.R:
--------------------------------------------------------------------------------
1 | test_that("specDist works", {
2 | data(faahko, package="faahKO")
3 | dist1 <- specDist(faahko, which(faahko@peaks[,"sample"] == 1),
4 | which(faahko@peaks[,"sample"] == 2),
5 | method = "meanMZmatch")
6 | dist2 <- specDist(faahko, which(faahko@peaks[,"sample"] == 3),
7 | which(faahko@peaks[,"sample"] == 4),
8 | method = "cosine")
9 | dist3 <- specDist(faahko, which(faahko@peaks[,"sample"] == 5),
10 | which(faahko@peaks[,"sample"] == 6),
11 | method = "peakCount")
12 | expect_equal(round(dist1, 3), 3.159)
13 | expect_equal(round(dist2, 3), 3.183)
14 | expect_equal(dist3, 129)
15 | })
16 |
17 |
--------------------------------------------------------------------------------
/man/AutoLockMass-methods.Rd:
--------------------------------------------------------------------------------
1 | \name{AutoLockMass-methods}
2 | \docType{methods}
3 | \alias{AutoLockMass}
4 | \alias{AutoLockMass-methods}
5 | \alias{AutoLockMass,xcmsRaw-method}
6 | \title{ Automatic parameter for Lock mass fixing \code{AutoLockMass} ~~}
7 | \description{
8 | \code{AutoLockMass} - This function decides where the lock mass scans are
9 | in the xcmsRaw object. This is done by using the scan time differences.
10 | }
11 | \section{Methods}{
12 | \describe{
13 | \item{object = "xcmsRaw"}{
14 | \code{signature(object = "xcmsRaw")}}
15 | }
16 | }
17 | \arguments{
18 | \item{object}{An \code{\link{xcmsRaw-class}} object}
19 | }
20 |
21 | \value{
22 | \code{AutoLockMass} A numeric vector of scan locations corresponding to lock Mass scans
23 | }
24 | \author{Paul Benton, \email{hpaul.benton08@imperial.ac.uk}}
25 | \examples{
26 | \dontrun{library(xcms)
27 | library(faahKO)
28 | ## These files do not have this problem
29 | ## to correct for but just for an example
30 | cdfpath <- system.file("cdf", package = "faahKO")
31 | cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
32 | xr<-xcmsRaw(cdffiles[1])
33 | xr
34 | ##Lets assume that the lockmass starts at 1 and is every 100 scans
35 | lockMass<-xcms:::makeacqNum(xr, freq=100, start=1)
36 | ## these are equalvent
37 | lockmass2<-AutoLockMass(xr)
38 | all((lockmass == lockmass2) == TRUE)
39 |
40 | ob<-stitch(xr, lockMass)
41 | }
42 | }
43 |
44 | \keyword{methods}
45 | \keyword{manip}
46 | \keyword{lockmass}
47 |
--------------------------------------------------------------------------------
/man/GenericParam.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/DataClasses.R, R/functions-Params.R
3 | \docType{class}
4 | \name{GenericParam-class}
5 | \alias{GenericParam-class}
6 | \alias{GenericParam}
7 | \alias{Param}
8 | \title{Generic parameter class}
9 | \usage{
10 | GenericParam(fun = character(), args = list())
11 | }
12 | \arguments{
13 | \item{fun}{\code{character} representing the name of the function.}
14 |
15 | \item{args}{\code{list} (ideally named) with the arguments to the function.}
16 | }
17 | \value{
18 | The \code{GenericParam()} function returns a \code{GenericParam}
19 | object.
20 | }
21 | \description{
22 | The \code{GenericParam} class allows to store generic parameter
23 | information such as the name of the function that was/has to be called
24 | (slot \code{fun}) and its arguments (slot \code{args}). This object is
25 | used to track the process history of the data processings of an
26 | \link{XCMSnExp} object. This is in contrast to e.g. the
27 | \code{\link[=CentWaveParam]{CentWaveParam()}} object that is passed to the actual
28 | processing method.
29 | }
30 | \section{Slots}{
31 |
32 | \describe{
33 | \item{\code{fun}}{\code{character} specifying the function name.}
34 |
35 | \item{\code{args}}{\code{list} (ideally named) with the arguments to the
36 | function.}
37 | }}
38 |
39 | \examples{
40 | prm <- GenericParam(fun = "mean")
41 |
42 | prm <- GenericParam(fun = "mean", args = list(na.rm = TRUE))
43 | }
44 | \seealso{
45 | \code{\link[=processHistory]{processHistory()}} for how to access the process history
46 | of an \link{XCMSnExp} object.
47 | }
48 | \author{
49 | Johannes Rainer
50 | }
51 |
--------------------------------------------------------------------------------
/man/SSgauss.Rd:
--------------------------------------------------------------------------------
1 | \name{SSgauss}
2 | \alias{SSgauss}
3 | \title{Gaussian Model}
4 | \description{
5 | This \code{selfStart} model evalueates the Gaussian model and its
6 | gradient. It has an \code{initial} attribute that will evalueate
7 | the inital estimates of the parameters \code{mu}, \code{sigma},
8 | and \code{h}.
9 | }
10 | \usage{
11 | SSgauss(x, mu, sigma, h)
12 | }
13 | \arguments{
14 | \item{x}{a numeric vector of values at which to evaluate the model}
15 | \item{mu}{mean of the distribution function}
16 | \item{sigma}{standard deviation of the distribution fuction}
17 | \item{h}{height of the distribution function}
18 | }
19 | \details{
20 | Initial values for \code{mu} and \code{h} are chosen from the
21 | maximal value of \code{x}. The initial value for \code{sigma} is
22 | determined from the area under \code{x} divided by \code{h*sqrt(2*pi)}.
23 | }
24 | \value{
25 | A numeric vector of the same length as \code{x}. It is the value
26 | of the expression \code{h*exp(-(x-mu)^2/(2*sigma^2)}, which is a
27 | modified gaussian function where the maximum height is treated
28 | as a separate parameter not dependent on \code{sigma}. If arguments
29 | \code{mu}, \code{sigma}, and \code{h} are names of objects, the
30 | gradient matrix with respect to these names is attached as an
31 | attribute named \code{gradient}.
32 | }
33 | \author{Colin A. Smith, \email{csmith@scripps.edu}}
34 | \seealso{
35 | \code{\link{nls}},
36 | \code{\link{selfStart}}
37 | }
38 | \keyword{nonlinear}
39 |
--------------------------------------------------------------------------------
/man/absent-methods.Rd:
--------------------------------------------------------------------------------
1 | \name{absent-methods}
2 | \docType{methods}
3 | \alias{absent}
4 | \alias{absent,xcmsSet-method}
5 | \alias{present}
6 | \alias{present,xcmsSet-method}
7 | \title{Determine which peaks are absent / present in a sample class}
8 | \description{
9 | Determine which peaks are absent / present in a sample class
10 | }
11 | \section{Methods}{
12 | \describe{
13 | \item{object = "xcmsSet"}{
14 | \code{
15 | absent(object, ...)
16 | present(object, ...)
17 | }
18 | }
19 | }}
20 | \arguments{
21 | \item{object}{\code{\link{xcmsSet-class}} object}
22 | \item{class}{Name of a sample class from \code{\link{sampclass}}}
23 | \item{minfrac}{
24 | minimum fraction of samples necessary in the class to be absent/present
25 | }
26 | }
27 | \details{
28 | Determine which peaks are absent / present in a sample class
29 | The functions treat peaks that are only present because
30 | of \code{\link{fillPeaks}} correctly, i.e. does not count them as present.
31 | }
32 |
33 | \value{
34 | An logical vector with the same length as \code{nrow(groups(object))}.
35 | }
36 | \seealso{
37 | \code{\link{group}}
38 | \code{\link{diffreport}}
39 | }
40 | \keyword{methods}
41 |
--------------------------------------------------------------------------------
/man/applyAdjustedRtime.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/functions-XCMSnExp.R
3 | \name{applyAdjustedRtime}
4 | \alias{applyAdjustedRtime}
5 | \title{Replace raw with adjusted retention times}
6 | \usage{
7 | applyAdjustedRtime(object)
8 | }
9 | \arguments{
10 | \item{object}{An \link{XCMSnExp} or \link{XcmsExperiment} object.}
11 | }
12 | \value{
13 | An \code{XCMSnExp} or \code{XcmsExperiment} object with the raw (original) retention
14 | times being replaced with the adjusted retention time.
15 | }
16 | \description{
17 | Replaces the raw retention times with the adjusted retention
18 | time or returns the object unchanged if none are present.
19 | }
20 | \details{
21 | Adjusted retention times are stored \emph{in parallel} to the adjusted
22 | retention times in \code{XCMSnExp} or \code{XcmsExperiment} objects. The
23 | \code{applyAdjustedRtime} replaces the raw (original) retention times with the
24 | adjusted retention times.
25 | }
26 | \note{
27 | Replacing the raw retention times with adjusted retention times
28 | disables the possibility to restore raw retention times using the
29 | \code{\link[=dropAdjustedRtime]{dropAdjustedRtime()}} method. This function does \strong{not} remove the
30 | retention time processing step with the settings of the alignment from
31 | the \code{\link[=processHistory]{processHistory()}} of the \code{object} to ensure that the processing
32 | history is preserved.
33 | }
34 | \examples{
35 |
36 | ## Load a test data set with detected peaks
37 | library(MSnbase)
38 | data(faahko_sub)
39 | ## Update the path to the files for the local system
40 | dirname(faahko_sub) <- system.file("cdf/KO", package = "faahKO")
41 |
42 | ## Disable parallel processing for this example
43 | register(SerialParam())
44 |
45 | xod <- adjustRtime(faahko_sub, param = ObiwarpParam())
46 |
47 | hasAdjustedRtime(xod)
48 |
49 | ## Replace raw retention times with adjusted retention times.
50 | xod <- applyAdjustedRtime(xod)
51 |
52 | ## No adjusted retention times present
53 | hasAdjustedRtime(xod)
54 |
55 | ## Raw retention times have been replaced with adjusted retention times
56 | plot(split(rtime(faahko_sub), fromFile(faahko_sub))[[1]] -
57 | split(rtime(xod), fromFile(xod))[[1]], type = "l")
58 |
59 | ## And the process history still contains the settings for the alignment
60 | processHistory(xod)
61 | }
62 | \seealso{
63 | \code{\link[=adjustRtime]{adjustRtime()}} for the function to perform the alignment (retention
64 | time correction).
65 |
66 | \if{html}{\out{
}}\preformatted{[adjustedRtime()] for the method to extract adjusted retention times from
67 | an [XCMSnExp] object.
68 |
69 | [dropAdjustedRtime] for the method to delete alignment results and to
70 | restore the raw retention times.
71 | }\if{html}{\out{
}}
72 | }
73 | \author{
74 | Johannes Rainer
75 | }
76 |
--------------------------------------------------------------------------------
/man/breaks_on_binSize.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/functions-binning.R
3 | \name{breaks_on_binSize}
4 | \alias{breaks_on_binSize}
5 | \title{Generate breaks for binning using a defined bin size.}
6 | \usage{
7 | breaks_on_binSize(fromX, toX, binSize)
8 | }
9 | \arguments{
10 | \item{fromX}{\code{numeric(1)} specifying the lowest value for the bins.}
11 |
12 | \item{toX}{\code{numeric(1)} specifying the largest value for the bins.}
13 |
14 | \item{binSize}{\code{numeric(1)} defining the size of a bin.}
15 | }
16 | \value{
17 | A numeric vector defining the lower and upper bounds of the bins.
18 | }
19 | \description{
20 | Defines breaks for \code{binSize} sized bins for values ranging
21 | from \code{fromX} to \code{toX}.
22 | }
23 | \details{
24 | This function creates breaks for bins of size \code{binSize}. The
25 | function ensures that the full data range is included in the bins, i.e. the
26 | last value (upper boundary of the last bin) is always equal \code{toX}. This
27 | however means that the size of the last bin will not always be equal to the
28 | desired bin size.
29 |
30 | See examples for more details and a comparisom to R's \code{seq()} function.
31 | }
32 | \examples{
33 | ## Define breaks with a size of 0.13 for a data range from 1 to 10:
34 | breaks_on_binSize(1, 10, 0.13)
35 | ## The size of the last bin is however larger than 0.13:
36 | diff(breaks_on_binSize(1, 10, 0.13))
37 | ## If we would use seq, the max value would not be included:
38 | seq(1, 10, by = 0.13)
39 |
40 | ## In the next example we use binSize that leads to an additional last bin with
41 | ## a smaller binSize:
42 | breaks_on_binSize(1, 10, 0.51)
43 | ## Again, the max value is included, but the size of the last bin is < 0.51.
44 | diff(breaks_on_binSize(1, 10, 0.51))
45 | ## Using just seq would result in the following bin definition:
46 | seq(1, 10, by = 0.51)
47 | ## Thus it defines one bin (break) less.
48 | }
49 | \seealso{
50 | \code{\link[=binYonX]{binYonX()}} for a binning function.
51 |
52 | Other functions to define bins:
53 | \code{\link{breaks_on_nBins}()}
54 | }
55 | \author{
56 | Johannes Rainer
57 | }
58 | \concept{functions to define bins}
59 |
--------------------------------------------------------------------------------
/man/breaks_on_nBins.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/functions-binning.R
3 | \name{breaks_on_nBins}
4 | \alias{breaks_on_nBins}
5 | \title{Generate breaks for binning}
6 | \usage{
7 | breaks_on_nBins(fromX, toX, nBins, shiftByHalfBinSize = FALSE)
8 | }
9 | \arguments{
10 | \item{fromX}{\code{numeric(1)} specifying the lowest value for the bins.}
11 |
12 | \item{toX}{\code{numeric(1)} specifying the largest value for the bins.}
13 |
14 | \item{nBins}{\code{numeric(1)} defining the number of bins.}
15 |
16 | \item{shiftByHalfBinSize}{Logical indicating whether the bins should be
17 | shifted left by half bin size. This results centered bins, i.e. the
18 | first bin being centered at \code{fromX} and the last around \code{toX}.}
19 | }
20 | \value{
21 | A numeric vector of length \code{nBins + 1} defining the lower and
22 | upper bounds of the bins.
23 | }
24 | \description{
25 | Calculate breaks for same-sized bins for data values
26 | from \code{fromX} to \code{toX}.
27 | }
28 | \details{
29 | This generates bins such as a call to
30 | \code{seq(fromX, toX, length.out = nBins)} would. The first and second element
31 | in the result vector thus defines the lower and upper boundary for the first
32 | bin, the second and third value for the second bin and so on.
33 | }
34 | \examples{
35 | ## Create breaks to bin values from 3 to 20 into 20 bins
36 | breaks_on_nBins(3, 20, nBins = 20)
37 | ## The same call but using shiftByHalfBinSize
38 | breaks_on_nBins(3, 20, nBins = 20, shiftByHalfBinSize = TRUE)
39 | }
40 | \seealso{
41 | \code{\link[=binYonX]{binYonX()}} for a binning function.
42 |
43 | Other functions to define bins:
44 | \code{\link{breaks_on_binSize}()}
45 | }
46 | \author{
47 | Johannes Rainer
48 | }
49 | \concept{functions to define bins}
50 |
--------------------------------------------------------------------------------
/man/c.xcmsSet.Rd:
--------------------------------------------------------------------------------
1 | \name{c-methods}
2 | \docType{methods}
3 | \alias{c.xcmsSet}
4 | \alias{c, c-methods}
5 | \title{Combine xcmsSet objects}
6 | \description{
7 | Combines the samples and peaks from multiple \code{xcmsSet} objects
8 | into a single object. Group and retention time correction data
9 | are discarded. The \code{profinfo} list is set to be equal to the
10 | first object.
11 | }
12 | \section{Methods}{
13 | \describe{
14 | \item{xs1 = "xcmsRaw"}{
15 | \code{
16 | c(xs1, ...)
17 | }
18 | }
19 | }}
20 | \arguments{
21 | \item{xs1}{\code{xcmsSet} object}
22 | \item{\dots}{\code{xcmsSet} objects}
23 | }
24 | \value{
25 | A \code{xcmsSet} object.
26 | }
27 | \author{Colin A. Smith, \email{csmith@scripps.edu}}
28 | \seealso{
29 | \code{\link{xcmsSet-class}}
30 | }
31 | \keyword{manip}
32 |
--------------------------------------------------------------------------------
/man/calibrate.Rd:
--------------------------------------------------------------------------------
1 | \name{calibrate-methods}
2 | \docType{methods}
3 | \alias{calibrate}
4 | \alias{calibrate,xcmsSet-method}
5 | \title{Calibrate peaks for correcting unprecise m/z values}
6 | \description{
7 | Calibrate peaks of a xcmsSet via a set of known masses
8 | }
9 | \section{Methods}{
10 | \describe{
11 | \item{object = "xcmsSet"}{
12 | \code{
13 | calibrate(object, calibrants,method="linear",
14 | mzabs=0.0001, mzppm=5,
15 | neighbours=3, plotres=FALSE)
16 | }
17 | }
18 | }}
19 | \arguments{
20 | \item{object}{a \code{xcmsSet} object with uncalibrated mz}
21 | \item{calibrants}{a vector or a list of vectors with reference m/z-values}
22 | \item{method}{the used calibrating-method, see below}
23 | \item{mzppm}{the relative error used for matching peaks in ppm (parts per million)}
24 | \item{mzabs}{the absolute error used for matching peaks in Da}
25 | \item{neighbours}{the number of neighbours from wich the one with the highest intensity is used (instead of the nearest)}
26 | \item{plotres}{can be set to TRUE if wanted a result-plot showing the found m/z with the distances and the regression}
27 | }
28 | \value{
29 | \item{object}{a \code{xcmsSet} with one ore more samples}
30 | \item{calibrants}{for each sample different calibrants can be used, if a list of m/z-vectors is given. The length of the list must be the same as the number of samples, alternatively a single vector of masses can be given which is used for all samples.}
31 | \item{method}{ "shift" for shifting each m/z, "linear" does a linear regression and adds a linear term to each m/z. "edgeshift" does a linear regression within the range of the mz-calibrants and a shift outside.}
32 | }
33 | \seealso{
34 | \code{\link{xcmsSet-class}},
35 | }
36 | \keyword{methods}
37 | \keyword{file}
38 |
--------------------------------------------------------------------------------
/man/colMax.Rd:
--------------------------------------------------------------------------------
1 | \name{colMax}
2 | \alias{colMax}
3 | \alias{rowMax}
4 | \alias{which.colMax}
5 | \alias{which.rowMax}
6 | \title{Find row and column maximum values}
7 | \description{
8 | Find row and column maximum values for numeric arrays.
9 | }
10 | \usage{
11 | colMax(x, na.rm = FALSE, dims = 1)
12 | rowMax(x, na.rm = FALSE, dims = 1)
13 | which.colMax(x, na.rm = FALSE, dims = 1)
14 | which.rowMax(x, na.rm = FALSE, dims = 1)
15 | }
16 | \arguments{
17 | \item{x}{
18 | an array of two or more dimensions, containing numeric values
19 | }
20 | \item{na.rm}{
21 | logical. Should missing values (including 'NaN') be omitted
22 | from the calculations? (not currently implemented)
23 | }
24 | \item{dims}{
25 | Which dimensions are regarded as "rows" or "columns" to maximize.
26 | For \code{rowMax}, the maximum is over dimensions \code{dims+1,
27 | ...}; for \code{colMax} it is over dimensions \code{1:dims}.
28 | }
29 | }
30 | \details{
31 | These functions are designed to act like the \code{colSums} series
32 | of functions except that they only currently handle real arrays
33 | and will not remove \code{NA} values.
34 | }
35 | \value{
36 | A numeric array of suitable size, or a vector if the result is
37 | one-dimensional. The \code{dimnames} (or \code{names} for a
38 | vector result) are taken from the original array.
39 |
40 | For the \code{which.*} functions, an integer array of suitable
41 | size, or a vector if the result is one-dimensional. The indecies
42 | returned are for accessing \code{x} one-dimensionally (i.e.
43 | \code{x[index]}). For \code{which.colMax()}, the actual row
44 | indecies my be determined using \code{(which.colMax(x)-1) \%\%
45 | nrow(x) + 1}. For \code{which.rowMax()}, the actual column indecies
46 | may be determined using \code{ceiling(rowMax(x)/nrow(x))}.
47 | }
48 | \author{Colin A. Smith, \email{csmith@scripps.edu}}
49 | \seealso{
50 | \code{\link{colSums}}
51 | }
52 | \keyword{array}
53 | \keyword{manip}
54 | \keyword{internal}
55 |
--------------------------------------------------------------------------------
/man/collect-methods.Rd:
--------------------------------------------------------------------------------
1 | \name{collect-methods}
2 | \docType{methods}
3 | \alias{collect-methods}
4 | \alias{collect}
5 | \alias{collect,xcmsRaw-method}
6 | \alias{collect,xcmsFragments-method}
7 | \title{Collect MS^n peaks into xcmsFragments}
8 | \description{
9 | Collecting Peaks into \code{\linkS4class{xcmsFragments}}s from several
10 | MS-runs using \code{\linkS4class{xcmsSet}} and
11 | \code{\linkS4class{xcmsRaw}}.
12 | }
13 | \section{Methods}{
14 | \describe{
15 | \item{object = "xcmsFragments"}{
16 | \code{
17 | collect(object, ...)
18 | }
19 | }
20 | }}
21 | \arguments{
22 | \item{object}{(empty) \code{\link{xcmsFragments-class}} object}
23 | \item{xs}{A \code{\link{xcmsSet-class}} object which contains
24 | picked ms1-peaks from several experiments}
25 | \item{compMethod}{("floor", "round", "none"): compare-method which is
26 | used to find the parent peak of a MSnpeak through comparing the
27 | MZ-values of the MS1peaks with the MSnParentPeaks.}
28 | \item{snthresh, mzgap, uniq}{these are the parameters for the
29 | getspec-peakpicker included in xcmsRaw.}
30 | }
31 | \details{
32 | After running collect(xFragments,xSet) The peak table of the
33 | xcmsFragments includes the ms1Peaks from all experiments stored in a
34 | xcmsSet-object. Further it contains the relevant msN-peaks from the
35 | xcmsRaw-objects, which were created temporarily with the paths in
36 | xcmsSet.
37 | }
38 |
39 | \value{
40 | A matrix with columns:
41 | \item{peakID}{
42 | unique identifier of every peak
43 | }
44 | \item{MSnParentPeakID}{
45 | PeakID of the parent peak of a msLevel>1 - peak, it is 0 if the peak is msLevel 1.
46 | }
47 | \item{msLevel}{
48 | The msLevel of the peak.
49 | }
50 | \item{rt}{
51 | retention time of the peak midpoint
52 | }
53 | \item{mz}{
54 | the mz-Value of the peak
55 | }
56 | \item{intensity}{
57 | the intensity of the peak
58 | }
59 | \item{sample}{
60 | the number of the sample from the xcmsSet
61 | }
62 | \item{GroupPeakMSn}{Used for grouped xcmsSet groups}
63 | \item{CollisionEnergy}{The collision energy of the fragment}
64 | }
65 | \keyword{methods}
66 |
--------------------------------------------------------------------------------
/man/descendZero.Rd:
--------------------------------------------------------------------------------
1 | \name{descendZero}
2 | \alias{descendZero}
3 | \alias{descendMin}
4 | \alias{descendValue}
5 | \title{Find start and end points of a peak}
6 | \description{
7 | Decends down the sides of a data peak and finds either the points
8 | greater than or equal to the zero intercept, the intercept with
9 | a given value, or the bottom of the first valley on each side.
10 | }
11 | \usage{
12 | descendZero(y, istart = which.max(y))
13 | descendValue(y, value, istart = which.max(y))
14 | descendMin(y, istart = which.max(y))
15 | }
16 | \arguments{
17 | \item{y}{numeric vector with values}
18 | \item{istart}{starting point for descent}
19 | \item{value}{numeric value to descend to}
20 | }
21 | \value{
22 | An integer vector of length 2 with the starting and ending indicies
23 | of the peak start and end points.
24 | }
25 | \author{Colin A. Smith, \email{csmith@scripps.edu}}
26 | \seealso{
27 | \code{\link{descendValue}}
28 | }
29 | \examples{
30 | normdist <- dnorm(seq(-4, 4, .1)) - .1
31 | xcms:::descendZero(normdist)
32 | normdist[xcms:::descendZero(normdist)]
33 | xcms:::descendValue(normdist, .15)
34 | normdist[xcms:::descendValue(normdist, .15)]
35 | xcms:::descendMin(normdist)
36 | }
37 | \keyword{iteration}
38 | \keyword{internal}
39 |
--------------------------------------------------------------------------------
/man/dirname.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/functions-OnDiskMSnExp.R
3 | \name{dirname}
4 | \alias{dirname}
5 | \alias{dirname,OnDiskMSnExp-method}
6 | \alias{dirname<-,OnDiskMSnExp-method}
7 | \title{Change the file path of an \code{OnDiskMSnExp} object}
8 | \usage{
9 | \S4method{dirname}{OnDiskMSnExp}(path)
10 |
11 | \S4method{dirname}{OnDiskMSnExp}(path) <- value
12 | }
13 | \arguments{
14 | \item{path}{\code{OnDiskMSnExp}.}
15 |
16 | \item{value}{\code{character} of length 1 or length equal to the number of files
17 | defining the new path to the files.}
18 | }
19 | \description{
20 | \code{dirname} allows to get and set the path to the directory containing the
21 | source files of the \code{OnDiskMSnExp} (or \linkS4class{XCMSnExp}) object.
22 | }
23 | \author{
24 | Johannes Rainer
25 | }
26 |
--------------------------------------------------------------------------------
/man/do_findPeaks_MSW.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/do_findChromPeaks-functions.R
3 | \name{do_findPeaks_MSW}
4 | \alias{do_findPeaks_MSW}
5 | \title{Core API function for single-spectrum non-chromatography MS data
6 | peak detection}
7 | \usage{
8 | do_findPeaks_MSW(
9 | mz,
10 | int,
11 | snthresh = 3,
12 | verboseColumns = FALSE,
13 | scantime = numeric(),
14 | valsPerSpect = integer(),
15 | ...
16 | )
17 | }
18 | \arguments{
19 | \item{mz}{Numeric vector with the individual m/z values from all scans/
20 | spectra of one file/sample.}
21 |
22 | \item{int}{Numeric vector with the individual intensity values from all
23 | scans/spectra of one file/sample.}
24 |
25 | \item{snthresh}{\code{numeric(1)} defining the signal to noise ratio cutoff.}
26 |
27 | \item{verboseColumns}{\code{logical(1)} whether additional peak meta data
28 | columns should be returned.}
29 |
30 | \item{scantime}{ignored.}
31 |
32 | \item{valsPerSpect}{ignored.}
33 |
34 | \item{...}{Additional parameters to be passed to the
35 | \code{peakDetectionCWT} function.}
36 | }
37 | \value{
38 | A matrix, each row representing an identified peak, with columns:
39 | \itemize{
40 | \item \code{"mz"}: m/z value of the peak at the centroid position.
41 | \item \code{"mzmin"}: Minimum m/z of the peak.
42 | \item \code{"mzmax"}: Maximum m/z of the peak.
43 | \item \code{"rt"}: Always \code{-1}.
44 | \item \code{"rtmin"}: Always \code{-1}.
45 | \item \code{"rtmax"}: Always \code{-1}.
46 | \item \code{"into"}: Integrated (original) intensity of the peak.
47 | \item \code{"maxo"}: Maximum intensity of the peak.
48 | \item \code{"intf"}: Always \code{NA}.
49 | \item \code{"maxf"}: Maximum MSW-filter response of the peak.
50 | \item \code{"sn"}: Signal to noise ratio.
51 | }
52 | }
53 | \description{
54 | This function performs peak detection in mass spectrometry
55 | direct injection spectrum using a wavelet based algorithm.
56 | }
57 | \details{
58 | This is a wrapper around the peak picker in Bioconductor's
59 | \emph{MassSpecWavelet} package calling
60 | \code{peakDetectionCWT()} and \code{tuneInPeakInfo()} functions. See the
61 | \emph{xcmsDirect} vignette for more information.
62 | }
63 | \seealso{
64 | Other core peak detection functions:
65 | \code{\link{do_findChromPeaks_centWave}()},
66 | \code{\link{do_findChromPeaks_centWaveWithPredIsoROIs}()},
67 | \code{\link{do_findChromPeaks_massifquant}()},
68 | \code{\link{do_findChromPeaks_matchedFilter}()}
69 | }
70 | \author{
71 | Joachim Kutzera, Steffen Neumann, Johannes Rainer
72 | }
73 | \concept{core peak detection functions}
74 |
--------------------------------------------------------------------------------
/man/doubleMatrix.Rd:
--------------------------------------------------------------------------------
1 | \name{doubleMatrix}
2 | \alias{doubleMatrix}
3 | \alias{integerMatrix}
4 | \alias{logicalMatrix}
5 | \title{Allocate double, integer, or logical matricies}
6 | \description{
7 | Allocate double, integer, or logical matricies in one step without
8 | copying memory around.
9 | }
10 | \usage{
11 | doubleMatrix(nrow = 0, ncol = 0)
12 | integerMatrix(nrow = 0, ncol = 0)
13 | logicalMatrix(nrow = 0, ncol = 0)
14 | }
15 | \arguments{
16 | \item{nrow}{number of matrix rows}
17 | \item{ncol}{number of matrix columns}
18 | }
19 | \value{
20 | Matrix of double, integer, or logical values. Memory is not zeroed.
21 | }
22 | \author{Colin A. Smith, \email{csmith@scripps.edu}}
23 | \keyword{programming}
24 | \keyword{internal}
25 |
--------------------------------------------------------------------------------
/man/estimatePrecursorIntensity.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/MsExperiment.R, R/methods-OnDiskMSnExp.R
3 | \name{estimatePrecursorIntensity,MsExperiment-method}
4 | \alias{estimatePrecursorIntensity,MsExperiment-method}
5 | \alias{estimatePrecursorIntensity,OnDiskMSnExp-method}
6 | \title{Estimate precursor intensity for MS level 2 spectra}
7 | \usage{
8 | \S4method{estimatePrecursorIntensity}{MsExperiment}(
9 | object,
10 | ppm = 10,
11 | tolerance = 0,
12 | method = c("previous", "interpolation"),
13 | BPPARAM = bpparam()
14 | )
15 |
16 | \S4method{estimatePrecursorIntensity}{OnDiskMSnExp}(
17 | object,
18 | ppm = 10,
19 | tolerance = 0,
20 | method = c("previous", "interpolation"),
21 | BPPARAM = bpparam()
22 | )
23 | }
24 | \arguments{
25 | \item{object}{\code{MsExperiment}, \code{XcmsExperiment}, \code{OnDiskMSnExp} or
26 | \code{XCMSnExp} object.}
27 |
28 | \item{ppm}{\code{numeric(1)} defining the maximal acceptable difference (in ppm)
29 | of the precursor m/z and the m/z of the corresponding peak in the MS 1
30 | scan.}
31 |
32 | \item{tolerance}{\code{numeric(1)} with the maximal allowed difference of m/z
33 | values between the precursor m/z of a spectrum and the m/z of the
34 | respective ion on the MS1 scan.}
35 |
36 | \item{method}{\code{character(1)} defining the method how the precursor intensity
37 | should be determined (see description above for details). Defaults to
38 | \code{method = "previous"}.}
39 |
40 | \item{BPPARAM}{parallel processing setup. See \code{\link[BiocParallel:register]{BiocParallel::bpparam()}} for
41 | details.}
42 | }
43 | \value{
44 | \code{numeric} with length equal to the number of spectra in \code{x}. \code{NA} is
45 | returned for MS 1 spectra or if no matching peak in a MS 1 scan can be
46 | found for an MS 2 spectrum
47 | }
48 | \description{
49 | \code{estimatePrecursorIntensity()} determines the precursor intensity for a MS 2
50 | spectrum based on the intensity of the respective signal from the
51 | neighboring MS 1 spectra (i.e. based on the peak with the m/z matching the
52 | precursor m/z of the MS 2 spectrum). Based on parameter \code{method} either the
53 | intensity of the peak from the previous MS 1 scan is used
54 | (\code{method = "previous"}) or an interpolation between the intensity from the
55 | previous and subsequent MS1 scan is used (\code{method = "interpolation"}, which
56 | considers also the retention times of the two MS1 scans and the retention
57 | time of the MS2 spectrum).
58 | }
59 | \author{
60 | Johannes Rainer with feedback and suggestions from Corey Broeckling
61 | }
62 |
--------------------------------------------------------------------------------
/man/etg.Rd:
--------------------------------------------------------------------------------
1 | \name{etg}
2 | \alias{etg}
3 | \title{Empirically Transformed Gaussian function}
4 | \description{
5 | A general function for asymmetric chromatographic peaks.
6 | }
7 | \usage{
8 | etg(x, H, t1, tt, k1, kt, lambda1, lambdat, alpha, beta)
9 | }
10 | \arguments{
11 | \item{x}{times to evaluate function at}
12 | \item{H}{peak height}
13 | \item{t1}{time of leading edge inflection point}
14 | \item{tt}{time of trailing edge inflection point}
15 | \item{k1}{leading edge parameter}
16 | \item{kt}{trailing edge parameter}
17 | \item{lambda1}{leading edge parameter}
18 | \item{lambdat}{trailing edge parameter}
19 | \item{alpha}{leading edge parameter}
20 | \item{beta}{trailing edge parameter}
21 | }
22 | \value{
23 | The function evaluated at times \code{x}.
24 | }
25 | \references{
26 | Jianwei Li. Development and Evaluation of Flexible Empirical Peak
27 | Functions for Processing Chromatographic Peaks. Anal. Chem., 69
28 | (21), 4452-4462, 1997.
29 | \url{http://dx.doi.org/10.1021/ac970481d}
30 | }
31 | \author{Colin A. Smith, \email{csmith@scripps.edu}}
32 | \keyword{models}
33 |
--------------------------------------------------------------------------------
/man/exportMetaboAnalyst.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/functions-XCMSnExp.R
3 | \name{exportMetaboAnalyst}
4 | \alias{exportMetaboAnalyst}
5 | \title{Export data for use in MetaboAnalyst}
6 | \usage{
7 | exportMetaboAnalyst(
8 | x,
9 | file = NULL,
10 | label,
11 | value = "into",
12 | digits = NULL,
13 | groupnames = FALSE,
14 | ...
15 | )
16 | }
17 | \arguments{
18 | \item{x}{\link{XCMSnExp} object with identified chromatographic peaks grouped
19 | across samples.}
20 |
21 | \item{file}{\code{character(1)} defining the file name. If not specified, the
22 | \code{matrix} with the content is returned.}
23 |
24 | \item{label}{either \code{character(1)} specifying the phenodata column in \code{x}
25 | defining the sample grouping or a vector with the same length than
26 | samples in \code{x} defining the group assignment of the samples.}
27 |
28 | \item{value}{\code{character(1)} specifying the value to be returned for each
29 | feature. See \code{\link[=featureValues]{featureValues()}} for more details.}
30 |
31 | \item{digits}{\code{integer(1)} defining the number of significant digits to be
32 | used for numeric. The default \code{NULL} uses \code{getOption("digits")}. See
33 | \code{\link[=format]{format()}} for more information.}
34 |
35 | \item{groupnames}{\code{logical(1)} whether row names of the resulting matrix
36 | should be the feature IDs (\code{groupnames = FALSE}; default) or IDs that
37 | are composed of the m/z and retention time of the features (in the
38 | format \verb{MT