Skip to contents

This function calculates the isotopologue fraction of each metabolite and compares it with the theoretical isotopologue fraction. It generates a table with the results and barplots of the experimental and theoretical isotopologue fraction of each metabolite with error bars.

Usage

MSPT_fun(
  path,
  p = 0.513,
  outpath = "./MSPT_out/",
  minCID = 0.02,
  maxBias = 5,
  feature = NULL
)

Arguments

path

Path to the input file (TSV format)

p

Natural abundance of 13C (default = 0.513)

outpath

Path to the output directory (default = "./MSPT_out/"), if NULL, no output is generated

minCID

Minimum value of CID to be considered (default = 0.02)

maxBias

Maximum value of bias to be considered (default = 5)

feature

Name of the metabolite to preview (default = NULL)

plotLowCID

Logical, if TRUE, plot the isotopologues with CID < minCID (default = FALSE) (not implemented yet)

Value

A list containing the following elements:

  • Table A data frame containing the results of the calculations (sample, metabolite, isotopologue, area, Total_Area, Ratio, Theoretical_Ratios, Mean_Ratios, Mean_Ratios_SD, Thresholds, Bias (

  • figures A list of ggplot objects containing the barplots of the experimental and theoretical isotopologue fraction of each metabolite with error bars

Examples

if (FALSE) { # \dontrun{
file <- glue::glue(system.file(package = "graphstatsr"), "/dataset/MSPT_test.tsv")
res <- MSPT_fun(path = file, outpath = NULL)
str(res, max.level = 2)
} # }