Skip to content

Commit

Permalink
Merge pull request #13 from jorainer/jomain
Browse files Browse the repository at this point in the history
Jomain
  • Loading branch information
jorainer authored Oct 12, 2023
2 parents ded827a + 829c7ee commit 74eceb4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
18 changes: 18 additions & 0 deletions vignettes/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
19 changes: 11 additions & 8 deletions vignettes/xcms-preprocessing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
```

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 74eceb4

Please sign in to comment.