MetFragConfig.formula: Create MetFrag Config Files with Molecular Formula Candidate...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/MetFragConfigR.R

Description

This is a molecular formula-specific wrapper function for MetFragConfig.

Usage

1
MetFragConfig.formula(mol_form, adduct_type, IsPosMode, results_filename, peaklist_path, base_dir, ...)

Arguments

mol_form

The molecular formula (as a string) with which to search the candidate database (DB). mass is calculated automatically.

adduct_type

The adduct species used to define mass (if neutralPrecursorMass=FALSE) and fragmentation settings in the config file, entered as either PrecursorIonType (text) or PrecursorIonmode (a number). The available options are given in the system file MetFragAdductTypes.csv in the extdata folder. Recommended default values (if ion state is unclear) are [M+H]+ (1) for positive and [M-H]- (-1) for negative mode.

results_filename

Enter a base filename for naming the results files - do not include file endings

peaklist_path

Enter the full path and file name to the peak list for this config file

base_dir

Enter the directory name to set up the subfolders for MetFrag batch results. If the folders don't exist, subfolders config, log and results are created; the output of this function is saved in config.

isPosMode

Use TRUE or FALSE to set positive or negative ionization as appropriate.

Details

Remaining parameters are described in MetFragConfig

Value

Returns a MetFrag config file name

Author(s)

Emma Schymanski <emma.schymanski@uni.lu> in partnership with Christoph Ruttkies (MetFragCL), Antony J. Williams and team (CompTox Dashboard)

See Also

MetFragConfig, runMetFrag, getAdductMassesFromFormula

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Example of Simazine
peaklist_path <- system.file("extdata","EA026206_Simazine_peaks.txt",package="ReSOLUTION")
# change this directory to an existing one, or this example won't work
test_dir <- "C:/DATA/Workflow/MetFrag22/metfrag_test_results"
testCSV <- system.file("extdata","dsstox_MS_Ready_MetFragTestCSV5.csv",package="ReSOLUTION")

config_file <- MetFragConfig.formula("C7H12ClN5","[M+H]+",IsPosMode=TRUE, "Simazine_formula_PubChem",peaklist_path, test_dir,
DB="PubChem")
config_file2 <- MetFragConfig.formula("C7H12ClN5",1,IsPosMode=TRUE, "Simazine_formula_CompTox",peaklist_path,test_dir,
DB="LocalCSV",localDB_path=testCSV)
config_file3 <- MetFragConfig.formula("C7H12ClN5",1,IsPosMode=TRUE, "Simazine_formula_CompTox_noInChIFilter",peaklist_path,test_dir,
DB="LocalCSV",localDB_path=testCSV,filter_by_InChIKey = FALSE)

metfrag_dir <- "C:/DATA/Workflow/MetFrag22/"
MetFragCL_name <- "MetFrag2.4.4-msready-CL.jar"
#note this first query is a longer query using PubChem
runMetFrag(config_file, metfrag_dir, MetFragCL_name)
runMetFrag(config_file2, metfrag_dir, MetFragCL_name)
runMetFrag(config_file3, metfrag_dir, MetFragCL_name)

schymane/ReSOLUTION documentation built on May 22, 2021, 3:41 a.m.