Learn R Programming

⚠️There's a newer version (0.8.0) of this package.Take me there.

enviGCMS: GC-MS Data Analysis for Environmental Science

enviGCMS provides functions for GC/LC-MS data analysis for environmental sciences.

Installation

You can either use the stable version of enviGCMS from CRAN,

install.packages("enviGCMS")

or the current development snapshot from this GitHub repository:

remotes::install_github("yufree/enviGCMS")

Usage

Check this vignette for Data analysis of GC-MS and LC-MS in Envrionmental Science.

Check this vignette for Pooled QC analysis in Environmental Science.

  • get the mean and RSD of one sample for 5 technique replicate
# enviGCMS use functions in xcms to import the data, just type the path to your single sample
data1 <- enviGCMS:::getmd(‘sample1-1’)
data2 <- enviGCMS:::getmd(‘sample1-2’)
data3 <- enviGCMS:::getmd(‘sample1-3’)
data4 <- enviGCMS:::getmd(‘sample1-4’)
data5 <- enviGCMS:::getmd(‘sample1-5’)
  • get the mean
data <- (data1+data2+data3+data4+data5)/5
  • get the standard deviation
datasd <- sqrt(((data1-data)^2+(data2-data)^2+(data3-data)^2+(data4-data)^2+(data5-data)^2)/4)
  • get the RSD
databrsd <- datasd/data
  • plot the smooth scatter
plotsms(datarsd)
  • plot the heatmap
plotms(data)
  • plot the mz-rt scatter plot
plotmz(data)
  • plot the boundary model
findline(data)

Detailed usage of those functions in Environmental analysis could be found in this paper and the vignettes in this package.

Copy Link

Version

Install

install.packages('enviGCMS')

Monthly Downloads

360

Version

0.6.6

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Miao YU

Last Published

June 4th, 2020

Functions in enviGCMS (0.6.6)

getdoe

Generate the group level rsd and average intensity based on DoE,
getarea

Get the peak information from sampels for SCCPs detection
getmdr

Get the raw Mass Defect
getmr

Get the mzrt profile and group information for batch correction and plot as a list directly from path with default setting
getmdh

Get the high order unit based Mass Defect
findmet

Screen metabolites by Mass Defect
getfeaturest

Get the features from t test, with p value, q value, rsd and power restriction
getmd

Import data and return the annotated matrix for GC/LC-MS by m/z range and retention time
findlipid

Find lipid class of metabolites base on referenced Kendrick mass defect
getfeaturesanova

Get the features from anova, with p value, q value, rsd and power restriction
getbiotechrep

Get the report for biological replicates.
getcsv

Convert an list object to csv file.
getsim

output the similarity of two dataset
getsccp

Quantitative analysis for short-chain chlorinated paraffins(SCCPs)
getgrouprep

Get the report for samples with biological and technique replicates in different groups
getrangecsv

Get a mzrt list and/or save mz and rt range as csv file.
getrmd

Get the Relative Mass Defect
TBBPA

Demo data for TBBPA metabolism in Pumpkin
ma

filter data by average moving box
plotkms

plot the kendrick mass defect diagram
getdwtus

Density weighted intensity for one sample
batch

Get the MIR and related information from the files
list

Demo data
getmzrtcsv

Covert the peaks list csv file into list
getmass

Get the exact mass of the isotopologues from a chemical formula or reaction's isotope patterns with the highest abundances
getimputation

Impute the peaks list data
cbmd

Combine two data with similar retention time while different mass range
getdata

Get xcmsset object in one step with optimized methods.
plotpca

plot the PCA for multiple samples
plotmr

plot the scatter plot for peaks list with threshold
plotpeak

plot intensity of peaks across samples or samples across peaks
getupload3

Get the csv files to be submitted to Metaboanalyst
gifmr

plot scatter plot for rt-mz profile and output gif file for mutiple groups
getoverlapmass

Get the overlap peaks by mass range
dotpanno

Perform MS/MS dot product annotation for mgf file
getdata2

Get XCMSnExp object in one step from structured folder path for xcms 3.
getmzrt

Get the mzrt profile and group information as a mzrt list and/or save them as csv or rds for further analysis.
getoverlappeak

Get the overlap peaks by mass and retention time range
getoverlaprt

Get the overlap peaks by retention time
plotanno

Show MS/MS pmd annotation result
getmzrt2

Get the mzrt profile and group information for batch correction and plot as a list for xcms 3 object
getmassdefect

Get mass defect with certain scaled factor
getpower

Get the index with power restriction for certain study with BH adjusted p-value and certain power.
getpqsi

Compute pooled QC linear index according to run order
plotden

plot the density for multiple samples
plotint

plot the information of intergretion
sccp

Short-Chain Chlorinated Paraffins(SCCPs) peaks infomation for quantitative analysis
runsccp

Shiny application for Short-Chain Chlorinated Paraffins analysis
findohc

Screen organohalogen compounds by retention time, mass defect analysis and isotope relationship modified by literature report. Also support compounds with [M] and [M+2] ratio cutoff.
getMSP

read in MSP file as list for ms/ms or ms(EI) annotation
plotdwtus

plot density weighted intensity for multiple samples
gettechrep

Get the report for technique replicates.
plotintslope

plot the slope information of intergretion
plothist

plot the density of the GC-MS data with EM algorithm to seperate the data into two log normal distribution.
gettimegrouprep

Get the time series or two factor DoE report for samples with biological and technique replicates in different groups
getfilter

Filter the data based on row and column index
getupload

Get the csv files from xcmsset/XCMSnExp/list object
getformula

Get chemical formula for mass to charge ratio.
plotms

plot GC/LC-MS data as a heatmap with TIC
plotmrc

plot the diff scatter plot for one xcmsset objects with threshold between two groups
getupload2

Get the csv files to be submitted to Metaboanalyst
plotmsrt

Plot EIC of certain m/z and return dataframe for intergration
plotmz

plot GC/LC-MS data as scatter plot
plotcc

plot the calibration curve with error bar, r squared and equation.
plote

plot EIC and boxplot for all peaks and return diffreport
plotgroup

Plot the response group of GC-MS
plott

plot GC-MS data as a heatmap for constant speed of temperature rising
plottic

Plot Total Ion Chromatogram (TIC)
plotrla

Relative Log Abundance (RLA) plots
plotridge

plot ridgeline density plot
plotsms

Plot the intensity distribution of GC-MS
plotridges

Relative Log Abundance Ridge (RLAR) plots for samples or peaks
plotrsd

plot the rsd influnces of data in different groups
writeMSP

Write MSP files for NIST search
svaupload

Get the corrected data after SVA for metabolanalyst
submd

Get the differences of two GC/LC-MS data
plothm

Plot the heatmap of mzrt profiles
svapca

Principal component analysis(PCA) for SVA corrected data and raw data
svaplot

Filter the data with p value and q value and show them
runMDPlot

Shiny application for interactive mass defect plots analysis
plotrug

plot 1-d density for multiple samples
plotrtms

Plot mass spectrum of certain retention time and return mass spectrum vector (MSP file) for NIST search
qbatch

Get the MIR from the file
plotsub

Plot the backgrond of data
svacor

Surrogate variable analysis(SVA) to correct the unknown batch effects
svabatch

Plot the influnces of DoE and Batch effects on each peaks
xrankanno

Perform MS/MS X rank annotation for mgf file
svadata

Filter the data with p value and q value
getareastd

Get the peak information from SCCPs standards
getbgremove

Get the peak list with blank samples' peaks removed
GetIntegration

GetIntegration was mainly used for get the intergration of certain ion's chromatogram data and plot the data
enviGCMS-deprecated

Deprecated functions in package enviGCMS.
Getisotopologues

Get the selected isotopologues at certain MS data
findline

find line of the regression model for GC-MS
getQCraw

get the data of QC compound for a group of data
Integration

Just intergrate data according to fixed rt and fixed noise area
Mode

define the Mode function