find.targetfeatures: Find User Defined Target Features

View source: R/JPA_functions.R

find.targetfeaturesR Documentation

Find User Defined Target Features

Description

Adds user defined target features to original feature table if they do not exist already.

Usage

find.targetfeatures(data, tarFTdir, tarFTname, mass.tol = 0.01, rt.tol = 30, target.threshold = 2)

Arguments

data

"MSdata" object generated in previous steps by functions "XCMS.featureTable", "custom.featureTable", or "find.level3features".

tarFTdir

Directory containing target feature table in CSV format.

tarFTname

Name of feature table in CSV format.

mass.tol

Mass tolerance in daltons used to determine if a target feature already exists. Default = 0.01.

rt.tol

Retention time tolerance in seconds used to determine if a target feature already exists. Default = 30.

target.threshold

Intensity threshold used to extract target features. The target feature's peak intensity must be higher than target.threshold * average intensity to be valid. Default = 2.

Details

The provided target feature table must be in CSV format and contains only the following columns in order: "mz", "rt".

Value

Returns an updated feature table in dataframe format that includes newly added target features. Also returns an updated XCMS object that is used by functions later in the IPA workflow.

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)

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