Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable nested parallel processing for chromatograms #602

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MSnbase
Title: Base Functions and Classes for Mass Spectrometry and Proteomics
Version: 2.29.4
Version: 2.29.5
Description: MSnbase provides infrastructure for manipulation,
processing and visualisation of mass spectrometry and
proteomics data, ranging from raw to quantitative and
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# MSnbase 2.29

## MSnbase 2.29.5

- Disable nested parallel processing for `chromatogram()` method.

## MSnbase 2.29.4

- Move XML to suggests.
Expand Down
2 changes: 1 addition & 1 deletion R/functions-OnDiskMSnExp.R
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ precursorValue_OnDiskMSnExp <- function(object, column) {
match(fileNames(subs), fns),
FUN = function(cur_sample, cur_file, rtm, mzm, aggFun) {
## Load all spectra for that file. applies also any proc steps
sps <- spectra(cur_sample)
sps <- spectra(cur_sample, BPPARAM = SerialParam())
## Related to issue #229: can we avoid getting all spectra and
## just return the intensity values for each spectrum instead?
rts <- rtime(cur_sample)
Expand Down
2 changes: 1 addition & 1 deletion R/methods-pSet.R
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ setMethod("length", "pSet", function(x) length(assayData(x)))

setMethod("assayData", "pSet", function(object) object@assayData)

setMethod("spectra", "MSnExp", function(object) {
setMethod("spectra", "MSnExp", function(object, ...) {
sl <- as.list(assayData(object))
fnames <- featureNames(object)
## reordering the spectra in the spectra list to match
Expand Down
93 changes: 51 additions & 42 deletions man/MSnSet-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
\alias{exprs,MSnSet-method}
\alias{dim,MSnSet-method}
\alias{fileNames,MSnSet-method}
%%\alias{normalise,MSnSet-method}
\alias{msInfo,MSnSet-method}
\alias{processingData,MSnSet-method}
\alias{qual,MSnSet-method}
\alias{qual}
%%\alias{ratios,MSnSet-method}
\alias{show,MSnSet-method}
\alias{purityCorrect,MSnSet-method}
\alias{purityCorrect,MSnSet,matrix-method}
Expand Down Expand Up @@ -82,7 +80,6 @@
\alias{detectorType,MSnSet-method}
\alias{description,MSnSet-method}

%% functions
\alias{updateFvarLabels}
\alias{updateSampleNames}
\alias{updateFeatureNames}
Expand Down Expand Up @@ -214,9 +211,6 @@
inherited methods.

\describe{
%% \item{$name}{\code{signature(x = "pSet")}: Access \code{name} column
%% in \code{featureData}. Note that this behaviour is different to
%% the \code{eSet}, where \code{$} accesses the \code{phenoData}. }
\item{acquisitionNum}{
\code{acquisitionNum(signature(object = "MSnSet"))}: Returns the
a numeric vector with acquisition number of each spectrum. The vector
Expand All @@ -235,26 +229,33 @@
names.
}


\item{dim}{\code{signature(x = "MSnSet")}: Returns the dimensions of
object's assay data, i.e the number of samples and the number of
features. }

\item{fileNames}{\code{signature(object = "MSnSet")}: Access file
names in the \code{processingData} slot. }

\item{msInfo}{\code{signature(object = "MSnSet")}: Prints the MIAPE-MS
meta-data stored in the \code{experimentData} slot. }

\item{processingData}{\code{signature(object = "MSnSet")}: Access the
\code{processingData} slot. }

\item{show}{\code{signature(object = "MSnSet")}: Displays object
content as text. }

\item{qual}{\code{signature(object = "MSnSet")}: Access the reporter
ion peaks description. }

\item{purityCorrect}{\code{signature(object = "MSnSet", impurities =
"matrix")}: performs reporter ions purity correction. See
\code{\link{purityCorrect}} documentation for more details. }

\item{normalise}{\code{signature(object = "MSnSet")}: Performs
\code{MSnSet} normalisation. See \code{\link{normalise}} for more
details. }

\item{t}{\code{signature(x = "MSnSet")}: Returns a transposed
\code{MSnSet} object where features are now aligned along columns
and samples along rows and the \code{phenoData} and
Expand All @@ -281,23 +282,22 @@
Coerce object from \code{MSnSet} to
\code{SummarizedExperiment}. Only part of the metadata is
retained. See \code{addMSnSetMetadata} and the example below for
details. }
details.}

%% \item{ratios}{\code{signature(object = "MSnSet")}: ... }
\item{write.exprs}{signature(x = "MSnSet")}{Writes expression values
\item{write.exprs}{\code{signature(x = "MSnSet")}: Writes expression values
to a tab-separated file (default is \code{tmp.txt}). The
\code{fDataCols} parameter can be used to specify which
\code{featureData} columns (as column names, column number or
\code{logical}) to append on the right of the expression matrix.
The following arguments are the same as \code{write.table}.}

\item{combine}{signature(x = "MSnSet", y = "MSnSet", ...)}{ Combines
\item{combine}{\code{signature(x = "MSnSet", y = "MSnSet", ...)}: Combines
2 or more \code{MSnSet} instances according to their feature names.
Note that the \code{qual} slot and the processing information are
silently dropped. }

\item{topN}{signature(object = "MSnSet", groupBy, n = 3, fun, ..., verbose =
isMSnbaseVerbose())}{
\item{topN}{\code{signature(object = "MSnSet", groupBy, n = 3, fun,
..., verbose = isMSnbaseVerbose())}:
Selects the \code{n} most intense features (typically peptides or
spectra) out of all available for each set defined by
\code{groupBy} (typically proteins) and creates a new instance of
Expand All @@ -316,8 +316,8 @@
detailed in the \code{synapter} package vignette.
}

\item{filterNA}{signature(object = "MSnSet", pNA = "numeric",
pattern = "character", droplevels = "logical")}{ This method
\item{filterNA}{\code{signature(object = "MSnSet", pNA = "numeric",
pattern = "character", droplevels = "logical")}: This method
subsets \code{object} by removing features that have (strictly)
more than \code{pNA} percent of NA values. Default \code{pNA} is
0, which removes any feature that exhibits missing data.
Expand All @@ -335,38 +335,39 @@
methods for missing data exploration.
}

\item{filterZero}{signature(object = "MSnSet", pNA = "numeric",
pattern = "character", droplevels = "logical")}{ As
\item{filterZero}{\code{signature(object = "MSnSet", pNA = "numeric",
pattern = "character", droplevels = "logical")}: As
\code{filterNA}, but for zeros.
}

\item{filterMsLevel}{signature(object = "MSnSet", msLevel. =
"numeric", fcol = "character")}{ Keeps only spectra with level
\item{filterMsLevel}{\code{signature(object = "MSnSet", msLevel. =
"numeric", fcol = "character")} Keeps only spectra with level
\code{msLevel.}, as defined by the \code{fcol} feature variable
(default is \code{"msLevel"}). }

(default is \code{"msLevel"}).
}

\item{log}{signature(object = "MSnSet", base = "numeric")}{ Log
\item{log}{\code{signature(object = "MSnSet", base = "numeric")} Log
transforms \code{exprs(object)} using
\code{base::log}. \code{base} (defaults is \code{e='exp(1)'}) must
be a positive or complex number, the base with respect to which
logarithms are computed.
}

\item{droplevels}{signature(x = "MSnSet", ...)}{Drops the unused
\item{droplevels}{\code{signature(x = "MSnSet", ...)}Drops the unused
factor levels in the \code{featureData} slot. See
\code{\link{droplevels}} for details.
}

\item{impute}{\code{signature(object = "MSnSet", ...)}}{
\item{impute}{\code{signature(object = "MSnSet", ...)}
Performs data imputation on the \code{MSnSet} object.
See \code{\link{impute}} for more details.
}

\item{trimws}{signature(object = "MSnSet", ...)}{Trim leading and/or
\item{trimws}{\code{signature(object = "MSnSet", ...)}Trim leading and/or
trailing white spaces in the feature data slot. Also available for
\code{data.frame} objects. See \code{?base::\link[base]{trimws}}
for details. }
for details.
}

}

Expand All @@ -377,15 +378,15 @@

\section{Plotting}{
\describe{
\item{meanSdPlot}{\code{signature(object = "MSnSet")}}{ Plots row
\item{meanSdPlot}{\code{signature(object = "MSnSet")} Plots row
standard deviations versus row means. See
\code{\link{meanSdPlot}} (\code{vsn} package) for more details.
}

\item{image}{\code{signature(x = "MSnSet", facetBy = "character",
sOrderBy = "character", legend = "character", low = "character",
high = "character", fnames = "logical", nmax =
"numeric")}}{Produces an heatmap of expression values in the
"numeric")} Produces an heatmap of expression values in the
\code{x} object. Simple horizontal facetting is enabled by
passing a single character as \code{facetBy}. Arbitrary
facetting can be performed manually by saving the return value
Expand All @@ -410,17 +411,18 @@
}

\item{plotNA}{\code{signature(object = "MSnSet", pNA =
"numeric")}}{
"numeric")}
Plots missing data for an \code{MSnSet} instance. \code{pNA} is a
\code{numeric} of length 1 that specifies the percentage
of accepted missing data values per features. This value will be
highlighted with a point on the figure, illustrating the overall
percentage of NA values in the full data set and the number of
proteins retained. Default is 1/2. See also
\code{\link{plotNA}}.}
\code{\link{plotNA}}.
}

\item{MAplot}{\code{signature(object = "MSnSet", log.it = "logical",
base = "numeric", ...)}}{
base = "numeric", ...)}
Produces MA plots (Ratio as a function
of average intensity) for the samples in \code{object}. If
\code{ncol(object) == 2}, then one MA plot is produced using the
Expand All @@ -431,62 +433,69 @@
\code{base}. Further \code{...} arguments will be passed to the
respective functions.
}

\item{addIdentificationData}{\code{signature(object = "MSnSet", ...)}:
Adds identification data to a \code{MSnSet} instance.
See \code{\link{addIdentificationData}} documentation for
more details and examples. }
more details and examples.
}

\item{removeNoId}{\code{signature(object = "MSnSet", fcol =
"pepseq", keep = NULL)}: Removes non-identified features. See
\code{\link{removeNoId}} documentation for more details and
examples. }
examples.
}

\item{removeMultipleAssignment}{\code{signature(object = "MSnSet",
fcol = "nprot")}: Removes protein groups (or feature belong to
protein groups) with more than one member. The latter is defined
by extracting a feature variable (default is
\code{"nprot"}). Also removes non-identified features/ }
\code{"nprot"}). Also removes non-identified features.
}

\item{idSummary}{\code{signature(object = "MSnSet", ...)}: Prints a
summary that lists the percentage of identified features per file
(called \code{coverage}). }
(called \code{coverage}).
}

}
}

\section{Functions}{
\describe{

\item{updateFvarLabels}{signature(object, label, sep)}{ This
\item{updateFvarLabels}{\code{signature(object, label, sep)} This
function updates \code{object}'s featureData variable labels by
appending \code{label}. By default, \code{label} is the variable
name and the separator \code{sep} is \code{.}.}
name and the separator \code{sep} is \code{.}.
}

\item{updateSampleNames}{signature(object, label, sep)}{ This
\item{updateSampleNames}{\code{signature(object, label, sep)} This
function updates \code{object}'s sample names by appending
\code{label}. By default, \code{label} is the variable name and
the separator \code{sep} is \code{.}.}

\item{updateFeatureNames}{signature(object, label, sep)}{ This
\item{updateFeatureNames}{\code{signature(object, label, sep)} This
function updates \code{object}'s feature names by appending
\code{label}. By default, \code{label} is the variable name and
the separator \code{sep} is \code{.}.}

\item{ms2df}{signature(x, fcols)}{Coerces the \code{MSnSet} instance
\item{ms2df}{\code{signature(x, fcols)} Coerces the \code{MSnSet} instance
to a \code{data.frame}. The direction of the data is retained and
the feature variable labels that match \code{fcol} are appended to
the expression values. See also \code{as(x, "data.frame")} above.
}

\item{addMSnSetMetadata}{signature(x, y)}{When coercing an
\item{addMSnSetMetadata}{\code{signature(x, y)} When coercing an
\code{MSnSet} \code{y} to a \code{SummarizedExperiment} \code{x}
with \code{x <- as(y, "SummarizedExperiment")}, most of \code{y}'s
metadata is lost. Only the file names, the processing log and the
MSnbase version from the \code{processingData} slots are passed
along. The \code{addMSnSetMetadata} function can be used to add
the complete \code{processingData}, \code{experimentData} and
\code{protocolData} slots. The downside of this is that MSnbase is
now required to use the \code{SummarizedExperiment} object. }
now required to use the \code{SummarizedExperiment} object.
}

}
}
Expand Down
14 changes: 7 additions & 7 deletions man/ReporterIons-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
6-plex set. Load with \code{data(TMT6)}. }
\item{\code{TMT7}:}{\code{ReporterIon} object for the TMT
6-plex set plus the isobaric tag. Load with \code{data(TMT6)}. }
}
}
}

\section{Objects from the Class}{
Expand Down Expand Up @@ -103,7 +103,7 @@
\item{\code{mz(object, ...)}}{ Returns the expected mz values of
reporter ions. Additional arguments are currently ignored. }
\item{\code{reporterColours(object)} or reporterColors(object)}{
Returns the colours used to highlight the reporter ions. }
Returns the colours used to highlight the reporter ions. }
\item{\code{reporterNames(object)}}{ Returns the name of the
individual reporter ions. If not specified or is an incorrect
number of names is provided at initialisation, the names are
Expand All @@ -129,16 +129,16 @@
amine-reactive isobaric tagging reagents."
\emph{Mol Cell Proteomics}, 2004 Dec;3(12):1154-69.
Epub 2004 Sep 22. PubMed PMID: 15385600.
Thompson A, Sch\"{a}fer J, Kuhn K, Kienle S, Schwarz J, Schmidt G,

Thompson A, Schäfer J, Kuhn K, Kienle S, Schwarz J, Schmidt G,
Neumann T, Johnstone R, Mohammed AK, Hamon C.
"Tandem mass tags: a novel quantification strategy for comparative
analysis of complex protein mixtures by MS/MS."
\emph{Anal Chem.} 2003 Apr 15;75(8):1895-904. \emph{Erratum} in:
\emph{Anal Chem.} 2006 Jun 15;78(12):4235. Mohammed, A Karim A [added]
and
and
\emph{Anal Chem.} 2003 Sep 15;75(18):4942. Johnstone, R [added].
PubMed PMID: 12713048.
PubMed PMID: 12713048.
}

\author{
Expand All @@ -161,7 +161,7 @@ ri[1:2]
}

\seealso{
\code{\link{TMT6}} or \code{\link{iTRAQ4}} for readily available examples.
\code{\link{TMT6}} or \code{\link{iTRAQ4}} for readily available examples.
}

\keyword{classes}
8 changes: 4 additions & 4 deletions man/TMT6.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
These objects are used to plot the reporter ions of interest in an
MSMS spectra (see \code{"\linkS4class{Spectrum2}"}) as well as for
quantification (see \code{\link{quantify}}).

}

\usage{
Expand All @@ -46,15 +46,15 @@ TMT11HCD
}

\references{
Thompson A, Sch\"{a}fer J, Kuhn K, Kienle S, Schwarz J, Schmidt G,
Thompson A, Schäfer J, Kuhn K, Kienle S, Schwarz J, Schmidt G,
Neumann T, Johnstone R, Mohammed AK, Hamon C.
"Tandem mass tags: a novel quantification strategy for comparative
analysis of complex protein mixtures by MS/MS."
\emph{Anal Chem.} 2003 Apr 15;75(8):1895-904. \emph{Erratum} in:
\emph{Anal Chem.} 2006 Jun 15;78(12):4235. Mohammed, A Karim A [added]
and
and
\emph{Anal Chem.} 2003 Sep 15;75(18):4942. Johnstone, R [added].
PubMed PMID: 12713048.
PubMed PMID: 12713048.
}

\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/listOf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading