comparison dfpl_predict.xml @ 0:8956e949d466 draft default tip

planemo upload for repository https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/dfpl commit 66c6acfeff5441c36fba97787ddc5ee3d6a4a6ec
author ufz
date Thu, 19 Dec 2024 12:51:08 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8956e949d466
1 <tool id="dfpl_predict" name="deepFPlearn predict" version="@TOOL_VERSION@+galaxy0" profile="23.0">
2 <description>association of molecular structures to biological targets</description>
3 <creator>
4 <organization name="Helmholtz Centre for Environmental Research - UFZ, Research Data Management"
5 url ="https://www.ufz.de/index.php?en=45348"/>
6 </creator>
7 <macros>
8 <import>macros.xml</import>
9 </macros>
10 <expand macro="requirements"/>
11 <command detect_errors="exit_code"><![CDATA[
12 set -o pipefail;
13 ln -s '$fnn_weights' model_weights.h5 &&
14 ln -s '$autoencoder_weights' encoder_weights.h5 &&
15 cat '$inputs'
16 | python '$__tool_directory__/json_flatten.py'
17 | python '$__tool_directory__/json_predict.py'
18 > config.json &&
19 dfpl predict --configFile config.json &&
20 cp predictions.csv '$outputFile'
21 ]]></command>
22 <configfiles>
23 <inputs name="inputs" data_style="paths"/>
24 </configfiles>
25 <inputs>
26 <section title="Input Data" name="input-data" expanded="true">
27 <param label="Input File" argument="--inputFile"
28 type="data" format="csv"
29 help="The file containing the data for the prediction in (unquoted) comma-separated CSV format.
30 The column named 'smiles' or 'fp' contains the field to be predicted.
31 Please adjust the type that should be predicted (fp or smile) appropriately.
32 An optional column 'id' is used to assign the outcomes to the original identifiers.
33 If this column is missing, the results are numbered in the order of their appearance in the input file.
34 A header is expected and respective column names are used"/>
35 <param label="Chemical Representation" argument="--type"
36 type="select" optional="true"
37 help="Type of the chemical representation">
38 <option value="fp" selected="true">fp</option>
39 <option value="smiles">smiles</option>
40 </param>
41 <param label="Fingerprint Type" argument="--fpType"
42 type="select" optional="true"
43 help="The type of fingerprint to be generated/used in input file">
44 <option value="topological" selected="true">topological</option>
45 <option value="MACCS">MACCS</option>
46 </param>
47 </section>
48 <conditional name="autoencoder">
49 <param label="Compress Fingerprints with Autoencoder" argument="--compressFeatures"
50 type="select"
51 help="Compress the fingerprints using a trained autoencoder (requires a weights file)">
52 <option value="true">Compress fingerprints</option>
53 <option value="false">Use raw fingerprints</option>
54 </param>
55 <when value="true">
56 <param label="Autoencoder Weights" name="autoencoder_weights"
57 type="data" format="h5" optional="false"
58 help="The autoencoder weights as generated by ``dfpl train``"/>
59 <param label="Autoencoder Type" argument="--aeType"
60 type="select" optional="true"
61 help="Autoencoder type, variational or deterministic">
62 <option value="variational">Variational</option>
63 <option value="deterministic" selected="true">Deterministic</option>
64 </param>
65 </when>
66 <when value="false">
67 </when>
68 </conditional>
69 <param label="Model Weights" name="fnn_weights"
70 type="data" format="h5" optional="false"
71 help="The model weights as generated by ``dfpl train``"/>
72 </inputs>
73 <outputs>
74 <data name="outputFile"
75 label="${tool.name} on ${on_string}: predicted values"
76 format="csv" />
77 </outputs>
78 <tests>
79 <!-- TODO add test with https://zenodo.org/records/14409985 .. https://github.com/galaxyproject/galaxy/issues/19346 -->
80 <test>
81 <section name="input-data">
82 <param name="inputFile" value="S_dataset.csv"/>
83 <param name="type" value="smiles"/>
84 <param name="fpType" value="topological"/>
85 </section>
86 <conditional name="autoencoder">
87 <param name="compressFeatures" value="true"/>
88 <param name="autoencoder_weights" value="encoder_weights.h5" location="https://zenodo.org/api/records/14514397/files/encoder_weights.h5/content"/>
89 <param name="aeType" value="deterministic"/>
90 </conditional>
91 <param name="fnn_weights" value="model_weights.h5" location="https://zenodo.org/api/records/14514397/files/model_weights.h5/content"/>
92 <output name="outputFile">
93 <assert_contents>
94 <has_n_lines n="7249"/>
95 <has_n_columns n="10" sep=","/>
96 <has_line n="1" line=",smiles,AR,ER,GR,Aromatase,TR,PPARg,ED,predicted"/>
97 </assert_contents>
98 </output>
99 <assert_stdout>
100 <has_text text="Prediction successful"/>
101 </assert_stdout>
102 </test>
103 </tests>
104 <help><![CDATA[
105 This tool is the predict mode of `DeepFPLearn <https://github.com/yigbt/deepFPlearn>`_.
106 It's equivalent to running ``dfpl predict`` from the command line.
107
108 The predict mode uses a model that was trained with ``dfpl train`` to predict
109 the association of molecular structures to a biological target.
110
111 The input file should be a CSV file with a header.
112
113 The tool will output the given CSV file with an additional column containing the predicted values.
114 ]]></help>
115 <expand macro="citations"/>
116 </tool>