Mercurial > repos > bgruening > keras_batch_models
comparison keras_batch_models.xml @ 8:8edfc7381344 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author | bgruening |
---|---|
date | Tue, 13 Apr 2021 15:58:22 +0000 |
parents | 79efb5472c2e |
children | 70846a2dd227 |
comparison
equal
deleted
inserted
replaced
7:b2494cb1de6d | 8:8edfc7381344 |
---|---|
1 <tool id="keras_batch_models" name="Build Deep learning Batch Training Models" version="@KERAS_VERSION@"> | 1 <tool id="keras_batch_models" name="Build Deep learning Batch Training Models" version="@KERAS_VERSION@" profile="20.05"> |
2 <description>with online data generator for Genomic/Protein sequences and images</description> | 2 <description>with online data generator for Genomic/Protein sequences and images</description> |
3 <macros> | 3 <macros> |
4 <import>main_macros.xml</import> | 4 <import>main_macros.xml</import> |
5 <import>keras_macros.xml</import> | 5 <import>keras_macros.xml</import> |
6 </macros> | 6 </macros> |
7 <expand macro="python_requirements"/> | 7 <expand macro="python_requirements" /> |
8 <expand macro="macro_stdio"/> | 8 <expand macro="macro_stdio" /> |
9 <version_command>echo "@KERAS_VERSION@"</version_command> | 9 <version_command>echo "@KERAS_VERSION@"</version_command> |
10 <command> | 10 <command> |
11 <![CDATA[ | 11 <![CDATA[ |
12 python '$__tool_directory__/keras_deep_learning.py' | 12 python '$__tool_directory__/keras_deep_learning.py' |
13 --inputs '$inputs' | 13 --inputs '$inputs' |
14 --model_json '$mode_selection.infile_json' | 14 --model_json '$mode_selection.infile_json' |
15 --tool_id 'keras_batch_models' | 15 --tool_id 'keras_batch_models' |
16 --outfile '$outfile' | 16 --outfile '$outfile' |
17 #if $get_params | 17 #if $get_params |
18 --outfile_params '$outfile_params' | 18 --outfile_params '$outfile_params' |
19 #end if | 19 #end if |
20 ]]> | 20 ]]> |
21 </command> | 21 </command> |
22 <configfiles> | 22 <configfiles> |
23 <inputs name="inputs"/> | 23 <inputs name="inputs" /> |
24 </configfiles> | 24 </configfiles> |
25 <inputs> | 25 <inputs> |
26 <conditional name="mode_selection"> | 26 <conditional name="mode_selection"> |
27 <param name="mode_type" type="select" label="Choose a building mode"> | 27 <param name="mode_type" type="select" label="Choose a building mode"> |
28 <option value="train_model" selected="true">Build a training model</option> | 28 <option value="train_model" selected="true">Build a training model</option> |
29 </param> | 29 </param> |
30 <when value="train_model"> | 30 <when value="train_model"> |
31 <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)"/> | 31 <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)" /> |
32 <param name="learning_type" type="select" label="Select a learning class"> | 32 <param name="learning_type" type="select" label="Select a learning class"> |
33 <option value="KerasGBatchClassifier">KerasGBatchClassifier -- Build a training model with batch data generator</option> | 33 <option value="KerasGBatchClassifier">KerasGBatchClassifier -- Build a training model with batch data generator</option> |
34 </param> | 34 </param> |
35 <conditional name="generator_selection"> | 35 <conditional name="generator_selection"> |
36 <param name="generator_type" type="select" label="Select a batch data generator"> | 36 <param name="generator_type" type="select" label="Select a batch data generator"> |
37 <option value="FastaDNABatchGenerator" selected="true">FastaDNABatchGenerator -- Online transformation of DNA sequences</option> | 37 <option value="FastaDNABatchGenerator" selected="true">FastaDNABatchGenerator -- Online transformation of DNA sequences</option> |
38 <option value="FastaRNABatchGenerator">FastaRNABatchGenerator -- Online transformation of RNA sequences</option> | 38 <option value="FastaRNABatchGenerator">FastaRNABatchGenerator -- Online transformation of RNA sequences</option> |
39 <option value="FastaProteinBatchGenerator">FastaProteinBatchGenerator -- Online transformation of Protein sequences</option> | 39 <option value="FastaProteinBatchGenerator">FastaProteinBatchGenerator -- Online transformation of Protein sequences</option> |
40 <option value="GenomicIntervalBatchGenerator">GenomicIntervalBatchGenerator - Online transformation of genomic sequences from a reference genome and intervals</option> | 40 <option value="GenomicIntervalBatchGenerator">GenomicIntervalBatchGenerator - Online transformation of genomic sequences from a reference genome and intervals</option> |
41 <option value="none">To be determined</option> | 41 <option value="none">To be determined</option> |
42 </param> | 42 </param> |
43 <when value="FastaDNABatchGenerator"> | 43 <when value="FastaDNABatchGenerator"> |
44 <expand macro="params_fasta_dna_batch_generator"/> | 44 <expand macro="params_fasta_dna_batch_generator" /> |
45 </when> | 45 </when> |
46 <when value="FastaRNABatchGenerator"> | 46 <when value="FastaRNABatchGenerator"> |
47 <expand macro="params_fasta_dna_batch_generator"/> | 47 <expand macro="params_fasta_dna_batch_generator" /> |
48 </when> | 48 </when> |
49 <when value="FastaProteinBatchGenerator"> | 49 <when value="FastaProteinBatchGenerator"> |
50 <expand macro="params_fasta_protein_batch_generator"/> | 50 <expand macro="params_fasta_protein_batch_generator" /> |
51 </when> | 51 </when> |
52 <when value="GenomicIntervalBatchGenerator"> | 52 <when value="GenomicIntervalBatchGenerator"> |
53 <expand macro="params_genomic_interval_batch_generator"/> | 53 <expand macro="params_genomic_interval_batch_generator" /> |
54 </when> | 54 </when> |
55 <when value="none"/> | 55 <when value="none" /> |
56 </conditional> | |
57 <expand macro="keras_compile_params_section" /> | |
58 <expand macro="keras_fit_params_section" /> | |
59 <param name="class_positive_factor" type="float" value="1" optional="true" label="class_positive_factor" help="For binary classification only. If int, like 5, will convert to class_weight {0: 1, 1: 5}. If float, 0.2, corresponds to class_weight {0: 1/0.2, 1: 1}" /> | |
60 <param name="prediction_steps" type="integer" value="" optional="true" label="prediction_steps" help="Prediction steps. Optional. If None, it equals number of samples divided by `batch_size`." /> | |
61 <param name="random_seed" type="integer" value="" optional="true" label="Random Seed" help="Integer or blank for None. Warning: when random seed is set to an integer, training will be running in single thread mode, which may cause slowness." /> | |
62 </when> | |
56 </conditional> | 63 </conditional> |
57 <expand macro="keras_compile_params_section"/> | 64 <param name="get_params" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Output parameters for searchCV?" help="Optional. Tunable parameters could be obtained through `estimator_attributes` tool." /> |
58 <expand macro="keras_fit_params_section"/> | 65 </inputs> |
59 <param name="class_positive_factor" type="float" value="1" optional="true" label="class_positive_factor" help="For binary classification only. If int, like 5, will convert to class_weight {0: 1, 1: 5}. If float, 0.2, corresponds to class_weight {0: 1/0.2, 1: 1}"/> | 66 <outputs> |
60 <param name="prediction_steps" type="integer" value="" optional="true" label="prediction_steps" help="Prediction steps. Optional. If None, it equals number of samples divided by `batch_size`."/> | 67 <data format="zip" name="outfile" label="Keras Batch Classifier on ${on_string}" /> |
61 <param name="random_seed" type="integer" value="" optional="true" label="Random Seed" help="Integer or blank for None. Warning: when random seed is set to an integer, training will be running in single thread mode, which may cause slowness."/> | 68 <data format="tabular" name="outfile_params" label="get_params for Keras Batch Classifier on ${on_string}"> |
62 </when> | 69 <filter>get_params</filter> |
63 </conditional> | 70 </data> |
64 <param name="get_params" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Output parameters for searchCV?" help="Optional. Tunable parameters could be obtained through `estimator_attributes` tool."/> | 71 </outputs> |
65 </inputs> | 72 <tests> |
66 <outputs> | 73 <test> |
67 <data format="zip" name="outfile" label="Keras Batch Classifier on ${on_string}"/> | 74 <conditional name="mode_selection"> |
68 <data format="tabular" name="outfile_params" label="get_params for Keras Batch Classifier on ${on_string}"> | 75 <param name="infile_json" value="keras01.json" ftype="json" /> |
69 <filter>get_params</filter> | 76 <param name="learning_type" value="KerasGBatchClassifier" /> |
70 </data> | 77 <conditional name="generator_selection"> |
71 </outputs> | 78 <param name="generator_type" value="none" /> |
72 <tests> | 79 </conditional> |
73 <test> | 80 <section name="fit_params"> |
74 <conditional name="mode_selection"> | 81 <param name="epochs" value="100" /> |
75 <param name="infile_json" value="keras01.json" ftype="json"/> | 82 <repeat name="callbacks"> |
76 <param name="learning_type" value="KerasGBatchClassifier"/> | 83 <conditional name="callback_selection"> |
77 <conditional name="generator_selection"> | 84 <param name="callback_type" value="None" /> |
78 <param name="generator_type" value="none"/> | 85 </conditional> |
79 </conditional> | 86 </repeat> |
80 <section name="fit_params"> | 87 </section> |
81 <param name="epochs" value="100"/> | |
82 <repeat name="callbacks"> | |
83 <conditional name="callback_selection"> | |
84 <param name="callback_type" value="None"/> | |
85 </conditional> | 88 </conditional> |
86 </repeat> | 89 <param name="get_params" value="true" /> |
87 </section> | 90 <output name="outfile" file="keras_batch_model04" compare="sim_size" delta="30" /> |
88 </conditional> | 91 <output name="outfile_params" file="keras_batch_params04.tabular" /> |
89 <param name="get_params" value="true" /> | 92 </test> |
90 <output name="outfile" file="keras_batch_model04" compare="sim_size" delta="5"/> | 93 <test> |
91 <output name="outfile_params" file="keras_batch_params04.tabular" /> | 94 <conditional name="mode_selection"> |
92 </test> | 95 <param name="infile_json" value="deepsear_1feature.json" ftype="json" /> |
93 <test> | 96 <param name="learning_type" value="KerasGBatchClassifier" /> |
94 <conditional name="mode_selection"> | 97 <conditional name="generator_selection"> |
95 <param name="infile_json" value="deepsear_1feature.json" ftype="json"/> | 98 <param name="generator_type" value="GenomicIntervalBatchGenerator" /> |
96 <param name="learning_type" value="KerasGBatchClassifier"/> | 99 <param name="seed" value="999" /> |
97 <conditional name="generator_selection"> | 100 </conditional> |
98 <param name="generator_type" value="GenomicIntervalBatchGenerator"/> | 101 <section name="fit_params"> |
99 <param name="seed" value="999"/> | 102 <param name="epochs" value="100" /> |
100 </conditional> | 103 </section> |
101 <section name="fit_params"> | |
102 <param name="epochs" value="100"/> | |
103 </section> | |
104 </conditional> | |
105 <output name="outfile" file="keras_batch_model03" compare="sim_size" delta="5"/> | |
106 </test> | |
107 <test> | |
108 <conditional name="mode_selection"> | |
109 <param name="infile_json" value="keras01.json" ftype="json"/> | |
110 <param name="learning_type" value="KerasGBatchClassifier"/> | |
111 <conditional name="generator_selection"> | |
112 <param name="generator_type" value="FastaDNABatchGenerator"/> | |
113 <param name="seed" value="999"/> | |
114 </conditional> | |
115 <section name="fit_params"> | |
116 <param name="epochs" value="100"/> | |
117 <repeat name="callbacks"> | |
118 <conditional name="callback_selection"> | |
119 <param name="callback_type" value="EarlyStopping"/> | |
120 <param name="monitor" value="val_loss"/> | |
121 </conditional> | 104 </conditional> |
122 </repeat> | 105 <output name="outfile" file="keras_batch_model03" compare="sim_size" delta="30" /> |
123 </section> | 106 </test> |
124 </conditional> | 107 <test> |
125 <output name="outfile" file="keras_batch_model02" compare="sim_size" delta="5"/> | 108 <conditional name="mode_selection"> |
126 </test> | 109 <param name="infile_json" value="keras01.json" ftype="json" /> |
127 <test> | 110 <param name="learning_type" value="KerasGBatchClassifier" /> |
128 <conditional name="mode_selection"> | 111 <conditional name="generator_selection"> |
129 <param name="infile_json" value="keras01.json" ftype="json"/> | 112 <param name="generator_type" value="FastaDNABatchGenerator" /> |
130 <param name="learning_type" value="KerasGBatchClassifier"/> | 113 <param name="seed" value="999" /> |
131 <conditional name="generator_selection"> | 114 </conditional> |
132 <param name="generator_type" value="FastaDNABatchGenerator"/> | 115 <section name="fit_params"> |
133 <param name="seed" value="999"/> | 116 <param name="epochs" value="100" /> |
134 </conditional> | 117 <repeat name="callbacks"> |
135 <section name="fit_params"> | 118 <conditional name="callback_selection"> |
136 <param name="epochs" value="100"/> | 119 <param name="callback_type" value="EarlyStopping" /> |
137 <repeat name="callbacks"> | 120 <param name="monitor" value="val_loss" /> |
138 <conditional name="callback_selection"> | 121 </conditional> |
139 <param name="callback_type" value="None"/> | 122 </repeat> |
123 </section> | |
140 </conditional> | 124 </conditional> |
141 </repeat> | 125 <output name="outfile" file="keras_batch_model02" compare="sim_size" delta="30" /> |
142 </section> | 126 </test> |
143 </conditional> | 127 <test> |
144 <param name="get_params" value="true" /> | 128 <conditional name="mode_selection"> |
145 <output name="outfile" file="keras_batch_model01" compare="sim_size" delta="5"/> | 129 <param name="infile_json" value="keras01.json" ftype="json" /> |
146 <output name="outfile_params" file="keras_batch_params01.tabular" /> | 130 <param name="learning_type" value="KerasGBatchClassifier" /> |
147 </test> | 131 <conditional name="generator_selection"> |
148 </tests> | 132 <param name="generator_type" value="FastaDNABatchGenerator" /> |
149 <help> | 133 <param name="seed" value="999" /> |
150 <![CDATA[ | 134 </conditional> |
135 <section name="fit_params"> | |
136 <param name="epochs" value="100" /> | |
137 <repeat name="callbacks"> | |
138 <conditional name="callback_selection"> | |
139 <param name="callback_type" value="None" /> | |
140 </conditional> | |
141 </repeat> | |
142 </section> | |
143 </conditional> | |
144 <param name="get_params" value="true" /> | |
145 <output name="outfile" file="keras_batch_model01" compare="sim_size" delta="30" /> | |
146 <output name="outfile_params" file="keras_batch_params01.tabular" /> | |
147 </test> | |
148 </tests> | |
149 <help> | |
150 <![CDATA[ | |
151 **What does this tool do?** | 151 **What does this tool do?** |
152 | 152 |
153 This tool builds deep learning training models using API `galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`_, which takes parameters in FIVE categories. | 153 This tool builds deep learning training models using API `galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`_, which takes parameters in FIVE categories. |
154 | 154 |
155 - a JSON file that contains layer information for a deep learning model. | 155 - a JSON file that contains layer information for a deep learning model. |
178 .. _`galaxy_ml.preprocessors.GenomicIntervalBatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#GenomicIntervalBatchGenerator | 178 .. _`galaxy_ml.preprocessors.GenomicIntervalBatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#GenomicIntervalBatchGenerator |
179 | 179 |
180 .. _`keras.io`: https://keras.io/models/model/#fit_generator | 180 .. _`keras.io`: https://keras.io/models/model/#fit_generator |
181 | 181 |
182 ]]> | 182 ]]> |
183 </help> | 183 </help> |
184 <citations> | 184 <citations> |
185 <expand macro="keras_citation"/> | 185 <expand macro="keras_citation" /> |
186 <expand macro="tensorflow_citation"/> | 186 <expand macro="tensorflow_citation" /> |
187 </citations> | 187 </citations> |
188 </tool> | 188 </tool> |