Title: | Natural Abundance Correction of Mass Spectrometer Data |
---|---|
Description: | An isotope natural abundance correction algorithm that is needed especially for high resolution mass spectrometers. Supports correction for 13C, 2H and 15N. Su X, Lu W and Rabinowitz J (2017) <doi:10.1021/acs.analchem.7b00396>. |
Authors: | Xiaoyang Su [aut] , Lance Parsons [aut, cre] , Yujue Wang [ctb] , Princeton University [cph] |
Maintainer: | Lance Parsons <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.1.9000 |
Built: | 2024-11-13 04:13:37 UTC |
Source: | https://github.com/xiaoyangsu/accucor |
AccuCor is an isotope natural abundance correction algorithm that is needed especially for high resolution mass spectrometers. AccuCor supports correction for 13C, 2H and 15N.
Maintainer: Lance Parsons [email protected] (ORCID)
Authors:
Xiaoyang Su [email protected] (ORCID)
Other contributors:
Yujue Wang [email protected] (ORCID) [contributor]
Princeton University [copyright holder]
Useful links:
Natural Abundance carbon isotope correction for one metabolite
carbon_isotope_correction( formula, datamatrix, label, Resolution, ResDefAt = 200, purity = 0.99, ReportPoolSize = TRUE )
carbon_isotope_correction( formula, datamatrix, label, Resolution, ResDefAt = 200, purity = 0.99, ReportPoolSize = TRUE )
formula |
String representing molecular formula |
datamatrix |
Matrix of abundances for each sample for each isotope |
label |
vector of integer labels |
Resolution |
For Exactive, the Resolution is 100000, defined at Mw 200 |
ResDefAt |
Resolution defined at (in Mw), e.g. 200 Mw |
purity |
Carbon 13 purity, default: 0.99 |
ReportPoolSize |
default: TRUE |
Named list of matrices: 'Corrected', 'Normalized', 'PoolBeforeDF', and 'PoolAfterDF'.
## Not run: carbon_isotope_correction( formula = "C6H13O9P", datamatrix = DataMatrix, label = c(0, 1, 2, 3, 4, 5), Resolution = 100000 ) ## End(Not run)
## Not run: carbon_isotope_correction( formula = "C6H13O9P", datamatrix = DataMatrix, label = c(0, 1, 2, 3, 4, 5), Resolution = 100000 ) ## End(Not run)
Standardize data frame columns and data types
clean_data_frame(df, columns_to_skip = NULL)
clean_data_frame(df, columns_to_skip = NULL)
df |
Data frame to clean |
columns_to_skip |
Specify column heading to skip. All other columns not named 'compound', 'formula', and 'isotopelabel' will be assumed to be sample names. |
"cleaned" data.frame which with columns 'compound', 'formula', 'isotope_label', label_index', followed by columns for each sample
Natural Abundance deuterium isotope correction for one metabolite
deuterium_isotope_correction( formula, datamatrix, label, Resolution, ResDefAt = 200, purity = 0.99, ReportPoolSize = TRUE )
deuterium_isotope_correction( formula, datamatrix, label, Resolution, ResDefAt = 200, purity = 0.99, ReportPoolSize = TRUE )
formula |
String representing molecular formula |
datamatrix |
Matrix of abundances for each sample for each isotope |
label |
vector of integer labels |
Resolution |
For Exactive, the Resolution is 100000, defined at Mw 200 |
ResDefAt |
Resolution defined at (in Mw), e.g. 200 Mw |
purity |
Deuterium purity, default: 0.99 |
ReportPoolSize |
default: TRUE |
Named list of matrices: 'Corrected', 'Normalized', 'PoolBeforeDF', and 'PoolAfterDF'.
## Not run: deuterium_isotope_correction( formula = "C6H13O9P", datamatrix = DataMatrix, label = c(0, 1), Resolution = 100000 ) ## End(Not run)
## Not run: deuterium_isotope_correction( formula = "C6H13O9P", datamatrix = DataMatrix, label = c(0, 1), Resolution = 100000 ) ## End(Not run)
natural_abundance_correction
returns the corrected and normalized
intensities of isotopically labeled mass spectrometry data. It was designed
to work with input data from
El-MAVEN and
MAVEN software.
natural_abundance_correction( data, sheet = NULL, compound_database = NULL, output_base = NULL, output_filetype = "xlsx", columns_to_skip = NULL, resolution, resolution_defined_at = 200, purity = NULL, report_pool_size_before_df = FALSE, path = NULL )
natural_abundance_correction( data, sheet = NULL, compound_database = NULL, output_base = NULL, output_filetype = "xlsx", columns_to_skip = NULL, resolution, resolution_defined_at = 200, purity = NULL, report_pool_size_before_df = FALSE, path = NULL )
data |
Path to input data file (xlsx, xls, csv, txt, or tsv) OR dataframe. If dataframe is specified, specify output_base to output files automatically written. |
sheet |
Name of sheet in xlsx file with columns 'compound', 'formula', 'isotopelabel', and one column per sample. Defaults to the first sheet. |
compound_database |
Path to compound database in csv format. Only used for classic MAVEN style input when formula is not specified. |
output_base |
Path to basename of output file, default is the basename of the input path. '_corrected' will be appended. If 'FALSE' then no output file is written. |
output_filetype |
Filetype of the output file, one of: 'xls', xlsx', 'csv', or 'tsv'. The default is 'xlsx'. |
columns_to_skip |
Specify column heading to skip. All other columns not named 'compound', 'formula', and 'isotopelabel' will be assumed to be sample names. |
resolution |
For Exactive, the resolution is 100000, defined at Mw 200 |
resolution_defined_at |
Mw at which the resolution is defined, default 200 Mw |
purity |
Isotope purity, default: Carbon 0.99; Deuterium 0.98; Nitrogen 0.99 |
report_pool_size_before_df |
Report PoolSizeBeforeDF, default = FALSE |
path |
Deprecated. Specify path to input data file (alias for 'data'). |
C13, H2, and N15 isotopes are supported. The isotopes are detected from the
isotopeLabel
column of the input file. The expected label text is
C13-label-#
. D-label-#
. or N15-label-#
. Parent
(unlabeled) compounds are specified by C12 PARENT
.
Named list of matrices: 'Corrected', 'Normalized', 'PoolBeforeDF', and 'PoolAfterDF'.
## Not run: natural_abundance_correction("inst/extdata/C_Sample_Input_Simple.xlsx", Resolution = 100000, ResDefAt = 200 ) ## End(Not run)
## Not run: natural_abundance_correction("inst/extdata/C_Sample_Input_Simple.xlsx", Resolution = 100000, ResDefAt = 200 ) ## End(Not run)
Natural Abundance deuterium isotope correction for one metabolite
nitrogen_isotope_correction( formula, datamatrix, label, Resolution, ResDefAt = 200, purity = 0.99, ReportPoolSize = TRUE )
nitrogen_isotope_correction( formula, datamatrix, label, Resolution, ResDefAt = 200, purity = 0.99, ReportPoolSize = TRUE )
formula |
String representing molecular formula |
datamatrix |
Matrix of abundances for each sample for each isotope |
label |
vector of integer labels |
Resolution |
For Exactive, the Resolution is 100000, defined at Mw 200 |
ResDefAt |
Resolution defined at (in Mw), e.g. 200 Mw |
purity |
Nitrogen purity, default: 0.99 |
ReportPoolSize |
default: TRUE |
Named list of matrices: 'Corrected', 'Normalized', 'PoolBeforeDF', and 'PoolAfterDF'.
## Not run: nitrogen_isotope_correction( formula = "C23H38N7O17P3S", datamatrix = DataMatrix, label = c(0, 1, 2, 3, 4, 5, 6, 7), Resolution = 140000 ) ## End(Not run)
## Not run: nitrogen_isotope_correction( formula = "C23H38N7O17P3S", datamatrix = DataMatrix, label = c(0, 1, 2, 3, 4, 5, 6, 7), Resolution = 140000 ) ## End(Not run)
Natural Abundance correction for Carbon labeled samples
read_elmaven( path, sheet = NULL, compound_database = NULL, columns_to_skip = NULL, filetype = NULL, ... )
read_elmaven( path, sheet = NULL, compound_database = NULL, columns_to_skip = NULL, filetype = NULL, ... )
path |
Path to input file. |
sheet |
Name of sheet in xlsx file with columns 'compound', 'formula', 'isotopelabel', and one column per sample. Defaults to the first sheet. |
compound_database |
Path to compound database in csv format. Only used for classic MAVEN style input when formula is not specified. |
columns_to_skip |
Specify column heading to skip. All other columns not named 'compound', 'formula', and 'isotopelabel' will be assumed to be sample names. |
filetype |
Specify file type, default is to determine by file extension. |
... |
Pass additional parameters to readxl::read_excel |
List containing three items: "original" data.frame which is result of read_excel, "cleaned" data.frame which with columns 'compound', 'formula', 'isotope_label', label_index', followed by columns for each sample, and "isotope" which is a character indicating the isotope
## Not run: read_elmaven_xlsx("ExcelFile", "Sheet1") ## End(Not run)
## Not run: read_elmaven_xlsx("ExcelFile", "Sheet1") ## End(Not run)