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:

devtools::install_github("yufree/enviGCMS")

Usage

  • 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

303

Version

0.5.5

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Miao YU

Last Published

May 14th, 2019

Functions in enviGCMS (0.5.5)

getfeaturest

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

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

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

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

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

Plot EIC of certain m/z and return dataframe for intergration
enviGCMS-deprecated

Deprecated functions in package enviGCMS.
Mode

define the Mode function
getupload

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

plot the information of intergretion
getupload2

Get the csv files to be submitted to Metaboanalyst
getsim

output the similarity of two dataset
getcsv

Convert an list object to csv file.
getarea

Get the peak information from sampels for SCCPs detection
getpower

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

Get chemical formula for mass to charge ratio.
getimputation

Impute the peaks list data
plothm

Plot the heatmap of mzrt profiles
getsccp

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

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

Write MSP files for NIST search
plotpca

plot the PCA for multiple samples
svaupload

Get the corrected data after SVA for metabolanalyst
getbiotechrep

Get the report for biological replicates.
svabatch

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

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

Plot Total Ion Chromatogram (TIC)
getfilter

Filter the data based on row and column index
gifmr

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

Get the peak list with blank samples' peaks removed
plotmrc

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

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

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

find line of the regression model for GC-MS
getupload3

Get the csv files to be submitted to Metaboanalyst
getmassdefect

Get mass defect with certain scaled factor
plotms

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

plot the slope information of intergretion
plote

plot EIC and boxplot for all peaks and return diffreport
getrmd

Get the Relative Mass Defect
plotridges

Relative Log Abundance Ridge (RLAR) plots
plotden

plot the density for multiple samples
getmzrt

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

Get the selected isotopologues at certain MS data
plotsms

Plot the intensity distribution of GC-MS
svadata

Filter the data with p value and q value
getmd

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

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

Get the overlap peaks by mass and retention time range
plotsub

Plot the backgrond of data
getdata

Get xcmsset object in one step with optimized methods.
getareastd

Get the peak information from SCCPs standards
qbatch

Get the MIR from the file
getmr

Get the mzrt profile and group information for batch correction and plot as a list directly from path with default setting
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.
list

Demo data
plothist

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

Get the raw Mass Defect
getoverlaprt

Get the overlap peaks by retention time
plotkms

plot the kendrick mass defect diagram
plotmz

plot GC/LC-MS data as scatter plot
gettechrep

Get the report for technique replicates.
plotgroup

Plot the response group of GC-MS
cbmd

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

Get the MIR and related information from the files
plotrtms

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

filter data by average moving box
getmdh

Get the high order unit based Mass Defect
gettimegrouprep

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

Covert the peaks list csv file into list
runMDPlot

Shiny application for interactive mass defect plots analysis
getdoe

Filter the data based on DoE, rsd, intensity
getdata2

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

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

plot the rsd influnces of data in different groups
submd

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

plot the scatter plot for peaks list with threshold
sccp

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

Get the overlap peaks by mass range
plotrla

Relative Log Abundance (RLA) plots
svacor

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

Shiny application for Short-Chain Chlorinated Paraffins analysis