Skip to content
Snippets Groups Projects
Commit 341c5f5f authored by meowcat's avatar meowcat
Browse files

Merge pull request #106 from sneumann/master

Please pull our changes
parents 6d66088d 30e17262
No related branches found
No related tags found
No related merge requests found
Showing
with 580 additions and 287 deletions
Package: RMassBank
Type: Package
Title: Workflow to process tandem MS files and build MassBank records
Title: Workflow to process tandem MS files and build MassBank records
Version: 1.9.2.1
Authors@R: c(
person(given = "RMassBank at Eawag", email = "massbank@eawag.ch",
......
......@@ -63,6 +63,7 @@ export(makeMollist)
export(makeRecalibration)
export(mbWorkflow)
export(msmsRead)
export(msmsRead.RAW)
export(msmsWorkflow)
export(multiply.formula)
export(newMbWorkspace)
......
......@@ -261,9 +261,15 @@ setMethod("show", "msmsWorkspace",
return(sapply(x$msmsdata, function(x) length(unique(x$childFilt[,1]))))
})
PeakMat <- matrix(dummy1-dummy2,numspecs,numspecs)
whichok <- which(sapply(dummy1,length) != 0)
anyok <- whichok[1]
tempids <- ids
dummy2 <- matrix(unlist(dummy2), ncol = length(dummy1[[anyok]]), byrow = TRUE)
dummy1 <- matrix(unlist(dummy1), ncol = length(dummy1[[anyok]]), byrow = TRUE)
PeakMat <- dummy1-dummy2
tempids <- ids[whichok]
cat("Peaks without annotation:\n")
sapply(split(PeakMat, rep(1:nrow(PeakMat), each = ncol(PeakMat))), function(x){
cat(" -", tempids[1], "\t number of peaks filtered:", x, "\n")
......@@ -317,10 +323,16 @@ setMethod("show", "msmsWorkspace",
sapply(x$msmsdata, function(x) length(unique(x$childFilt[,1]))), "\n")
return(sapply(x$msmsdata, function(x) length(unique(x$childFilt[,1]))))
})
PeakMat <- matrix(dummy4-dummy5,numspecs,numspecs)
tempids <- ids
whichok <- which(sapply(dummy4,length) != 0)
anyok <- whichok[1]
dummy5 <- matrix(unlist(dummy5), ncol = length(dummy4[[anyok]]), byrow = TRUE)
dummy4 <- matrix(unlist(dummy4), ncol = length(dummy4[[anyok]]), byrow = TRUE)
PeakMat <- dummy4-dummy5
tempids <- ids[whichok]
cat("Peaks without annotation in reanalyzed recalibrated peaks:\n")
sapply(split(PeakMat, rep(1:nrow(PeakMat), each = ncol(PeakMat))), function(x){
cat(" -", tempids[1], "\t number of peaks filtered:", x, "\n")
......@@ -420,7 +432,7 @@ plotMbWorkspaces <- function(w1, w2=NULL){
lapply(x,function(y) y[['PK$PEAK']][,c("m/z","rel.int.")])
})
plot_title <- lapply(w2@compiled_ok,function(x){
lapply(x,function(y) y[['RECORD_TITLE']])
lapply(x,function(y) y[['ACCESSION']])
})
}
......@@ -431,7 +443,7 @@ plotMbWorkspaces <- function(w1, w2=NULL){
})
plot_title <- lapply(w1@compiled_ok,function(x){
lapply(x,function(y) y[['RECORD_TITLE']])
lapply(x,function(y) y[['ACCESSION']])
})
......
......@@ -52,6 +52,19 @@ loadInfolist <- function(mb, fileName)
# Legacy check for loading the Uchem format files.
# Even if dbname_* are not used downstream of here, it's still good to keep them
# for debugging reasons.
n <- colnames(mbdata_new)
cols <- c("id","dbcas","dataused")
# Check if comma-separated or semicolon-separated
d <- setdiff(cols, n)
if(length(d)>0){
mbdata_new <- read.csv2(fileName, stringsAsFactors=FALSE)
n <- colnames(mbdata_new)
d2 <- setdiff(cols, n)
if(length(d2) > 0){
stop("Some columns are missing in the infolist.")
}
}
if("dbname_d" %in% colnames(mbdata_new))
{
colnames(mbdata_new)[[which(colnames(mbdata_new)=="dbname_d")]] <- "dbname"
......@@ -385,7 +398,7 @@ gatherData <- function(id)
# Actually retrieve data from CTS (see the webaccess scripts)
infos <- getCtsRecord(inchikey_split)
if(length(infos) == 0)
if(infos[1] == "Sorry, we couldn't find any matching results")
dataUsed <- "dbname"
else
dataUsed <- "smiles"
......@@ -1551,6 +1564,8 @@ addPeaks <- function(mb, filename_or_dataframe)
cols <- c("cpdID", "scan", "mzFound", "int", "OK")
n <- colnames(df)
# Check if comma-separated or semicolon-separated
d <- setdiff(cols, n)
if(length(d)>0){
......
......@@ -88,6 +88,16 @@ msmsWorkflow <- function(w, mode="pH", steps=c(1:8), confirmMode = FALSE, newRec
nProg <- 0
nLen <- length(w@files)
if(readMethod == "minimal"){
##Edit options
opt <- getOption("RMassBank")
opt$recalibrator$MS1 <- "recalibrate.identity"
opt$recalibrator$MS2 <- "recalibrate.identity"
options(RMassBank=opt)
##Edit analyzemethod
analyzeMethod <- "intensity"
}
# Step 1: acquire all MSMS spectra from files
if(1 %in% steps)
{
......@@ -151,9 +161,11 @@ msmsWorkflow <- function(w, mode="pH", steps=c(1:8), confirmMode = FALSE, newRec
## names(w@specs) <- basename(as.character(w@files))
##}
if(readMethod == "peaklist"){
splitfn <- strsplit(w@files,'_')
cpdIDs <- sapply(splitfn, function(splitted){as.numeric(return(splitted[2]))})
if((readMethod == "peaklist") || (readMethod == "minimal")){
splitfn <- strsplit(basename(w@files), "_")
cpdIDs <- sapply(splitfn, function(splitted) {
as.numeric(return(splitted[2]))
})
files <- list()
for(i in 1:length(unique(cpdIDs))) {
indices <- sapply(splitfn,function(a){return(unique(cpdIDs)[i] %in% a)})
......@@ -1743,7 +1755,7 @@ filterPeaksMultiplicity <- function(peaks, formulacol, recalcBest = TRUE)
# rename (because "formulacol" is not the actually correct name)
colnames(multInfo) <- c("cpdID", formulacol, "formulaMultiplicity")
if(nrow(peaks) == 0)
if(!is.data.frame(peaks))
{
message("filterPeaksMultiplicity: no peaks to aggregate")
peaks <- cbind(peaks, data.frame(formulaMultiplicity=numeric()))
......
## For generating the NAMESPACE
#' @import mzR
#' @importClassesFrom mzR
#' @importMethodsFrom mzR
# # importClassesFrom mzR ## Causes error
# # importMethodsFrom mzR
#' @import Rcpp ## Was not in manually written NAMESPACE ?
#' @import RCurl
#' @import XML
#' @import methods
#' @import mzR
#' @import rcdk
#' @import rjson
#' @import yaml
NULL # This is required so that roxygen knows where the first manpage starts
#' Extract MS/MS spectra for specified precursor
......@@ -15,7 +24,7 @@ NULL # This is required so that roxygen knows where the first manpage starts
#' is a low-level function which uses the mass directly for lookup and is intended for
#' use as a standalone function in unrelated applications.
#'
#' @Usage findMsMsHR(fileName, cpdID, mode="pH",confirmMode =0, useRtLimit = TRUE,
#' @usage findMsMsHR(fileName, cpdID, mode="pH",confirmMode =0, useRtLimit = TRUE,
#' ppmFine = getOption("RMassBank")$findMsMsRawSettings$ppmFine,
#' mzCoarse = getOption("RMassBank")$findMsMsRawSettings$mzCoarse,
#' fillPrecursorScan = getOption("RMassBank")$findMsMsRawSettings$fillPrecursorScan,
......@@ -307,7 +316,7 @@ findMsMsHRperxcms.direct <- function(fileName, cpdID, mode="pH", findPeaksArgs =
if(MSe == FALSE){
## Fake MS1 from MSn scans
## xrmsmsAsMs <- msn2xcmsRaw(xrmsms)
suppressWarnings(xrs <- split(msn2xcmsRaw(xrmsms), f=xrmsms@msnCollisionEnergy))
suppressWarnings(xrs <- split(msn2xcmsRaw(xrmsms), f = xrmsms@msnCollisionEnergy))
} else{
xrs <- list()
xrs[[1]] <- xrmsms
......@@ -320,7 +329,6 @@ findMsMsHRperxcms.direct <- function(fileName, cpdID, mode="pH", findPeaksArgs =
psp <- list()
spectra <- list()
whichmissing <- vector()
metaspec <- list()
for(ID in 1:length(cpdID)){
spectra <- list()
......@@ -701,7 +709,7 @@ addMB <- function(w, cpdID, fileName, mode){
#' @examples \dontrun{
#' c.msmsWSspecs(w1,w2)
#' }
#'export
#'@export
c.msmsWSspecs <- function(w1 = NA, w2 = NA){
if(class(w1) != "msmsWorkspace" || class(w2) != "msmsWorkspace"){
......@@ -738,4 +746,4 @@ c.msmsWSspecs <- function(w1 = NA, w2 = NA){
}
}
return(w1)
}
\ No newline at end of file
}
......@@ -8,8 +8,8 @@
#' workflow.
#'
#' @param w A \code{msmsWorkspace} to work with.
#' @param filetable The path to a .csv-file that contains the columns "files" and "cpdid" supplying
#' the relationships between files and compound IDs. Either this or "files" need
#' @param filetable The path to a .csv-file that contains the columns "Files" and "ID" supplying
#' the relationships between files and compound IDs. Either this or the parameter "files" need
#' to be specified.
#' @param files A vector or list containing the filenames of the files that are to be read as spectra.
#' For the IDs to be inferred from the filenames alone, there need to be exactly 2 underscores.
......@@ -34,6 +34,7 @@
#' @param progressbar The progress bar callback to use. Only needed for specialized applications.
#' Cf. the documentation of \code{\link{progressBarHook}} for usage.
#' @param MSe A boolean value that determines whether the spectra were recorded using MSe or not
#' @param plots A boolean value that determines whether the pseudospectra in XCMS should be plotted
#' @return The \code{msmsWorkspace} with msms-spectra read.
#' @seealso \code{\link{msmsWorkspace-class}}, \code{\link{msmsWorkflow}}
#' @author Michael Stravs, Eawag <michael.stravs@@eawag.ch>
......@@ -41,7 +42,7 @@
#' @export
msmsRead <- function(w, filetable = NULL, files = NULL, cpdids = NULL,
readMethod, mode, confirmMode = FALSE, useRtLimit = TRUE,
Args = NULL, settings = getOption("RMassBank"), progressbar = "progressBarHook", MSe = FALSE){
Args = NULL, settings = getOption("RMassBank"), progressbar = "progressBarHook", MSe = FALSE, plots = FALSE){
##Read the files and cpdids according to the definition
##All cases are silently accepted, as long as they can be handled according to one definition
......@@ -74,7 +75,7 @@ msmsRead <- function(w, filetable = NULL, files = NULL, cpdids = NULL,
if(length(w@files) != length(cpdids)){
stop("There are a different number of cpdids than files")
}
if(!(readMethod %in% c("mzR","peaklist","xcms"))){
if(!(readMethod %in% c("mzR","peaklist","xcms","minimal"))){
stop("The supplied method does not exist")
}
if(!all(file.exists(w@files))){
......@@ -82,6 +83,16 @@ msmsRead <- function(w, filetable = NULL, files = NULL, cpdids = NULL,
}
##This should work
if(readMethod == "minimal"){
##Edit options
opt <- getOption("RMassBank")
opt$recalibrator$MS1 <- "recalibrate.identity"
opt$recalibrator$MS2 <- "recalibrate.identity"
options(RMassBank=opt)
##Edit analyzemethod
analyzeMethod <- "intensity"
}
if(readMethod == "mzR"){
##Progressbar
nLen <- length(w@files)
......@@ -110,7 +121,7 @@ msmsRead <- function(w, filetable = NULL, files = NULL, cpdids = NULL,
}
##Peaklist-readmethod
if(readMethod == "peaklist"){
if((readMethod == "peaklist") || (readMethod=="minimal")){
w <- createSpecsFromPeaklists(w, cpdids, filenames=w@files, mode=mode)
uIDs <- unique(cpdids)
files <- list()
......@@ -153,7 +164,7 @@ msmsRead <- function(w, filetable = NULL, files = NULL, cpdids = NULL,
dummySpecs[[i]] <<- newMsmsWorkspace()
dummySpecs[[i]]@specs <<- list()
FileIDs <<- cpdids[which(w@files == currfile)]
dummylinebreak <- capture.output(metaSpec <<- findMsMsHRperxcms.direct(currfile, FileIDs, mode=mode, findPeaksArgs=Args, MSe = MSe))
dummylinebreak <- capture.output(metaSpec <<- findMsMsHRperxcms.direct(currfile, FileIDs, mode=mode, findPeaksArgs=Args, plots, MSe = MSe))
for(j in 1:length(FileIDs)){
dummySpecs[[i]]@specs[[length(dummySpecs[[i]]@specs)+1]] <<- metaSpec[[j]]
......@@ -186,3 +197,130 @@ msmsRead <- function(w, filetable = NULL, files = NULL, cpdids = NULL,
return(w)
}
}
#'
#' Extracts and processes spectra from a list of xcms-Objects
#'
#' The filenames of the raw LC-MS runs are read from the array \code{files}
#' in the global enviroment.
#' See the vignette \code{vignette("RMassBank")} for further details about the
#' workflow.
#'
#' @param w A \code{msmsWorkspace} to work with.
#' @param xRAW A list of xcmsRaw objects whose peaks should be detected and added to the workspace.
#' The relevant data must be in the MS1 data of the xcmsRaw object. You can coerce the
#' msn-data in a usable object with the \code{msn2xcmsRaw} function of xcms.
#' @param cpdids A vector or list containing the compound IDs of the files that are to be read as spectra.
#' The ordering of this and \code{files} implicitly assigns each ID to the corresponding file.
#' If this is supplied, then the IDs implicitly named in the filenames are ignored.
#' @param mode \code{"pH", "pNa", "pM", "mH", "mM", "mFA"} for different ions
#' ([M+H]+, [M+Na]+, [M]+, [M-H]-, [M]-, [M+FA]-).
#' @param findPeaksArgs A list of arguments that will be handed to the xcms-method findPeaks via do.call
#' @param settings Options to be used for processing. Defaults to the options loaded via
#' \code{\link{loadRmbSettings}} et al. Refer to there for specific settings.
#' @param progressbar The progress bar callback to use. Only needed for specialized applications.
#' Cf. the documentation of \code{\link{progressBarHook}} for usage.
#' @param plots A boolean value that determines whether the pseudospectra in XCMS should be plotted
#' @return The \code{msmsWorkspace} with msms-spectra read.
#' @seealso \code{\link{msmsWorkspace-class}}, \code{\link{msmsWorkflow}}
#' @author Michael Stravs, Eawag <michael.stravs@@eawag.ch>
#' @author Erik Mueller, UFZ
#' @export
msmsRead.RAW <- function(w, xRAW = NULL, cpdids = NULL, mode, findPeaksArgs = NULL,
settings = getOption("RMassBank"), progressbar = "progressBarHook", plots = FALSE){
require(xcms)
##xRAW will be coerced into a list of length 1 if it is an xcmsRaw-object
if(class(xRAW) == "xcmsRaw"){
xRAW <- list(xRAW)
}
##Error messages
if((class(xRAW) != "list") || any(sapply(xRAW, function(x) class(x) != "xcmsRaw"))){
stop("No list of xcmsRaw-objects supplied")
}
if(is.null(cpdids)){
stop("No cpdids supplied")
}
#msnExist <- which(sapply(xRAW,function(x) length(x@msnPrecursorScan) != 0))
#print(length(msnExist))
#print(length(xRAW))
#if(length(msnExist) != length(xRAW)){
# stop(paste("No msn data in list elements", setdiff(1:length(xRAW),msnExist)))
#}
require(CAMERA)
parentMass <- findMz(cpdids[1], mode=mode)$mzCenter
if(is.na(parentMass)){
stop(paste("There was no matching entry to the supplied cpdID", cpdids[1] ,"\n Please check the cpdIDs and the compoundlist."))
}
RT <- findRt(cpdids[1])$RT * 60
mzabs <- 0.1
getRT <- function(xa) {
rt <- sapply(xa@pspectra, function(x) {median(peaks(xa@xcmsSet)[x, "rt"])})
}
suppressWarnings(setReplicate <- xcmsSet(files=xRAW[[1]]@filepath, method="MS1"))
xsmsms <- as.list(replicate(length(xRAW),setReplicate))
candidates <- list()
anmsms <- list()
psp <- list()
spectra <- list()
whichmissing <- vector()
metaspec <- list()
for(i in 1:length(xRAW)){
devnull <- suppressWarnings(capture.output(peaks(xsmsms[[i]]) <- do.call(findPeaks,c(findPeaksArgs, object = xRAW[[i]]))))
if (nrow(peaks(xsmsms[[i]])) == 0) { ##If there are no peaks
spectra[[i]] <- matrix(0,2,7)
next
} else{
## Get pspec
pl <- peaks(xsmsms[[i]])[,c("mz", "rt"), drop=FALSE]
## Best: find precursor peak
candidates[[i]] <- which( pl[,"mz", drop=FALSE] < parentMass + mzabs & pl[,"mz", drop=FALSE] > parentMass - mzabs
& pl[,"rt", drop=FALSE] < RT * 1.1 & pl[,"rt", drop=FALSE] > RT * 0.9 )
devnull <- capture.output(anmsms[[i]] <- xsAnnotate(xsmsms[[i]]))
devnull <- capture.output(anmsms[[i]] <- groupFWHM(anmsms[[i]]))
if(length(candidates[[i]]) > 0){
closestCandidate <- which.min (abs( RT - pl[candidates[[i]], "rt", drop=FALSE]))
psp[[i]] <- which(sapply(anmsms[[i]]@pspectra, function(x) {candidates[[i]][closestCandidate] %in% x}))
} else{psp[[i]] <- which.min( abs(getRT(anmsms[[i]]) - RT) )}
## Now find the pspec for compound
## 2nd best: Spectrum closest to MS1
##psp <- which.min( abs(getRT(anmsms) - actualRT))
## 3rd Best: find pspec closest to RT from spreadsheet
##psp <- which.min( abs(getRT(anmsms) - RT) )
if((plots == TRUE) && (length(psp[[i]]) > 0)){
plotPsSpectrum(anmsms[[i]], psp[[i]], log=TRUE, mzrange=c(0, findMz(cpdids)[[3]]), maxlabel=10)
}
if(length(psp[[i]]) != 0){
spectra[[i]] <- getpspectra(anmsms[[i]], psp[[i]])
} else {whichmissing <- c(whichmissing,i)}
}
}
if(length(spectra) != 0){
for(i in whichmissing){
spectra[[i]] <- matrix(0,2,7)
}
}
if(length(w@specs) != 0){
w@specs <- c(w@specs,list(toRMB(spectra,cpdids[1],mode)))
} else {
w@specs[[1]] <- toRMB(spectra,cpdids[1],mode)
}
w@files <- c(w@files,xRAW[[1]]@filepath)
names(w@specs)[length(w@specs)] <- basename(xRAW[[1]]@filepath)
return(w)
}
\ No newline at end of file
......@@ -344,8 +344,23 @@ loadRmbSettings <- function(file_or_list)
# Fix the YAML file to suit our needs
if(is.null(o$deprofile))
o$deprofile <- NA
if(is.null(o$babeldir))
if(is.null(o$babeldir)){
o$babeldir <- NA
} else{
##Check if babeldir exists
babelcheck <- gsub('\"','',o$babeldir)
if(substring(babelcheck, nchar(babelcheck)) == "\\"){
babelexists <- file.exists(substring(babelcheck, 1, nchar(babelcheck)-1))
} else{
babelexists <- file.exists(babelcheck)
}
if(!babelexists){
stop("The babeldir does not exist. Please check the babeldir in the settings and adjust it accordingly.")
}
}
if(nchar(o$annotations$entry_prefix) != 2){
stop("The entry prefix must be of length 2")
}
......
......@@ -2,7 +2,7 @@
#'
#' Validates a plain text MassBank record, or recursively all
#' records within a directory. The Unit Tests to be used are
#' installed in RMassBank/inst/unitTests and currently include
#' installed in RMassBank/inst/validationTests and currently include
#' checks for NAs, peaks versus precursor, precursor mz,
#' precursor type, SMILES vs exact mass, total intensities and
#' title versus type. The validation report is saved as
......@@ -37,12 +37,12 @@ validate <- function(path) {
tests <- list()
for(i in 1:length(RMassBank.env$mb)){
if(RMassBank.env$mb[[i]]@compiled_ok[[1]][['AC$MASS_SPECTROMETRY']][['MS_TYPE']] == "MS2" || RMassBank.env$mb[[i]]@compiled_ok[[1]][['AC$MASS_SPECTROMETRY']][['MS_TYPE']] == "MS"){
tests[[i]] <- defineTestSuite(Files[i], dirs = system.file(package="RMassBank", "unitTests"), testFileRegexp = "runit.MS2.test.R",
tests[[i]] <- defineTestSuite(Files[i], dirs = system.file(package="RMassBank", "validationTests"), testFileRegexp = "runit.MS2.test.R",
#testFuncRegexp = "^test.+",
rngKind = "Marsaglia-Multicarry",
rngNormalKind = "Kinderman-Ramage")
} else{
tests[[i]] <- defineTestSuite(Files[i], dirs = system.file(package="RMassBank", "unitTests"), testFileRegexp = "^runit.MSn.test.[rR]$",
tests[[i]] <- defineTestSuite(Files[i], dirs = system.file(package="RMassBank", "validationTests"), testFileRegexp = "^runit.MSn.test.[rR]$",
#testFuncRegexp = "^test.+",
rngKind = "Marsaglia-Multicarry",
rngNormalKind = "Kinderman-Ramage")
......@@ -140,3 +140,36 @@ smiles2mass <- function(SMILES){
mass <- get.exact.mass(massfromformula)
return(mass)
}
.unitTestRMB <- function(){
require(RUnit)
library(RMassBank)
library(RMassBankData)
w <- newMsmsWorkspace()
RmbDefaultSettings()
files <- list.files(system.file("spectra", package="RMassBankData"),
".mzML", full.names = TRUE)
basename(files)
# To make the workflow faster here, we use only 2 compounds:
w@files <- files
loadList(system.file("list/NarcoticsDataset.csv",
package="RMassBankData"))
w <- msmsWorkflow(w, mode="pH", steps=c(1:4), archivename =
"pH_narcotics")
w <- msmsWorkflow(w, mode="pH", steps=c(5:8), archivename =
"pH_narcotics")
testSuite <- defineTestSuite("Electronic noise and formula calculation Test", dirs = system.file("unitTests",
package="RMassBank"), testFileRegexp = "runit.EN_FC.R",
#testFuncRegexp = "^test.+",
rngKind = "Marsaglia-Multicarry",
rngNormalKind = "Kinderman-Ramage")
testData <- suppressWarnings(runTestSuite(testSuite))
file.remove("pH_narcotics_Failpeaks.csv")
# Prints the HTML-record
printTextProtocol(testData)
return(testData)
}
test.eletronicnoise <- function(){
failpeaks <- read.csv("pH_narcotics_Failpeaks.csv")
checkTrue(!any(apply(failpeaks,1,function(x) all(x[2:4] == c(1738,2819,668,201.69144)))))
}
test.formulacalc <- function(){
failpeaks <- read.csv("pH_narcotics_Failpeaks.csv")
checkTrue(!any(apply(failpeaks,1,function(x) all(x[2:4] == c(70,2758,321,56.04933)))))
}
\ No newline at end of file
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/leMsmsRaw.R
\name{c.msmsWSspecs}
\alias{c.msmsWSspecs}
\title{Concatenation of raw spectra in msmsWorkspace}
\usage{
c.msmsWSspecs(w1, w2)
}
\arguments{
\item{w1,w2}{The msmsWorkspaces of which the spectra should be concatenated}
}
\value{
The \code{msmsWorkspace} with the spectra of two workspaces concatenated into one. Please note that the spectra from w2 will be concatenated to w1 and not vice versa.
}
\description{
Concatenates the (at)specs spectra of msmsWorkspace according to cpdIDs
}
\examples{
\dontrun{
c.msmsWSspecs(w1,w2)
}
}
\author{
Erik Mueller
}
\seealso{
\code{\link{addPeaksManually}}
}
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/leMsmsRaw.R
\name{findEIC}
\alias{findEIC}
\title{Extract EICs}
\usage{
findEIC(msRaw, mz, limit = NULL, rtLimit = NA,
headerCache = NULL)
findEIC(msRaw, mz, limit = NULL, rtLimit = NA, headerCache = NULL,
floatingRecalibration = NULL)
}
\arguments{
\item{msRaw}{The mzR file handle}
\item{msRaw}{The mzR file handle}
\item{mz}{The mass or mass range to extract the EIC for:
either a single mass (with the range specified by
\code{limit} below) or a mass range in the form of
\code{c(min, max)}.}
\item{mz}{The mass or mass range to extract the EIC for: either a single mass
(with the range specified by \code{limit} below) or a mass range
in the form of \code{c(min, max)}.}
\item{limit}{If a single mass was given for \code{mz}:
the mass window to extract. A limit of 0.001 means that
the EIC will be returned for \code{[mz - 0.001, mz +
0.001]}.}
\item{limit}{If a single mass was given for \code{mz}: the mass window to extract.
A limit of 0.001 means that the EIC will be returned for \code{[mz - 0.001, mz + 0.001]}.}
\item{rtLimit}{If given, the retention time limits in
form \code{c(rtmin, rtmax)} in seconds.}
\item{rtLimit}{If given, the retention time limits in form \code{c(rtmin, rtmax)} in seconds.}
\item{headerCache}{If present, the complete
\code{mzR::header(msRaw)}. Passing this value is useful
if spectra for multiple compounds should be extracted
from the same mzML file, since it avoids getting the data
freshly from \code{msRaw} for every compound.}
\item{headerCache}{If present, the complete \code{mzR::header(msRaw)}. Passing
this value is useful if spectra for multiple compounds should be
extracted from the same mzML file, since it avoids getting the data
freshly from \code{msRaw} for every compound.}
\item{floatingRecalibration}{A fitting function that \code{predict()}s a mass shift based on the retention time. Can be used
if a lockmass calibration is known (however you have to build the calibration yourself.)}
}
\value{
A \code{[rt, intensity, scan]} matrix (\code{scan} being
the scan number.)
A \code{[rt, intensity, scan]} matrix (\code{scan} being the scan number.)
}
\description{
Extract EICs from raw data for a determined mass window.
Extract EICs from raw data for a determined mass window.
}
\author{
Michael A. Stravs, Eawag <michael.stravs@eawag.ch>
Michael A. Stravs, Eawag <michael.stravs@eawag.ch>
}
\seealso{
findMsMsHR
findMsMsHR
}
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/leMsmsRaw.R
\name{findMsMsHR}
\alias{findMsMsHR}
\alias{findMsMsHR.direct}
\alias{findMsMsHR.mass}
\title{Extract MS/MS spectra for specified precursor}
\usage{
findMsMsHR(fileName, cpdID, mode="pH",confirmMode =0,
useRtLimit = TRUE, ppmFine =
getOption("RMassBank")$findMsMsRawSettings$ppmFine,
mzCoarse =
getOption("RMassBank")$findMsMsRawSettings$mzCoarse,
fillPrecursorScan =
getOption("RMassBank")$findMsMsRawSettings$fillPrecursorScan,
rtMargin = getOption("RMassBank")$rtMargin, deprofile =
getOption("RMassBank")$deprofile)
findMsMsHR.mass(msRaw, mz, limit.coarse, limit.fine,
rtLimits = NA, maxCount = NA, headerCache = NA,
fillPrecursorScan = FALSE, deprofile =
getOption("RMassBank")$deprofile)
findMsMsHR.direct(msRaw, cpdID, mode = "pH", confirmMode
= 0, useRtLimit = TRUE, ppmFine =
getOption("RMassBank")$findMsMsRawSettings$ppmFine,
mzCoarse =
getOption("RMassBank")$findMsMsRawSettings$mzCoarse,
fillPrecursorScan =
getOption("RMassBank")$findMsMsRawSettings$fillPrecursorScan,
rtMargin = getOption("RMassBank")$rtMargin, deprofile =
getOption("RMassBank")$deprofile, headerCache = NA)
findMsMsHR(fileName, cpdID, mode="pH",confirmMode =0, useRtLimit = TRUE,
ppmFine = getOption("RMassBank")$findMsMsRawSettings$ppmFine,
mzCoarse = getOption("RMassBank")$findMsMsRawSettings$mzCoarse,
fillPrecursorScan = getOption("RMassBank")$findMsMsRawSettings$fillPrecursorScan,
rtMargin = getOption("RMassBank")$rtMargin,
deprofile = getOption("RMassBank")$deprofile)
findMsMsHR.mass(msRaw, mz, limit.coarse, limit.fine, rtLimits = NA, maxCount = NA,
headerCache = NULL, fillPrecursorScan = FALSE,
deprofile = getOption("RMassBank")$deprofile)
findMsMsHR.direct(msRaw, cpdID, mode = "pH", confirmMode = 0, useRtLimit = TRUE,
ppmFine = getOption("RMassBank")$findMsMsRawSettings$ppmFine,
mzCoarse = getOption("RMassBank")$findMsMsRawSettings$mzCoarse,
fillPrecursorScan = getOption("RMassBank")$findMsMsRawSettings$fillPrecursorScan,
rtMargin = getOption("RMassBank")$rtMargin,
deprofile = getOption("RMassBank")$deprofile, headerCache = NULL)
}
\arguments{
\item{fileName}{The file to open and search the MS2
spectrum in.}
\item{fileName}{The file to open and search the MS2 spectrum in.}
\item{msRaw}{The opened raw file (mzR file handle) to
search the MS2 spectrum in.}
\item{cpdID}{The compound ID in the compound list (see \code{\link{loadList}})
to use for formula lookup.}
\item{cpdID}{The compound ID in the compound list (see
\code{\link{loadList}}) to use for formula lookup.}
\item{mode}{The processing mode (determines which ion/adduct is searched):
\code{"pH", "pNa", "pM", "mH", "mM", "mFA"} for different ions
([M+H]+, [M+Na]+, [M]+, [M-H]-, [M]-, [M+FA]-).}
\item{mz}{The mass to use for spectrum search.}
\item{confirmMode}{Whether to use the highest-intensity precursor (=0), second-
highest (=1), third-highest (=2)...}
\item{ppmFine}{The limit in ppm to use for fine limit
(see below) calculation.}
\item{useRtLimit}{Whether to respect retention time limits from the compound list.}
\item{mzCoarse}{The coarse limit to use for locating
potential MS2 scans: this tolerance is used when finding
scans with a suitable precursor ion value.}
\item{ppmFine}{The limit in ppm to use for fine limit (see below) calculation.}
\item{limit.fine}{The fine limit to use for locating MS2
scans: this tolerance is used when locating an
appropriate analyte peak in the MS1 precursor spectrum.}
\item{mzCoarse}{The coarse limit to use for locating potential MS2 scans:
this tolerance is used when finding scans with a suitable precursor
ion value.}
\item{limit.coarse}{Parameter in \code{findMsMsHR.mass}
corresponding to \code{mzCoarse}. (The parameters are
distinct to clearly conceptually distinguish
findMsMsHR.mass (a standalone useful function) from the
cpdID based functions (workflow functions).)}
\item{fillPrecursorScan}{If \code{TRUE}, the precursor scan will be filled from MS1 data.
To be used for data where the precursor scan is not stored in the raw data.}
\item{mode}{The processing mode (determines which
ion/adduct is searched): \code{"pH", "pNa", "pM", "mH",
"mM", "mFA"} for different ions ([M+H]+, [M+Na]+, [M]+,
[M-H]-, [M]-, [M+FA]-).}
\item{rtMargin}{The retention time tolerance to use.}
\item{confirmMode}{Whether to use the highest-intensity
precursor (=0), second- highest (=1), third-highest
(=2)...}
\item{deprofile}{Whether deprofiling should take place, and what method should be
used (cf. \code{\link{deprofile}})}
\item{useRtLimit}{Whether to respect retention time
limits from the compound list.}
\item{msRaw}{The opened raw file (mzR file handle) to search the MS2 spectrum in.}
\item{rtLimits}{\code{c(min, max)}: Minimum and maximum
retention time to use when locating the MS2 scans.}
\item{mz}{The mass to use for spectrum search.}
\item{headerCache}{If present, the complete
\code{mzR::header(msRaw)}. Passing this value is useful
if spectra for multiple compounds should be extracted
from the same mzML file, since it avoids getting the data
freshly from \code{msRaw} for every compound.}
\item{limit.fine}{The fine limit to use for locating MS2 scans: this tolerance
is used when locating an appropriate analyte peak in the MS1 precursor
spectrum.}
\item{maxCount}{The maximal number of spectra groups to
return. One spectra group consists of all data-dependent
scans from the same precursor whose precursor mass
matches the specified search mass.}
\item{limit.coarse}{Parameter in \code{findMsMsHR.mass} corresponding to \code{mzCoarse}.
(The parameters are distinct to clearly conceptually distinguish findMsMsHR.mass
(a standalone useful function) from the cpdID based functions (workflow functions).)}
\item{fillPrecursorScan}{If \code{TRUE}, the precursor
scan will be filled from MS1 data. To be used for data
where the precursor scan is not stored in the raw data.}
\item{rtLimits}{\code{c(min, max)}: Minimum and maximum retention time to use
when locating the MS2 scans.}
\item{rtMargin}{The retention time tolerance to use.}
\item{headerCache}{If present, the complete \code{mzR::header(msRaw)}. Passing
this value is useful if spectra for multiple compounds should be
extracted from the same mzML file, since it avoids getting the data
freshly from \code{msRaw} for every compound.}
\item{deprofile}{Whether deprofiling should take place,
and what method should be used (cf.
\code{\link{deprofile}})}
\item{maxCount}{The maximal number of spectra groups to return. One spectra group
consists of all data-dependent scans from the same precursor whose precursor
mass matches the specified search mass.}
}
\value{
For \code{findMsMsHR} and \code{findMsMsHR.direct}: A
"spectrum set", a list with items:
\item{foundOK}{\code{TRUE} if a spectrum was found,
\code{FALSE} otherwise. Note: if \code{FALSE}, all other
values can be missing!} \item{parentScan}{The scan number
of the precursor scan.} \item{parentHeader}{The header
row of the parent scan, as returned by
\code{mzR::header}.} \item{childScans}{The scan numbers
of the data-dependent MS2 scans.} \item{childHeaders}{The
header rows of the MS2 scan, as returned by
\code{mzR::header}.} \item{parentPeak}{The MS1 precursor
spectrum as a 2-column matrix} \item{peaks}{A list of
2-column \code{mz, int} matrices of the MS2 scans.} For
\code{findMsMsHR.mass}: a list of "spectrum sets" as
defined above, sorted by decreasing precursor intensity.
For \code{findMsMsHR} and \code{findMsMsHR.direct}: A "spectrum set", a list with items:
\item{foundOK}{\code{TRUE} if a spectrum was found, \code{FALSE} otherwise.
Note: if \code{FALSE}, all other values can be missing!}
\item{parentScan}{The scan number of the precursor scan.}
\item{parentHeader}{The header row of the parent scan, as returned by
\code{mzR::header}.}
\item{childScans}{The scan numbers of the data-dependent MS2 scans.}
\item{childHeaders}{The header rows of the MS2 scan, as returned by
\code{mzR::header}.}
\item{parentPeak}{The MS1 precursor spectrum as a 2-column matrix}
\item{peaks}{A list of 2-column \code{mz, int} matrices of the MS2 scans.}
For \code{findMsMsHR.mass}: a list of "spectrum sets" as defined above, sorted
by decreasing precursor intensity.
}
\description{
Extracts MS/MS spectra from LC-MS raw data for a
specified precursor, specified either via the RMassBank
compound list (see \code{\link{loadList}}) or via a mass.
Extracts MS/MS spectra from LC-MS raw data for a specified precursor, specified
either via the RMassBank compound list (see \code{\link{loadList}}) or via a mass.
}
\details{
Different versions of the function get the data from
different sources. Note that findMsMsHR and
findMsMsHR.direct differ mainly in that findMsMsHR opens
a file whereas findMsMs.direct uses an open file handle -
both are intended to be used in a full process which
involves compound lists etc. In contrast, findMsMsHR.mass
is a low-level function which uses the mass directly for
lookup and is intended for use as a standalone function
in unrelated applications.
Different versions of the function get the data from different sources. Note that
findMsMsHR and findMsMsHR.direct differ mainly in that findMsMsHR opens a file
whereas findMsMs.direct uses an open file handle - both are intended to be used
in a full process which involves compound lists etc. In contrast, findMsMsHR.mass
is a low-level function which uses the mass directly for lookup and is intended for
use as a standalone function in unrelated applications.
}
\examples{
\dontrun{
......@@ -142,9 +119,9 @@
}
}
\author{
Michael A. Stravs, Eawag <michael.stravs@eawag.ch>
Michael A. Stravs, Eawag <michael.stravs@eawag.ch>
}
\seealso{
findEIC
findEIC
}
\docType{class}
\name{mbWorkspace-class}
\alias{mbWorkspace-class}
\alias{show,mbWorkspace-method}
\title{Workspace for \code{mbWorkflow} data}
\description{
A workspace which stores input and output data for use
with \code{mbWorkflow}.
}
\details{
Slots: \describe{ \item{aggregatedRcSpecs,
refilteredRcSpecs}{The corresponding input data from
\code{\link{msmsWorkspace-class}}}
\item{additionalPeaks}{A list of additional peaks which
can be loaded using \code{\link{addPeaks}}.}
\item{mbdata, mbdata_archive, mbdata_relisted}{Infolist
data: Data for annotation of MassBank records, which can
be loaded using \code{\link{loadInfolists}}.}
\item{compiled, compiled_ok}{ Compiled tree-structured
MassBank records. \code{compiled_ok} contains only the
compounds with at least one valid spectrum.}
\item{mbfiles}{Compiled MassBank records in text
representation.} \item{molfile}{MOL files with the
compound structures.} \item{ok,problems}{Index lists for
internal use which denote which compounds have valid
spectra.} }
Methods: \describe{ \item{show}{Shows a brief summary of
the object. Currently only a stub.} }
}
\author{
Michael Stravs, Eawag <michael.stravs@eawag.ch>
}
\seealso{
\code{\link{mbWorkflow}}
}
\docType{class}
\name{mbWorkspace-class}
\alias{mbWorkspace-class}
\alias{show,mbWorkspace-method}
\title{Workspace for \code{mbWorkflow} data}
\description{
A workspace which stores input and output data for use with \code{mbWorkflow}.
}
\details{
Slots:
\describe{
\item{aggregatedRcSpecs, refilteredRcSpecs}{The corresponding
input data from \code{\link{msmsWorkspace-class}}}
\item{additionalPeaks}{A list of additional peaks which can be loaded
using \code{\link{addPeaks}}.}
\item{mbdata, mbdata_archive, mbdata_relisted}{Infolist data: Data for
annotation of MassBank records, which can be loaded using
\code{\link{loadInfolists}}.}
\item{compiled, compiled_ok}{
Compiled tree-structured MassBank records. \code{compiled_ok} contains
only the compounds with at least one valid spectrum.}
\item{mbfiles}{Compiled MassBank records in text representation.}
\item{molfile}{MOL files with the compound structures.}
\item{ok,problems}{Index lists for internal use which denote which compounds
have valid spectra.}
}
Methods:
\describe{
\item{show}{Shows a brief summary of the object. Currently only a stub.}
}
}
\author{
Michael Stravs, Eawag <michael.stravs@eawag.ch>
}
\seealso{
\code{\link{mbWorkflow}}
}
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/msmsRead.R
\name{msmsRead.RAW}
\alias{msmsRead.RAW}
\title{Extracts and processes spectra from a list of xcms-Objects}
\usage{
msmsRead.RAW(w, xRAW = NULL, cpdids = NULL, mode, findPeaksArgs = NULL,
settings = getOption("RMassBank"), progressbar = "progressBarHook",
plots = FALSE)
}
\arguments{
\item{w}{A \code{msmsWorkspace} to work with.}
\item{xRAW}{A list of xcmsRaw objects whose peaks should be detected and added to the workspace.
The relevant data must be in the MS1 data of the xcmsRaw object. You can coerce the
msn-data in a usable object with the \code{msn2xcmsRaw} function of xcms.}
\item{cpdids}{A vector or list containing the compound IDs of the files that are to be read as spectra.
The ordering of this and \code{files} implicitly assigns each ID to the corresponding file.
If this is supplied, then the IDs implicitly named in the filenames are ignored.}
\item{mode}{\code{"pH", "pNa", "pM", "mH", "mM", "mFA"} for different ions
([M+H]+, [M+Na]+, [M]+, [M-H]-, [M]-, [M+FA]-).}
\item{findPeaksArgs}{A list of arguments that will be handed to the xcms-method findPeaks via do.call}
\item{settings}{Options to be used for processing. Defaults to the options loaded via
\code{\link{loadRmbSettings}} et al. Refer to there for specific settings.}
\item{progressbar}{The progress bar callback to use. Only needed for specialized applications.
Cf. the documentation of \code{\link{progressBarHook}} for usage.}
\item{plots}{A boolean value that determines whether the pseudospectra in XCMS should be plotted}
}
\value{
The \code{msmsWorkspace} with msms-spectra read.
}
\description{
The filenames of the raw LC-MS runs are read from the array \code{files}
in the global enviroment.
See the vignette \code{vignette("RMassBank")} for further details about the
workflow.
}
\author{
Michael Stravs, Eawag <michael.stravs@eawag.ch>
Erik Mueller, UFZ
}
\seealso{
\code{\link{msmsWorkspace-class}}, \code{\link{msmsWorkflow}}
}
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/msmsRead.R
\name{msmsRead}
\alias{msmsRead}
\title{Extracts and processes spectra from a specified file list, according to
loaded options and given parameters.}
\usage{
msmsRead(w, filetable = NULL, files = NULL,
cpdids = NULL, readMethod, mode, confirmMode = FALSE,
useRtLimit = TRUE, Args = NULL,
settings = getOption("RMassBank"),
progressbar = "progressBarHook", MSe = FALSE)
msmsRead(w, filetable = NULL, files = NULL, cpdids = NULL, readMethod,
mode, confirmMode = FALSE, useRtLimit = TRUE, Args = NULL,
settings = getOption("RMassBank"), progressbar = "progressBarHook",
MSe = FALSE, plots = FALSE)
}
\arguments{
\item{w}{A \code{msmsWorkspace} to work with.}
\item{w}{A \code{msmsWorkspace} to work with.}
\item{filetable}{The path to a .csv-file that contains
the columns "files" and "cpdid" supplying the
relationships between files and compound IDs. Either this
or "files" need to be specified.}
\item{filetable}{The path to a .csv-file that contains the columns "Files" and "ID" supplying
the relationships between files and compound IDs. Either this or the parameter "files" need
to be specified.}
\item{files}{A vector or list containing the filenames of
the files that are to be read as spectra. For the IDs to
be inferred from the filenames alone, there need to be
exactly 2 underscores.}
\item{files}{A vector or list containing the filenames of the files that are to be read as spectra.
For the IDs to be inferred from the filenames alone, there need to be exactly 2 underscores.}
\item{cpdids}{A vector or list containing the compound
IDs of the files that are to be read as spectra. The
ordering of this and \code{files} implicitly assigns each
ID to the corresponding file. If this is supplied, then
the IDs implicitly named in the filenames are ignored.}
\item{cpdids}{A vector or list containing the compound IDs of the files that are to be read as spectra.
The ordering of this and \code{files} implicitly assigns each ID to the corresponding file.
If this is supplied, then the IDs implicitly named in the filenames are ignored.}
\item{readMethod}{Several methods are available to get
peak lists from the files. Currently supported are
"mzR", "xcms", "MassBank" and "peaklist". The first two
read MS/MS raw data, and differ in the strategy used to
extract peaks. MassBank will read existing records, so
that e.g. a recalibration can be performed, and
"peaklist" just requires a CSV with two columns and the
column header "mz", "int".}
\item{readMethod}{Several methods are available to get peak lists from the files.
Currently supported are "mzR", "xcms", "MassBank" and "peaklist".
The first two read MS/MS raw data, and differ in the strategy
used to extract peaks. MassBank will read existing records,
so that e.g. a recalibration can be performed, and "peaklist"
just requires a CSV with two columns and the column header "mz", "int".}
\item{mode}{\code{"pH", "pNa", "pM", "mH", "mM", "mFA"}
for different ions ([M+H]+, [M+Na]+, [M]+, [M-H]-, [M]-,
[M+FA]-).}
\item{mode}{\code{"pH", "pNa", "pM", "mH", "mM", "mFA"} for different ions
([M+H]+, [M+Na]+, [M]+, [M-H]-, [M]-, [M+FA]-).}
\item{confirmMode}{Defaults to false (use most intense
precursor). Value 1 uses the 2nd-most intense precursor
for a chosen ion (and its data-dependent scans) , etc.}
\item{confirmMode}{Defaults to false (use most intense precursor). Value 1 uses
the 2nd-most intense precursor for a chosen ion (and its data-dependent scans)
, etc.}
\item{useRtLimit}{Whether to enforce the given retention
time window.}
\item{useRtLimit}{Whether to enforce the given retention time window.}
\item{Args}{A list of arguments that will be handed to
the xcms-method findPeaks via do.call}
\item{Args}{A list of arguments that will be handed to the xcms-method findPeaks via do.call}
\item{settings}{Options to be used for processing.
Defaults to the options loaded via
\code{\link{loadRmbSettings}} et al. Refer to there for
specific settings.}
\item{settings}{Options to be used for processing. Defaults to the options loaded via
\code{\link{loadRmbSettings}} et al. Refer to there for specific settings.}
\item{progressbar}{The progress bar callback to use. Only
needed for specialized applications. Cf. the
documentation of \code{\link{progressBarHook}} for
usage.}
\item{progressbar}{The progress bar callback to use. Only needed for specialized applications.
Cf. the documentation of \code{\link{progressBarHook}} for usage.}
\item{MSe}{A boolean value that determines whether the
spectra were recorded using MSe or not}
\item{MSe}{A boolean value that determines whether the spectra were recorded using MSe or not}
\item{plots}{A boolean value that determines whether the pseudospectra in XCMS should be plotted}
}
\value{
The \code{msmsWorkspace} with msms-spectra read.
The \code{msmsWorkspace} with msms-spectra read.
}
\description{
The filenames of the raw LC-MS runs are read from the
array \code{files} in the global enviroment. See the
vignette \code{vignette("RMassBank")} for further details
about the workflow.
The filenames of the raw LC-MS runs are read from the array \code{files}
in the global enviroment.
See the vignette \code{vignette("RMassBank")} for further details about the
workflow.
}
\author{
Michael Stravs, Eawag <michael.stravs@eawag.ch>
Michael Stravs, Eawag <michael.stravs@eawag.ch>
Erik Mueller, UFZ
Erik Mueller, UFZ
}
\seealso{
\code{\link{msmsWorkspace-class}},
\code{\link{msmsWorkflow}}
\code{\link{msmsWorkspace-class}}, \code{\link{msmsWorkflow}}
}
\docType{class}
\name{msmsWorkspace-class}
\alias{msmsWorkspace-class}
\alias{show,msmsWorkspace-method}
\title{Workspace for \code{msmsWorkflow} data}
\description{
A workspace which stores input and output data for
\code{\link{msmsWorkflow}}.
}
\details{
Slots:
\describe{ \item{files}{The input file names}
\item{specs}{The spectra extracted from the raw files}
\item{analyzedSpecs}{The spectra with annotated peaks
after workflow step 2.} \item{aggregatedSpecs}{The
\code{analyzedSpec} data regrouped and aggregated, after
workflow step 3.} \item{rc, rc.ms1}{The recalibration
curves generated in workflow step 4.}
\item{recalibratedSpecs}{The spectra from \code{specs}
recalibrated with the curves from \code{rc, rc,ms1}.}
\item{analyzedRcSpecs}{The recalibrated spectra with
annotated peaks after workflow step 5.}
\item{aggregatedRcSpecs}{The \code{analyzedRcSpec} data
regrouped and aggregated, after workflow step 6.}
\item{reanalyzedRcSpecs}{The regrouped and aggregated
spectra, with added reanalyzed peaks (after step 7, see
\code{\link{reanalyzeFailpeaks}}).}
\item{refilteredRcSpecs}{Final data to use for MassBank
record creation after multiplicity filtering (step 8).} }
Methods: \describe{ \item{show}{Shows a brief summary of
the object. Currently only the included files.} }
}
\author{
Michael Stravs, Eawag <michael.stravs@eawag.ch>
}
\seealso{
\code{\link{msmsWorkflow}}
}
\docType{class}
\name{msmsWorkspace-class}
\alias{msmsWorkspace-class}
\alias{show,msmsWorkspace-method}
\title{Workspace for \code{msmsWorkflow} data}
\description{
A workspace which stores input and output data for \code{\link{msmsWorkflow}}.
}
\details{
Slots:
\describe{
\item{files}{The input file names}
\item{specs}{The spectra extracted from the raw files}
\item{analyzedSpecs}{The spectra with annotated peaks after workflow step 2.}
\item{aggregatedSpecs}{The \code{analyzedSpec} data regrouped and aggregated,
after workflow step 3.}
\item{rc, rc.ms1}{The recalibration curves generated in workflow step 4.}
\item{recalibratedSpecs}{The spectra from \code{specs} recalibrated with the curves
from \code{rc, rc,ms1}.}
\item{analyzedRcSpecs}{The recalibrated spectra with annotated peaks after
workflow step 5.}
\item{aggregatedRcSpecs}{The \code{analyzedRcSpec} data regrouped and aggregated,
after workflow step 6.}
\item{reanalyzedRcSpecs}{The regrouped and aggregated spectra, with added reanalyzed
peaks (after step 7, see \code{\link{reanalyzeFailpeaks}}).}
\item{refilteredRcSpecs}{Final data to use for MassBank record creation after
multiplicity filtering (step 8).}
}
Methods: \describe{
\item{show}{Shows a brief summary of the object. Currently only the included files.}
}
}
\author{
Michael Stravs, Eawag <michael.stravs@eawag.ch>
}
\seealso{
\code{\link{msmsWorkflow}}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment