Mercurial > repos > recetox > recetox_xmsannotator_simple
changeset 0:4cf6d71da794 draft
"planemo upload commit 5d3c80fb59c7d68a3d4ae26119821bc8d6fd65f2-dirty"
author | recetox |
---|---|
date | Tue, 25 Aug 2020 11:45:18 +0000 |
parents | |
children | fa85bd6fd713 |
files | recetox_xmsannotator_macros.xml recetox_xmsannotator_simple.xml tool-data/recetox_metabolite_databases.loc.sample tool_data_table_conf.xml.sample |
diffstat | 4 files changed, 76 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/recetox_xmsannotator_macros.xml Tue Aug 25 11:45:18 2020 +0000 @@ -0,0 +1,36 @@ +<macros> + <xml name="requirements"> + <requirements> + <requirement type="package">recetox_datatypes</requirement> + <container type="docker">registry.gitlab.ics.muni.cz:443/recetox/mass-spectrometry/xmsannotator:deployment</container> + </requirements> + </xml> + + <xml name="peaks"> + <param name="peaks" type="data" format="peak_table.feather" label="Peak intensity table"/> + </xml> + + <xml name="metabolites"> + <!-- <param name="metabolites" type="select" label="Metabolite database"> + <options from_data_table="recetox_metabolite_databases"> + <column name="name" index="2"/> + <column name="value" index="3"/> + </options> + </param> --> + <param name="metabolites" type="data" format="metabolites.h5" label="Metabolite database"/> + </xml> + + <xml name="mz_tolerance"> + <param name="mz_tolerance" type="float" value="10" min="0" label="Mass tolerance [ppm]" help="Mass tolerance in ppm for database matching."/> + </xml> + + <xml name="annotation_output"> + <data format="annotated_peak_list.feather" name="annotation"/> + </xml> + + <xml name="citations"> + <citations> + <citation type="doi">10.1021/acs.analchem.6b01214</citation> + </citations> + </xml> +</macros> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/recetox_xmsannotator_simple.xml Tue Aug 25 11:45:18 2020 +0000 @@ -0,0 +1,29 @@ +<tool id="recetox_xmsannotator_simple" name="xmsannotator - simple" version="deployment"> + <macros> + <import>recetox_xmsannotator_macros.xml</import> + </macros> + + <expand macro="requirements"/> + + <command detect_errors="aggressive"><![CDATA[ + Rscript -e 'annotation <- xmsannotator::simple_annotation( + data = arrow::read_feather("$peaks"), + metabolites = rhdf5::h5read("$metabolites", "metabolites"), + mz_tolerance_ppm = as.double($mz_tolerance) + )' + -e 'arrow::write_feather(annotation, "$annotation")' + ]]></command> + + <inputs> + <expand macro="peaks"/> + <expand macro="metabolites"/> + <expand macro="mz_tolerance"/> + </inputs> + + <outputs> + <expand macro="annotation_output"/> + </outputs> + + <help><![CDATA[]]></help> + <expand macro="citations"/> +</tool> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/recetox_metabolite_databases.loc.sample Tue Aug 25 11:45:18 2020 +0000 @@ -0,0 +1,5 @@ +# This file has the format (white space characters are +# TAB characters): +# +# <value> <name> <date> <path> +# \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Tue Aug 25 11:45:18 2020 +0000 @@ -0,0 +1,6 @@ +<tables> + <table name="recetox_metabolite_databases" comment_char="#"> + <columns>value, date, name, path</columns> + <file path="tool-data/recetox_metabolite_databases.loc" /> + </table> +</tables> \ No newline at end of file