From 91544f828f9f38bd251ca72c1a3e869d97e761a0 Mon Sep 17 00:00:00 2001 From: jorainer Date: Thu, 12 Oct 2023 07:36:33 +0200 Subject: [PATCH 1/2] Add reference to the MsQuality paper --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ vignettes/references.bib | 18 ++++++++++++++++++ vignettes/xcms-preprocessing.Rmd | 23 +++++++++++++---------- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d542685..aadd99b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: xcmsTutorials Title: Exploring and Analyzing LC-MS data with Spectra and xcms -Version: 1.0.2 +Version: 1.0.3 Authors@R: c( person(given = "Johannes", family = "Rainer", email = "Johannes.Rainer@eurac.edu", diff --git a/NEWS.md b/NEWS.md index 3dd6425..e3bf8cb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # xcmsTutorials 1.0 +## Changes in 1.0.3 + +- Add reference to the `MsQuality` paper. + ## Changes in 1.0.2 - Add the `msdata` to *depends* to ensure it's going to be installed. diff --git a/vignettes/references.bib b/vignettes/references.bib index b95f5e0..d490b4d 100644 --- a/vignettes/references.bib +++ b/vignettes/references.bib @@ -117,3 +117,21 @@ @article{gattoMSnbaseEfficientElegant2020a language = {eng}, pmid = {32902283} } + +@article{naake_msquality_2023, + title = {{MsQuality} - an interoperable open-source package for the calculation of standardized quality metrics of mass spectrometry data}, + issn = {1367-4811}, + doi = {10.1093/bioinformatics/btad618}, + abstract = {MOTIVATION: Multiple factors can impact accuracy and reproducibility of mass spectrometry data. There is a need to integrate quality assessment and control into data analytic workflows. +RESULTS: The MsQuality package calculates 43 low-level quality metrics based on the controlled mzQC vocabulary defined by the HUPO-PSI on a single mass spectrometry-based measurement of a sample. It helps to identify low-quality measurements and track data quality. Its use of community-standard quality metrics facilitates comparability of quality assessment and control (QA/QC) criteria across datasets. +AVAILABILITY: The R package MsQuality is available through Bioconductor at https://bioconductor.org/packages/MsQuality. +SUPPLEMENTARY INFORMATION: Supplementary data are available at Bioinformatics online.}, + language = {eng}, + journal = {Bioinformatics (Oxford, England)}, + author = {Naake, Thomas and Rainer, Johannes and Huber, Wolfgang}, + month = oct, + year = {2023}, + pmid = {37812234}, + keywords = {mass spectrometry, metabolomics, proteomics, quality control, R}, + pages = {btad618}, +} diff --git a/vignettes/xcms-preprocessing.Rmd b/vignettes/xcms-preprocessing.Rmd index cd16c4b..c977c8b 100644 --- a/vignettes/xcms-preprocessing.Rmd +++ b/vignettes/xcms-preprocessing.Rmd @@ -339,7 +339,7 @@ intensity(sp) |> The same operation can also be applied to the full data set. As an example we calculate below the total ion signal for each spectrum in the first file and -determine the distribution of these using the `quantiles` function. +determine the distribution of these using the `quantile` function. ```{r} #' Calculate the distribution of total ion signal of the first file @@ -363,8 +363,8 @@ The total ion signals of the two data files is (as expected) similar. Through the `Spectra` object we have thus the possibility to inspect and explore the (raw) MS data of an experiment and use its functionality to create own quality assessment functions. Alternatively, also the `r Biocpkg("MsQuality")` package -could be to calculate core MS quality metrics on a full experiment -(`MsExperiment`) or individual data files (`Spectra`). +[@naake_msquality_2023] could be to calculate core MS quality metrics on a full +experiment (`MsExperiment`) or individual data files (`Spectra`). ## Data visualization @@ -602,7 +602,7 @@ data |> filterRt(rt = c(175, 189)) |> filterMz(mz = serine_mz + c(-0.05, 0.05)) |> chromatogram() |> -plot() + plot() ``` The area of such a chromatographic peak is supposed to be proportional to the @@ -636,7 +636,7 @@ focus on the mass peak for serine. #' Visualize the profile-mode mass peak for [M+H]+ of serine sps[1] |> filterMzRange(c(106.02, 106.07)) |> - plotSpectra() + plotSpectra(lwd = 2) abline(v = serine_mz, col = "#ff000080", lty = 3) ``` @@ -657,7 +657,7 @@ region in both data files. data |> filterRt(rt = c(175, 189)) |> filterMz(mz = c(106.02, 106.07)) |> - plot() + plot(cex = 2) ``` The lower panel of the plot shows all mass peaks measured by the instrument: @@ -691,7 +691,7 @@ spectra(data) <- sps_cent data |> filterRt(rt = c(175, 189)) |> filterMz(mz = c(106.02, 106.07)) |> - plot() + plot(cex = 2) ``` The impact of the centroiding is clearly visible: each signal for an ion in a @@ -1455,7 +1455,8 @@ the definition of the features and display the first 6 rows ```{r correspondence-featureDefinitions} #' Definition of the features -featureDefinitions(data) |> head() +featureDefinitions(data) |> + head() ``` Each row defines one feature and provides information on it's *m/z* (column @@ -1480,7 +1481,8 @@ abundances and show the first 6 rows. ```{r} #' Get abundances for the first 6 features -featureValues(data, method = "sum") |> head() +featureValues(data, method = "sum") |> + head() ``` We could now use this feature matrix for any downstream analysis. Such feature @@ -1704,7 +1706,8 @@ simply use the `assay` function. ```{r} #' Get feature values -assay(res) |> head() +assay(res) |> + head() ``` The `SummarizedExperiment` can be subset by rows and/or columns. From 829c7eeddde6a196c3a429720475c8f0627e746a Mon Sep 17 00:00:00 2001 From: jorainer Date: Thu, 12 Oct 2023 07:38:15 +0200 Subject: [PATCH 2/2] Remove cex = 2 --- vignettes/xcms-preprocessing.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vignettes/xcms-preprocessing.Rmd b/vignettes/xcms-preprocessing.Rmd index c977c8b..a6b1b53 100644 --- a/vignettes/xcms-preprocessing.Rmd +++ b/vignettes/xcms-preprocessing.Rmd @@ -657,7 +657,7 @@ region in both data files. data |> filterRt(rt = c(175, 189)) |> filterMz(mz = c(106.02, 106.07)) |> - plot(cex = 2) + plot() ``` The lower panel of the plot shows all mass peaks measured by the instrument: @@ -691,7 +691,7 @@ spectra(data) <- sps_cent data |> filterRt(rt = c(175, 189)) |> filterMz(mz = c(106.02, 106.07)) |> - plot(cex = 2) + plot() ``` The impact of the centroiding is clearly visible: each signal for an ion in a