Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
shinyscreen
Manage
Activity
Members
Labels
Plan
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Environmental Cheminformatics
shinyscreen
Commits
63954332
Commit
63954332
authored
2 years ago
by
Todor Kondić
Browse files
Options
Downloads
Patches
Plain Diff
app: Update MetFrag on-line docs.
parent
071ea982
No related branches found
No related tags found
No related merge requests found
Pipeline
#68568
failed
2 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/inputs_metfrag.R
+10
-0
10 additions, 0 deletions
R/inputs_metfrag.R
inst/rmd/app_config_and_status.Rmd
+63
-0
63 additions, 0 deletions
inst/rmd/app_config_and_status.Rmd
with
73 additions
and
0 deletions
R/inputs_metfrag.R
+
10
−
0
View file @
63954332
...
@@ -2,6 +2,7 @@ mk_shiny_input <- function(name,fun,args) {
...
@@ -2,6 +2,7 @@ mk_shiny_input <- function(name,fun,args) {
content
=
do.call
(
what
=
fun
,
args
=
c
(
list
(
inputId
=
name
),
args
))
content
=
do.call
(
what
=
fun
,
args
=
c
(
list
(
inputId
=
name
),
args
))
res
=
list
(
name
=
name
,
res
=
list
(
name
=
name
,
fun
=
fun
,
fun
=
fun
,
args
=
args
,
content
=
content
)
content
=
content
)
res
res
}
}
...
@@ -10,6 +11,15 @@ inject_inputs<- function(collection,which) {
...
@@ -10,6 +11,15 @@ inject_inputs<- function(collection,which) {
do.call
(
shiny
::
tagList
,
lapply
(
which
,
function
(
nm
)
collection
[[
nm
]]
$
content
))
do.call
(
shiny
::
tagList
,
lapply
(
which
,
function
(
nm
)
collection
[[
nm
]]
$
content
))
}
}
inputs_label
<-
function
(
collection
,
which
)
{
collection
[[
which
]]
$
args
$
label
}
inputs_html_out
<-
function
(
collection
,
which
,
inline
=
T
,
...
)
{
txt
=
inputs_label
(
collection
,
which
)
paste0
(
'<code>'
,
txt
,
'</code>'
)
}
INPUTS_METFRAG_NUMERIC
=
list
(
mk_shiny_input
(
name
=
"mf_database_search_relative_mass_deviation"
,
INPUTS_METFRAG_NUMERIC
=
list
(
mk_shiny_input
(
name
=
"mf_database_search_relative_mass_deviation"
,
fun
=
"numericInput"
,
fun
=
"numericInput"
,
args
=
list
(
label
=
"Database search relative mass deviation"
,
args
=
list
(
label
=
"Database search relative mass deviation"
,
...
...
This diff is collapsed.
Click to expand it.
inst/rmd/app_config_and_status.Rmd
+
63
−
0
View file @
63954332
...
@@ -182,6 +182,15 @@ inject_inputs(INPUTS_METFRAG,c("mf_pre_processing_candidate_filter",
...
@@ -182,6 +182,15 @@ inject_inputs(INPUTS_METFRAG,c("mf_pre_processing_candidate_filter",
<!-- metfrag-conf-execution -->
<!-- metfrag-conf-execution -->
#### Execution
#### Execution
<details><summary>More about execution controls</summary>
The `Number of MetFrag Processses` field will show the maximum amount
of logical threads available on the platform which executes
MetFrag. Consider that, if you use all of them, this might cause an
overload of the system's resources.
</details>
```{r, echo=F}
```{r, echo=F}
## This is treated differently than other MF inputs, because the value
## This is treated differently than other MF inputs, because the value
## is not known prior to starting a R session. There should be a
## is not known prior to starting a R session. There should be a
...
@@ -201,6 +210,50 @@ numericInput(inputId="mf_proc",
...
@@ -201,6 +210,50 @@ numericInput(inputId="mf_proc",
#### Databases
#### Databases
<details><summary>More about databases</summary>
MetFrag offers a possibility to query different chemical
databases. Some, such as `PubChem` are remote and some, such as
`PubChemLite` are files that can be downloaded and used locally. At
the moment, Shinyscreen has only been well tested with `LocalCSV`
databases --- those which come in a CSV format. The Shinyscreen
development team is keen to hear experiences of experimentation with
other sources and. Let us know what works, or does not work and
whether having other sources available is important for your
endeavours.
As for the `LocalCSV` types of databases, on an abstract level they
can be viewed as collections of metadata about various
compounds. There will be *identifier* fields which are unique to a
compound. As an example, those could be `Identifier`, or
`CompoundName` columns in a PubChemLite database. Additionally, there
will be lots of other fields, some of which can be used as *scoring
terms*. For example, annotation, patent and PubMed count columns in a
PubChemLite database can be used by MetFrag to aid sensible ranking of
candidates.
Local databases should all reside in a directory that was specified
during Shinyscreen initialisation (look up the documentation of the
`Shinyscreen::init` function).
User selects the local databases from
`r inputs_html_out(INPUTS_METFRAG,"mf_local_database")`
control. Once a database is selected, it is required
to declare which columns are the identifiers
and this is done using
`r inputs_html_out(INPUTS_METFRAG,"mf_local_db_col_ident")`.
The summary of MetFrag results which is created by Shinyscreen
contains top candidates. But, in addition to those, it will show a
collection of other candidates, those that did not rank that high. The
identifier filed which will be used for those can be chosen from
`r inputs_html_out(INPUTS_METFRAG,"mf_local_db_col_coll")`.
In case of PubChemLite, it is probably best to select `Identifier` column here.
</details>
```{r, echo=F}
```{r, echo=F}
inject_inputs(INPUTS_METFRAG,c("mf_database_type",
inject_inputs(INPUTS_METFRAG,c("mf_database_type",
"mf_local_database",
"mf_local_database",
...
@@ -214,6 +267,11 @@ inject_inputs(INPUTS_METFRAG,c("mf_database_type",
...
@@ -214,6 +267,11 @@ inject_inputs(INPUTS_METFRAG,c("mf_database_type",
#### MetFrag Scores
#### MetFrag Scores
<details><summary>About MetFrag scoring terms</summary>
Here, it is possible to select MetFrag scoring types available for any
kind of database.
</details>
```{r, echo = F}
```{r, echo = F}
inject_inputs(INPUTS_METFRAG,"mf_scores_intrinsic")
inject_inputs(INPUTS_METFRAG,"mf_scores_intrinsic")
DT::DTOutput("mf_local_ident")
DT::DTOutput("mf_local_ident")
...
@@ -224,6 +282,11 @@ DT::DTOutput("mf_local_ident")
...
@@ -224,6 +282,11 @@ DT::DTOutput("mf_local_ident")
#### Local Database Scoring Terms
#### Local Database Scoring Terms
<details><summary>About local DB scoring terms</summary>
Select local database columns that make sense as scoring terms.
</details>
```{r, echo = F}
```{r, echo = F}
inject_inputs(INPUTS_METFRAG,"mf_local_db_col_scores")
inject_inputs(INPUTS_METFRAG,"mf_local_db_col_scores")
DT::DTOutput("mf_local_db_scores")
DT::DTOutput("mf_local_db_scores")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment