plot.features: Plot EIC

View source: R/JPA_functions.R

plot.featuresR Documentation

Plot EIC

Description

Plots the EICs of either level 1, 2, 3, target, or aligned features (multi-sample analysis).

Usage

plot.features(dir, featureTable, data, plot.type, plotmz.tol = 0.01, plotrt.tol = 60, smooth = 2)

Arguments

dir

Directory to save the plots to.

featureTable

Feature table dataframe generated in previous steps containing level information.

data

"MSdata" object generated in previous steps.

plot.type

The type of features to plot. 1 for level 1 features, 2 for level 2 features, 3, for level 3 features, "target" for target features, and "aligned" for aligned features in multi-sample analysis.

plotmz.tol

Mass range in dalton for plotting EIC. Default = 0.01.

plotrt.tol

Retention time range in seconds for plotting EIC. Default = 60.

smooth

Smoothing level for plotting EIC. Default = 2.

Value

Returns nothing, only plots all EICs of specified level to local disk.

Author(s)

Sam Shen, Jian Guo, Tao Huan

Examples

library(IPA)
dir = "X:/Users/Sam_Shen/IPAtest_20210330/singleDDA"
tarFTdir = "X:/Users/Sam_Shen/IPAtest_20210330"
tarFTname = "LibraryCSVHILIC-.csv"
featureTable <- peak.picking(dir = dir, mz.tol = 10, ppm=10, peakwidth=c(5,20), mzdiff = 0.01,
                             snthresh = 6, integrate = 1, prefilter = c(3,100), noise = 100)
featureTable <- find.level3features(data = MSdata)
featureTable <- add.targetfeatures(data = MSdata, tarFTdir = tarFTdir, tarFTname = tarFTname)

plotdir <- "X:/Users/Sam_Shen/IPAtest_20210330"
plot.features(dir = plotdir, featureTable = featureTable, data = MSdata, plot.type = 1, smooth = 2)
plot.features(dir = plotdir, featureTable = featureTable, data = MSdata, plot.type = 2, smooth = 2)
plot.features(dir = plotdir, featureTable = featureTable, data = MSdata, plot.type = 3, smooth = 2)
plot.features(dir = plotdir, featureTable = featureTable, data = MSdata, plot.type = "target", smooth = 2)

HuanLab/JPA documentation built on April 14, 2023, 12:53 p.m.