Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/MetFragConfigR.R
This is a CompTox XLS or CSV specific wrapper function for MetFragConfig
.
1 2 | MetFragConfig.CompToxCSV(mass, adduct_type, results_filename, peaklist_path, base_dir,
CompToxLocalCSVterms, ...)
|
mass |
The mass with which to search the candidate database ( |
adduct_type |
The adduct species used to define mass (if |
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 |
CompToxLocalCSVterms |
The output of |
Remaining parameters are described in MetFragConfig
Returns a MetFrag config file name
Emma Schymanski <emma.schymanski@uni.lu> in partnership with Christoph Ruttkies (MetFragCL), Antony J. Williams and team (CompTox Dashboard)
MetFragConfig
, runMetFrag
, CompToxXLStoLocalCSVterms
,
CompToxCSVtoLocalCSVterms
, CompToxFullCSVtoLocalCSVterms
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # Example from DOI: 10.1021/acs.est.7b01908
# Note that this scores automatically with all metadata fields in the example file, which
# is not necessarily ideal as not all predicted values are relevant for ranking the best candidate.
CompToxXLS <- system.file("extdata","CompToxBatchSearch_MetFrag_MSready_C10H14N2.xls",package="ReSOLUTION")
LocalCSVterms <- CompToxXLStoLocalCSVterms(CompToxXLS)
peaklist <- system.file("extdata","EQ300804_Nicotine_peaks.txt",package="ReSOLUTION")
test_dir <- "C:/DATA/Workflow/MetFrag22/metfrag_test_results"
config_file <- MetFragConfig.CompToxCSV(163.1230, "[M+H]+","Nicotine_PrecMass_MpHp_XLS",peaklist, test_dir, LocalCSVterms)
metfrag_dir <- "C:/DATA/Workflow/MetFrag22/"
MetFragCL_name <- "MetFrag2.4.4-msready-CL.jar"
runMetFrag(config_file, metfrag_dir, MetFragCL_name)
# Example of Simazine
# Note that this uses a CSV file with fewer scoring terms that are more relevant for candidate selection.
CompToxFullCSV_test <- system.file("extdata","dsstox_MS_Ready_MetFragTestCSV5.csv",package="ReSOLUTION")
LocalCSVterms <- CompToxFullCSVtoLocalCSVterms(CompToxFullCSV_test)
peaklist <- system.file("extdata","EA026206_Simazine_peaks.txt",package="ReSOLUTION")
rt_file_path <- system.file("extdata","Eawag_rt_inchi.csv",package="ReSOLUTION")
test_dir <- "C:/DATA/Workflow/MetFrag22/metfrag_test_results"
MBrecord <- system.file("extdata","EA026206_Simazine.txt",package="ReSOLUTION")
MBinfo <- getMBRecordInfo.MetFragConfig(MBrecord,peaklist, writePeaklist=FALSE)
IsPosMode <- grepl(MBinfo$ion_mode,"POSITIVE")
adduct_type <- MBinfo$prec_type
config_file <- MetFragConfig.CompToxCSV(mass=MBinfo$exact_mass,adduct_type = adduct_type,
results_filename = paste0("Simazine", "_byExactMass_5ppm"),peaklist_path = MBinfo$peaklist,neutralPrecursorMass=TRUE,
base_dir = test_dir, CompToxLocalCSVterms = LocalCSVterms, IsPosMode = IsPosMode,rt_file_path = rt_file_path,
rt_exp = MBinfo$ret_time,filter_by_InChIKey = FALSE)
metfrag_dir <- "C:/DATA/Workflow/MetFrag22/"
MetFragCL_name <- "MetFrag2.4.4-msready-CL.jar"
runMetFrag(config_file, metfrag_dir, MetFragCL_name)
# Example of diclofenac
peaklist <- system.file("extdata","EA020161_Diclofenac_peaks.txt",package="ReSOLUTION")
MBrecord <- system.file("extdata","EA020161_Diclofenac.txt",package="ReSOLUTION")
MBinfo <- getMBRecordInfo.MetFragConfig(MBrecord,peaklist, writePeaklist=FALSE)
IsPosMode <- grepl(MBinfo$ion_mode,"POSITIVE")
adduct_type <- MBinfo$prec_type
config_file <- MetFragConfig.CompToxCSV(mass=MBinfo$prec_mass,adduct_type = adduct_type,
results_filename = paste0("Diclofenac", "_byPrecMass_5ppm"),peaklist_path = MBinfo$peaklist,neutralPrecursorMass=FALSE,
base_dir = test_dir, CompToxLocalCSVterms = LocalCSVterms, IsPosMode = IsPosMode,rt_file_path = rt_file_path,
rt_exp = MBinfo$ret_time,filter_by_InChIKey = FALSE)
metfrag_dir <- "C:/DATA/Workflow/MetFrag22/"
MetFragCL_name <- "MetFrag2.4.4-msready-CL.jar"
runMetFrag(config_file, metfrag_dir, MetFragCL_name)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.