runMetFrag: Run MetFrag Command Line from config files

Description Usage Arguments Value Author(s) See Also Examples

View source: R/MetFragConfigR.R

Description

This function runs MetFrag Command Line for the given configuration file and directories. Note that MetFragCL must be available locally to run this. MetFrag Command Line is available from http://c-ruttkies.github.io/MetFrag/projects/metfragcl/

Usage

1
runMetFrag(config_file, MetFrag_dir, CL_name, config_dir=dirname(config_file))

Arguments

config_file

Full path and file name to the configuration file (as returned by MetFragConfig)

MetFrag_dir

Full path to the cirectory containing the MetFragCL jar file

CL_name

Name of the exact MetFragCL jar file to use (e.g. MetFrag2.4.4-msready-CL.jar)

config_dir

Full path to the directory in which config files are located. Note that parallel directories log and results are created during this process for the first config file run. Defaults to the directory where config_file is located.

Value

Runs MetFragCL and creates a log file and, where successful, results files as encoded in the config file. If unsuccessful a status message is printed from the jar; details are saved in the log file.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu> in partnership with Christoph Ruttkies (MetFragCL author).

See Also

MetFragConfig

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
metfrag_dir <- "C:/DATA/Workflow/MetFrag22/"
MetFragCL_name <- "MetFrag2.4.4-msready-CL.jar"
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(201.0776,"[M+H]+","Simazine_neutralMass",peaklist_path, test_dir, DB="PubChem",neutralPrecursorMass=TRUE)
config_file2 <- MetFragConfig(202.0854,1,"Simazine_precMass",peaklist_path,test_dir,DB="LocalCSV",localDB_path=testCSV)

#note this first query takes a while to run, try config_file2 for a quicker test.
runMetFrag(config_file, metfrag_dir, MetFragCL_name)
runMetFrag(config_file2, metfrag_dir, MetFragCL_name)

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