From ceae362068ed73dc2a3ea26a1be302420f53ffdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Todor=20Kondi=C4=87?= <kontrapunkt@uclmail.net> Date: Tue, 10 Jan 2023 01:10:04 +0100 Subject: [PATCH] app, resources: Add MetFrag config pane. --- DESCRIPTION | 2 +- R/resources.R | 15 +++++++++++++++ inst/rmd/app.Rmd | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a12d71b..f33b90a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: shinyscreen Title: Pre-screening of Mass Spectrometry Data -Version: 1.2.5 +Version: 1.2.9000 Author: Todor Kondić Maintainer: Todor Kondić <todor.kondic@uni.lu> Authors@R: diff --git a/R/resources.R b/R/resources.R index b4823f7..98b115a 100644 --- a/R/resources.R +++ b/R/resources.R @@ -309,3 +309,18 @@ PLOT_EIC_ASPECT <- 0.75 ## possibility that each set connects to a different collection of ## files. COLRDATA_KEY <- "set" + +## METFRAG + +METFRAG_ADDUCTS = c("[M+H]+","[M+NH4]+","[M+Na]+","[M+K]+", + "[M+CH3OH+H]+","[M+ACN+H]+","[M+ACN+Na]+","[M+2ACN+H]+", + "[M-H]-","[M+Cl]-","[M+HCOO]-","[M+CH3COO]-","[M]+/-") +METFRAG_WRITER_CHOICES = c("CSV","PSV","XLS") +METFRAG_DEFAULT_WRITER = "CSV" +METFRAG_DATABASE_TYPE = c("KEGG","PubChem","ExtendedPubChem","LocalSDF","LocalPSV","LocalCSV") +METFRAG_DEFAULT_DATABASE_TYPE = "LocalCSV" +METFRAG_PREPFLT_CHOICES = c("UnconnectedCompoundFilter","IsotopeFilter") +METFRAG_PREPFLT_DEFAULT = c("UnconnectedCompoundFilter","IsotopeFilter") +METFRAG_POSTPFLT_CHOICES = c("InChIKeyFilter") +METFRAG_POSTPFLT_DEFAULT = c("InChIKeyFilter") + diff --git a/inst/rmd/app.Rmd b/inst/rmd/app.Rmd index a0a04ac..c557b26 100644 --- a/inst/rmd/app.Rmd +++ b/inst/rmd/app.Rmd @@ -493,6 +493,49 @@ shinyscreen::rt_input(input_rt = "ret_time_shift_tol", def_unit = vu[['unit']]) ``` +### MetFrag (experimental, optional) + +If `java` and `MetFragCL` are available, Shinyscreen can run +`MetFragCL`. The configuration is a subset of what a MetFrag config +file looks like. + +```{r, echo=F} +numericInput("mf_database_search_relative_mass_deviation", + label="Database search relative mass deviation", + value=5) +numericInput("mf_fragment_peak_match_absolute_mass_deviation", + label="Fragment peak match absolute mass deviation", + value=5) +numericInput("mf_fragment_peak_match_relative_mass_deviation", + label="Fragment peak match relative mass deviation", + value=5) +numericInput("mf_maximum_tree_depth", + label="MaximumTreeDepth", + value=2) +selectInput("mf_metfrag_candidate_writer", + label="MetFrag Candidate Writer", + choices=shinyscreen:::METFRAG_WRITER_CHOICES, + selected=shinyscreen:::METFRAG_DEFAULT_WRITER) +selectInput("mf_database_type", + label="Database type", + choices=shinyscreen:::METFRAG_DATABASE_TYPE, + selected=shinyscreen:::METFRAG_DEFAULT_DATABASE_TYPE) +selectInput("mf_local_database_path","Local Database Path", + choices=NA_character_, + selected=NA_character_) +selectInput("mf_pre_processing_candidate_filter", + label="Preprocessing candidate filter", + choices=shinyscreen:::METFRAG_PREPFLT_CHOICES, + selected=shinyscreen:::METFRAG_PREPFLT_DEFAULT, + multiple=T) +selectInput("mf_post_processing_candidate_filter", + label="Postprocessing candidate filter", + choices=shinyscreen:::METFRAG_POSTPFLT_CHOICES, + selected=shinyscreen:::METFRAG_POSTPFLT_DEFAULT, + multiple=T) +textInput("mf_score_types",label="Score Types",value="FragmenterScore,AutomatedPeakFingerprintAnnotationScore,AutomatedLossFingerprintAnnotationScore,OfflineIndividualMoNAScore") +textInput("mf_score_weights",label="Score Weights",value="1.,1.,1.,1.") +``` ### Report <details><summary>Create a report</summary> -- GitLab