Version: 1.0

Short Description

“R”-program that corrects 13C mass isotopomers spectra of metabolites for naturally occurring isotopes and peaks overlapping


  1. Description
  2. Functions
  3. Ways of using the code
  4. Execution the program

1. Description

Midcor is an “R”-program designed for correcting raw data, obtained for metabolites of interest using Gas Cromatography coupled with Mass Spectrometry (GCMS). It corrects for naturally occurring isotopes and peaks overlapping the raw 13C MID, obtained e.g. by applying programs Ramid or Cdf2mid to the data saved by mass spectrometers. In this way it supports an important part of workflow of 13C tracing data analysis leading to evaluation of intracellular metabolic fluxes in central metabolism. The corrected MID originated from substrates that are artificially enriched with 13C then can be used for simulations of steady state (Iso2Flux) or dynamic (Isodyn) conditions. To this end the program performs a correction for naturally occurring isotopes and also correction for “impurities” of the assay media that give peaks overlapping with the spectra of analyzed labeled metabolites. This program offers two ways of corrections of “impurities” resulted from overlapping the assayed mass isotopomer distribution with peaks produced either by unknown metabolites in the media, or by different fragments produced by the assayed metabolite 1.

Key features



Instrument Data Types

2. Functions: correction of raw MID



Tool Authors

Container Contributors


Git Repository

3. Ways of accessing the program

git clone

Optionally a library of R-functions "midcor" can be created

 cd <'path to the directory'/>midcor
 sudo R
 docker pull

or installed locally using a local copy of this repo:

 git clone
 cd <'path to the directory'>/container-midcor
 docker build -t midcor .

Here to create the docker image, the same github repository "" is used.

4. Execution the program

 library(midcor) # optionally, if this library was created (if not, use the option below)
 source("<'path to the directory'>/R/midcor.R") # if the library 'cdf2mid' was not installed
 source("<'path to the directory'>/R/lib.R")    # if the library 'cdf2mid' was not installed

Then run the main program:

 run_midcor(infile=<input file>, outfile=<output file>, mode=<"con" or "var">)

two examples provided

MIDcor uses as input the file prepared by RaMID or Cdf2mid:

 run_midcor(infile="ramidout.csv", outfile="midcorout.csv",mode="con") 
 run_midcor(infile="cdf2midout.csv", outfile="midcorout.csv",mode="con") 
docker run -it -v $PWD:/data midcor -i /data/<input.csv> -o /data/<output.csv> 

To run midcor as a docker image created in the PhenoMeNal repository, execute

docker run -it -v $PWD:/data -i /data/<input.csv> -o /data/<output.csv>

Using the atomic composition of the metabolites, derivatized for gas chromatography, and known natural isotopes composition, MIDcor corrects for naturally occurring isotopes the raw spectra, extracted by RaMID from the CDF files. Moreover, it corrects the possible overlapping of peaks belonging to different substances, as described in [1]. File "midcorout.csv" contains all the data presented in "../RaMID/ramidout.csv" corrected. Further analysis, performed with Iso2flux or Isodyn, consists in simulations of the corrected mass spectra for the specific conditions of the given experiment. "midcorout.csv" can contain data referred to several conditions, e.g. the corrected file produced from CDF collection archived in "" includes data obtained from three cell lines. Since separate simulations needed to reproduce the spectra corresponding to each cell line, MIDcor also separates the data of "midcorout.csv" into the corresponding three files: "A549", "BEAS2B", "NCI". Each of these files is prepared for the subsequent simulation with Iso2flux or Isodyn.


seliv55/midcor documentation built on Nov. 24, 2018, 3:43 a.m.