get_mz_table: get_mz_table

View source: R/GenerateMassTraceList.R

get_mz_tableR Documentation

get_mz_table

Description

This is basically a wrapper-function around the enviPat package. It takes a table with columns "molecule", "SumForm_c" and "main_adduct" and calculates theoretical m/z values and abundances for isotopologues down to a user-defined abundance threshold.

Usage

get_mz_table(
  DT,
  instrumentRes,
  RelInt_threshold = 0.05,
  stick_method = "intensoid",
  adducts,
  isotopes,
  screening_adducts = NULL
)

Arguments

DT

data.table with columns "molecule", "SumForm_c", "adduct_c". Additional columns with "user.rtmin", and "user.rtmax" (start and end times of peaks in seconds won't be required by this, but the next function in the mzRAPP pipeline so it is recommended to add them already here.) (see details)

instrumentRes

data frame with mz vs resolution dependence (see resolution_list) e.g. "resolution_list$'OTFusion,QExactiveHF_120000@200'"

RelInt_threshold

relative abundance of the lowest isotopologue to be considered as percentage

stick_method

method that should be used to calculate discrete m/z values from calculated profile pattern e.g. "intensoid" (see vdetect)

adducts

data frame containing adducts (see adducts)

isotopes

data frame containing isotopes (see isotopes)

screening_adducts

vector of adduct names to be added for all molecules (if not already in the provided DT)

Details

Make sure that molecular formulas in column "SumForm_c" only contain valid molecular formulas as described in check_chemform. Otherwise, the function might never complete. Additional columns in DT will be retained in the output of the function. However, the column names "adduct", "isoab", "formula", "charge" and "mz" are reserved.

Value

data.table with columns "molecule", "formula", "adduct", "charge", "m/z" and "abundance"


YasinEl/mzRAPP documentation built on Feb. 18, 2024, 11:49 a.m.