-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.Rmd
More file actions
122 lines (94 loc) · 5.04 KB
/
Copy pathREADME.Rmd
File metadata and controls
122 lines (94 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
library(CorMID)
```
# CorMID
<!-- badges: start -->
[](https://github.com/janlisec/CorMID/actions/workflows/R-CMD-check.yaml)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://github.com/janlisec/CorMID/actions/workflows/test-coverage.yaml)
[](https://app.codecov.io/gh/janlisec/CorMID)
[](https://CRAN.R-project.org/package=CorMID)
[](https://doi.org/10.3390/metabo12050408)
<!-- badges: end -->
**CorMID** is an R-package providing functions to solve problems during
metabolic flux analysis using HR-APCI-MS.
In metabolic flux experiments tracer molecules (often glucose containing
labelled carbon) are incorporated in compounds measured using mass spectrometry.
The mass isotopologue distributions (MIDs) of these compounds needs to be
corrected for natural abundance of labelled carbon and other effects, which are
specific on the compound and ionization technique applied. This package provides
functions to correct such effects in high resolution gas chromatography
atmospheric pressure chemical ionization mass spectrometry (GC-HR-APCI-MS)
analyses.
## Installation
You can install the development version of CorMID from
[GitHub](https://github.com/) with:
```{r install, eval = FALSE}
# install.packages("devtools")
devtools::install_github("janlisec/CorMID")
```
or install the version from [CRAN](https://cran.r-project.org/package=CorMID)
instead.
## Quick Example
**CorMID** is supposed to disentangle a complex MID. Complex means that the ion
intensities of the isotopes are influenced by natural abundance, artificial
labeling (e.g. by a <sup>13</sup>C-Glucose tracer) and mass spectrometry
artifacts (i.e. several potential adducts/fragments).
You can create and visualize such a complex mass spectrum, *i.e.* a vector of
measured ion intensities, by providing a *chemical formula*, the *true MID* and
an *adduct distribution* like follows:
```{r exmpl1}
# a chemical formula, here: Lactic acid 2 TMS
fml <- "C9H22O3Si2"
# the true mass isotopologue distribution, here: 10% U13C enriched
mid <- c(0.9, 0, 0, 0.1)
# adduct distribution, here: 3 different APCI adducts are formed
r <- list("M+H" = 0.8, "M-H" = 0.1, "M+H2O-CH4" = 0.1)
# reconstruct the measured intensity vector
rMID <- CorMID::recMID(mid = mid, r = r, fml = fml)
round(rMID, 3)
```
**CorMID** provides a class specific plotting function for such a reconstructed
MID:
```{r exmpl1_plot, fig.width=4, fig.height=3.5}
plot(rMID, ylim=c(0,0.6))
mtext(text = "Reconstructed MID", side = 3, line = -1.25, adj = 0.98, outer = T)
text(x = 3, y = 0.4, labels = "[M+H]+", pos=2)
```
Instead of labeling the mass spectrum with actual ion masses, **CorMID** unifies
the annotation for all molecules with respect to the largest adduct, in APCI
usually the [M+H]+, which is labeled as M+0. Other peaks are labeled indicating
the approximate mass difference to [M+H]+ in Dalton as M+1, M+2, etc.
Assuming that you have measured the above intensities in your experiment, the main
function of **CorMID** can estimate the underlying *MID* and *r* for you:
```{r exmpl2}
# disentangle the adduct ratios and true isotopologue distribution (enrichment) from the above test data
out <- CorMID::CorMID(int = rMID, fml = fml)
print(out)
```
Please note: no information regarding the true labeling status and the adduct
distribution was provided in the above function call. **CorMID** is able to
*guess* the most likely combination.
This allows you to perform the correction for natural abundance and technical
artifacts in a single step and extract the relevant labeling status for flux
analysis or other statistical evaluations.
However, in a real world experiment it would be a smart strategy to process
non-labeled control samples setting a fixed mid, *i.e.* c(1, 0, 0, 0) for
a molecule with 3 biological carbon atoms like lactic acid, to identify the
specific adducts *r* formed on your device for this molecule. In the next step
you can use this information to fix *r* while processing your labeled samples
which will improve the detection of the correct labeling status *MID*.
## Detailed documentation
You might either read the [Vignette](https://cran.r-project.org/package=CorMID/vignettes/CorMID.html)
describing the package functions in detail or read the [publication](https://doi.org/10.3390/metabo12050408)
which shows an evaluation of the performance of **CorMID** on several real data
sets.