Mercurial > repos > bgruening > keras_batch_models
comparison keras_batch_models.xml @ 15:cada91b0c1d1 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
author | bgruening |
---|---|
date | Wed, 09 Aug 2023 12:20:18 +0000 |
parents | 0a3f113397b2 |
children | 9d77b259ef27 |
comparison
equal
deleted
inserted
replaced
14:03533fa14e77 | 15:cada91b0c1d1 |
---|---|
1 <tool id="keras_batch_models" name="Build Deep learning Batch Training Models" version="@KERAS_VERSION@" profile="20.05"> | 1 <tool id="keras_batch_models" name="Build Deep learning Batch Training Models" version="@VERSION@" profile="@PROFILE@"> |
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 "@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 | |
18 --outfile_params '$outfile_params' | |
19 #end if | |
20 ]]> | 17 ]]> |
21 </command> | 18 </command> |
22 <configfiles> | 19 <configfiles> |
23 <inputs name="inputs" /> | 20 <inputs name="inputs" /> |
24 </configfiles> | 21 </configfiles> |
25 <inputs> | 22 <inputs> |
26 <conditional name="mode_selection"> | 23 <conditional name="mode_selection"> |
27 <param name="mode_type" type="select" label="Choose a building mode"> | 24 <param name="mode_type" type="select" label="Choose a building mode"> |
28 <option value="train_model" selected="true">Build a training model</option> | 25 <option value="train_model" selected="true">Build a training model</option> |
29 </param> | 26 </param> |
30 <when value="train_model"> | 27 <when value="train_model"> |
31 <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)" /> | 28 <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"> | 29 <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> | 30 <option value="KerasGBatchClassifier">KerasGBatchClassifier -- Build a training model with batch data generator</option> |
34 </param> | 31 </param> |
35 <conditional name="generator_selection"> | 32 <conditional name="generator_selection"> |
36 <param name="generator_type" type="select" label="Select a batch data generator"> | 33 <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> | 34 <option value="FastaDNABatchGenerator" selected="true">FastaDNABatchGenerator -- Online transformation of DNA sequences</option> |
38 <option value="FastaRNABatchGenerator">FastaRNABatchGenerator -- Online transformation of RNA sequences</option> | 35 <option value="FastaRNABatchGenerator">FastaRNABatchGenerator -- Online transformation of RNA sequences</option> |
39 <option value="FastaProteinBatchGenerator">FastaProteinBatchGenerator -- Online transformation of Protein sequences</option> | 36 <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> | 37 <option value="GenomicIntervalBatchGenerator">GenomicIntervalBatchGenerator - Online transformation of genomic sequences from a reference genome and intervals</option> |
41 <option value="none">To be determined</option> | 38 <option value="none">To be determined</option> |
42 </param> | 39 </param> |
43 <when value="FastaDNABatchGenerator"> | 40 <when value="FastaDNABatchGenerator"> |
44 <expand macro="params_fasta_dna_batch_generator" /> | 41 <expand macro="params_fasta_dna_batch_generator" /> |
45 </when> | 42 </when> |
46 <when value="FastaRNABatchGenerator"> | 43 <when value="FastaRNABatchGenerator"> |
47 <expand macro="params_fasta_dna_batch_generator" /> | 44 <expand macro="params_fasta_dna_batch_generator" /> |
48 </when> | 45 </when> |
49 <when value="FastaProteinBatchGenerator"> | 46 <when value="FastaProteinBatchGenerator"> |
50 <expand macro="params_fasta_protein_batch_generator" /> | 47 <expand macro="params_fasta_protein_batch_generator" /> |
51 </when> | 48 </when> |
52 <when value="GenomicIntervalBatchGenerator"> | 49 <when value="GenomicIntervalBatchGenerator"> |
53 <expand macro="params_genomic_interval_batch_generator" /> | 50 <expand macro="params_genomic_interval_batch_generator" /> |
54 </when> | 51 </when> |
55 <when value="none" /> | 52 <when value="none" /> |
56 </conditional> | 53 </conditional> |
57 <expand macro="keras_compile_params_section" /> | 54 <expand macro="keras_compile_params_section" /> |
58 <expand macro="keras_fit_params_section" /> | 55 <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}" /> | 56 <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`." /> | 57 <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." /> | 58 <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> | 59 </when> |
63 </conditional> | 60 </conditional> |
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." /> | 61 </inputs> |
65 </inputs> | 62 <outputs> |
66 <outputs> | 63 <data format="h5mlm" name="outfile" label="Keras Batch Classifier on ${on_string}" /> |
67 <data format="zip" name="outfile" label="Keras Batch Classifier on ${on_string}" /> | 64 </outputs> |
68 <data format="tabular" name="outfile_params" label="get_params for Keras Batch Classifier on ${on_string}"> | 65 <tests> |
69 <filter>get_params</filter> | 66 <test> |
70 </data> | 67 <conditional name="mode_selection"> |
71 </outputs> | 68 <param name="infile_json" value="keras05.json" ftype="json" /> |
72 <tests> | 69 <param name="learning_type" value="KerasGBatchClassifier" /> |
73 <test> | 70 <conditional name="generator_selection"> |
74 <conditional name="mode_selection"> | 71 <param name="generator_type" value="none" /> |
75 <param name="infile_json" value="keras01.json" ftype="json" /> | 72 </conditional> |
76 <param name="learning_type" value="KerasGBatchClassifier" /> | 73 <section name="compile_params"> |
77 <conditional name="generator_selection"> | 74 <param name="loss" value="categorical_crossentropy" /> |
78 <param name="generator_type" value="none" /> | 75 <conditional name="optimizer_selection"> |
79 </conditional> | 76 <param name="optimizer_type" value="RMSprop" /> |
80 <section name="fit_params"> | 77 <section name="optimizer_options"> |
81 <param name="epochs" value="100" /> | 78 <param name="lr" value="0.0001" /> |
82 <repeat name="callbacks"> | 79 <param name="decay" value="0.000001" /> |
83 <conditional name="callback_selection"> | 80 </section> |
84 <param name="callback_type" value="None" /> | 81 </conditional> |
85 </conditional> | 82 <param name="metrics" value="acc,categorical_accuracy" /> |
86 </repeat> | 83 </section> |
87 </section> | 84 <section name="fit_params"> |
88 </conditional> | 85 <param name="epochs" value="100" /> |
89 <param name="get_params" value="true" /> | 86 <repeat name="callbacks"> |
90 <output name="outfile" file="keras_batch_model04" compare="sim_size" delta="30" /> | 87 <conditional name="callback_selection"> |
91 <output name="outfile_params" file="keras_batch_params04.tabular" /> | 88 <param name="callback_type" value="None" /> |
92 </test> | 89 </conditional> |
93 <test> | 90 </repeat> |
94 <conditional name="mode_selection"> | 91 </section> |
95 <param name="infile_json" value="deepsear_1feature.json" ftype="json" /> | 92 </conditional> |
96 <param name="learning_type" value="KerasGBatchClassifier" /> | 93 <output name="outfile" file="keras_batch_model05" compare="sim_size" delta="5" /> |
97 <conditional name="generator_selection"> | 94 </test> |
98 <param name="generator_type" value="GenomicIntervalBatchGenerator" /> | 95 <test> |
99 <param name="seed" value="999" /> | 96 <conditional name="mode_selection"> |
100 </conditional> | 97 <param name="infile_json" value="keras01.json" ftype="json" /> |
101 <section name="fit_params"> | 98 <param name="learning_type" value="KerasGBatchClassifier" /> |
102 <param name="epochs" value="100" /> | 99 <conditional name="generator_selection"> |
103 </section> | 100 <param name="generator_type" value="none" /> |
104 </conditional> | 101 </conditional> |
105 <output name="outfile" file="keras_batch_model03" compare="sim_size" delta="30" /> | 102 <section name="fit_params"> |
106 </test> | 103 <param name="epochs" value="100" /> |
107 <test> | 104 <repeat name="callbacks"> |
108 <conditional name="mode_selection"> | 105 <conditional name="callback_selection"> |
109 <param name="infile_json" value="keras01.json" ftype="json" /> | 106 <param name="callback_type" value="None" /> |
110 <param name="learning_type" value="KerasGBatchClassifier" /> | 107 </conditional> |
111 <conditional name="generator_selection"> | 108 </repeat> |
112 <param name="generator_type" value="FastaDNABatchGenerator" /> | 109 </section> |
113 <param name="seed" value="999" /> | 110 </conditional> |
114 </conditional> | 111 <output name="outfile" file="keras_batch_model04" compare="sim_size" delta="20" /> |
115 <section name="fit_params"> | 112 </test> |
116 <param name="epochs" value="100" /> | 113 <test> |
117 <repeat name="callbacks"> | 114 <conditional name="mode_selection"> |
118 <conditional name="callback_selection"> | 115 <param name="infile_json" value="deepsear_1feature.json" ftype="json" /> |
119 <param name="callback_type" value="EarlyStopping" /> | 116 <param name="learning_type" value="KerasGBatchClassifier" /> |
120 <param name="monitor" value="val_loss" /> | 117 <conditional name="generator_selection"> |
121 </conditional> | 118 <param name="generator_type" value="GenomicIntervalBatchGenerator" /> |
122 </repeat> | 119 <param name="seed" value="999" /> |
123 </section> | 120 </conditional> |
124 </conditional> | 121 <section name="fit_params"> |
125 <output name="outfile" file="keras_batch_model02" compare="sim_size" delta="30" /> | 122 <param name="epochs" value="100" /> |
126 </test> | 123 </section> |
127 <test> | 124 </conditional> |
128 <conditional name="mode_selection"> | 125 <output name="outfile" file="keras_batch_model03" compare="sim_size" delta="20" /> |
129 <param name="infile_json" value="keras01.json" ftype="json" /> | 126 </test> |
130 <param name="learning_type" value="KerasGBatchClassifier" /> | 127 <test> |
131 <conditional name="generator_selection"> | 128 <conditional name="mode_selection"> |
132 <param name="generator_type" value="FastaDNABatchGenerator" /> | 129 <param name="infile_json" value="keras01.json" ftype="json" /> |
133 <param name="seed" value="999" /> | 130 <param name="learning_type" value="KerasGBatchClassifier" /> |
134 </conditional> | 131 <conditional name="generator_selection"> |
135 <section name="fit_params"> | 132 <param name="generator_type" value="FastaDNABatchGenerator" /> |
136 <param name="epochs" value="100" /> | 133 <param name="seed" value="999" /> |
137 <repeat name="callbacks"> | 134 </conditional> |
138 <conditional name="callback_selection"> | 135 <section name="fit_params"> |
139 <param name="callback_type" value="None" /> | 136 <param name="epochs" value="100" /> |
140 </conditional> | 137 <repeat name="callbacks"> |
141 </repeat> | 138 <conditional name="callback_selection"> |
142 </section> | 139 <param name="callback_type" value="EarlyStopping" /> |
143 </conditional> | 140 <param name="monitor" value="val_loss" /> |
144 <param name="get_params" value="true" /> | 141 </conditional> |
145 <output name="outfile" file="keras_batch_model01" compare="sim_size" delta="30" /> | 142 </repeat> |
146 <output name="outfile_params" file="keras_batch_params01.tabular" /> | 143 </section> |
147 </test> | 144 </conditional> |
148 </tests> | 145 <output name="outfile" file="keras_batch_model02" compare="sim_size" delta="20" /> |
149 <help> | 146 </test> |
150 <![CDATA[ | 147 <test> |
148 <conditional name="mode_selection"> | |
149 <param name="infile_json" value="keras01.json" ftype="json" /> | |
150 <param name="learning_type" value="KerasGBatchClassifier" /> | |
151 <conditional name="generator_selection"> | |
152 <param name="generator_type" value="FastaDNABatchGenerator" /> | |
153 <param name="seed" value="999" /> | |
154 </conditional> | |
155 <section name="fit_params"> | |
156 <param name="epochs" value="100" /> | |
157 <repeat name="callbacks"> | |
158 <conditional name="callback_selection"> | |
159 <param name="callback_type" value="None" /> | |
160 </conditional> | |
161 </repeat> | |
162 </section> | |
163 </conditional> | |
164 <output name="outfile" file="keras_batch_model01" compare="sim_size" delta="5" /> | |
165 </test> | |
166 </tests> | |
167 <help> | |
168 <![CDATA[ | |
151 **What does this tool do?** | 169 **What does this tool do?** |
152 | 170 |
153 This tool builds deep learning training models using API `galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`_, which takes parameters in FIVE categories. | 171 This tool builds deep learning training models using API `galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`_, which takes parameters in FIVE categories. |
154 | 172 |
155 - a JSON file that contains layer information for a deep learning model. | 173 - a JSON file that contains layer information for a deep learning model. |
163 - other parameters, including `class_positive_factor`, `prediction_steps`, `seed` (random seed) and so on. | 181 - other parameters, including `class_positive_factor`, `prediction_steps`, `seed` (random seed) and so on. |
164 | 182 |
165 | 183 |
166 **Output** | 184 **Output** |
167 | 185 |
168 A zipped model file that could be used in `model_validation` tool or `hyperparameter search` tool. | 186 A model file that could be used in `model_validation` tool or `hyperparameter search` tool. |
169 | 187 |
170 .. _`galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#kerasgbatchclassifier | 188 .. _`galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#kerasgbatchclassifier |
171 | 189 |
172 .. _`galaxy_ml.preprocessors.FastaDNABatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#FastaDNABatchGenerator | 190 .. _`galaxy_ml.preprocessors.FastaDNABatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#FastaDNABatchGenerator |
173 | 191 |
178 .. _`galaxy_ml.preprocessors.GenomicIntervalBatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#GenomicIntervalBatchGenerator | 196 .. _`galaxy_ml.preprocessors.GenomicIntervalBatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#GenomicIntervalBatchGenerator |
179 | 197 |
180 .. _`keras.io`: https://keras.io/models/model/#fit_generator | 198 .. _`keras.io`: https://keras.io/models/model/#fit_generator |
181 | 199 |
182 ]]> | 200 ]]> |
183 </help> | 201 </help> |
184 <citations> | 202 <citations> |
185 <expand macro="keras_citation" /> | 203 <expand macro="keras_citation" /> |
186 <expand macro="tensorflow_citation" /> | 204 <expand macro="tensorflow_citation" /> |
187 </citations> | 205 </citations> |
188 </tool> | 206 </tool> |