Mercurial > repos > bgruening > keras_batch_models
comparison keras_batch_models.xml @ 0:f59a4f7c47f9 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 60f0fbc0eafd7c11bc60fb6c77f2937782efd8a9-dirty
author | bgruening |
---|---|
date | Fri, 09 Aug 2019 06:26:30 -0400 |
parents | |
children | 79efb5472c2e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f59a4f7c47f9 |
---|---|
1 <tool id="keras_batch_models" name="Build Deep learning Batch Training Models" version="@KERAS_VERSION@"> | |
2 <description>with online data generator for Genomic/Protein sequences and images</description> | |
3 <macros> | |
4 <import>main_macros.xml</import> | |
5 <import>keras_macros.xml</import> | |
6 </macros> | |
7 <expand macro="python_requirements"/> | |
8 <expand macro="macro_stdio"/> | |
9 <version_command>echo "@KERAS_VERSION@"</version_command> | |
10 <command> | |
11 <![CDATA[ | |
12 python '$__tool_directory__/keras_deep_learning.py' | |
13 --inputs '$inputs' | |
14 --model_json '$mode_selection.infile_json' | |
15 --tool_id 'keras_batch_models' | |
16 --outfile '$outfile' | |
17 #if $get_params | |
18 --outfile_params '$outfile_params' | |
19 #end if | |
20 ]]> | |
21 </command> | |
22 <configfiles> | |
23 <inputs name="inputs"/> | |
24 </configfiles> | |
25 <inputs> | |
26 <conditional name="mode_selection"> | |
27 <param name="mode_type" type="select" label="Choose a building mode"> | |
28 <option value="train_model" selected="true">Build a training model</option> | |
29 </param> | |
30 <when value="train_model"> | |
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"> | |
33 <option value="KerasGBatchClassifier">KerasGBatchClassifier -- Build a training model with batch data generator</option> | |
34 </param> | |
35 <conditional name="generator_selection"> | |
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> | |
38 <option value="FastaRNABatchGenerator">FastaRNABatchGenerator -- Online transformation of RNA 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> | |
41 <!--option value="ImageBatchGenerator">ImageBatchGenerator - Online transformation of images</option--> | |
42 </param> | |
43 <when value="FastaDNABatchGenerator"> | |
44 <expand macro="params_fasta_dna_batch_generator"/> | |
45 </when> | |
46 <when value="FastaRNABatchGenerator"> | |
47 <expand macro="params_fasta_dna_batch_generator"/> | |
48 </when> | |
49 <when value="FastaProteinBatchGenerator"> | |
50 <expand macro="params_fasta_protein_batch_generator"/> | |
51 </when> | |
52 <when value="GenomicIntervalBatchGenerator"> | |
53 <expand macro="params_genomic_interval_batch_generator"/> | |
54 </when> | |
55 <!--when value="ImageBatchGenerator"> | |
56 <expand macro="params_image_batch_generator"/> | |
57 </when--> | |
58 </conditional> | |
59 <expand macro="keras_compile_params_section"/> | |
60 <expand macro="keras_fit_params_section"/> | |
61 <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}"/> | |
62 <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`."/> | |
63 <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."/> | |
64 </when> | |
65 </conditional> | |
66 <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."/> | |
67 </inputs> | |
68 <outputs> | |
69 <data format="zip" name="outfile" label="Keras Batch Classifier on ${on_string}"/> | |
70 <data format="tabular" name="outfile_params" label="get_params for Keras Batch Classifier on ${on_string}"> | |
71 <filter>get_params</filter> | |
72 </data> | |
73 </outputs> | |
74 <tests> | |
75 <test> | |
76 <conditional name="mode_selection"> | |
77 <param name="infile_json" value="deepsear_1feature.json" ftype="json"/> | |
78 <param name="learning_type" value="KerasGBatchClassifier"/> | |
79 <conditional name="generator_selection"> | |
80 <param name="generator_type" value="GenomicIntervalBatchGenerator"/> | |
81 <param name="seed" value="999"/> | |
82 </conditional> | |
83 <section name="fit_params"> | |
84 <param name="epochs" value="100"/> | |
85 </section> | |
86 </conditional> | |
87 <output name="outfile" file="keras_batch_model03" compare="sim_size" delta="5"/> | |
88 </test> | |
89 <test> | |
90 <conditional name="mode_selection"> | |
91 <param name="infile_json" value="keras01.json" ftype="json"/> | |
92 <param name="learning_type" value="KerasGBatchClassifier"/> | |
93 <conditional name="generator_selection"> | |
94 <param name="generator_type" value="FastaDNABatchGenerator"/> | |
95 <param name="seed" value="999"/> | |
96 </conditional> | |
97 <section name="fit_params"> | |
98 <param name="epochs" value="100"/> | |
99 <repeat name="callbacks"> | |
100 <conditional name="callback_selection"> | |
101 <param name="callback_type" value="EarlyStopping"/> | |
102 <param name="monitor" value="val_loss"/> | |
103 </conditional> | |
104 </repeat> | |
105 </section> | |
106 </conditional> | |
107 <output name="outfile" file="keras_batch_model02" compare="sim_size" delta="5"/> | |
108 </test> | |
109 <test> | |
110 <conditional name="mode_selection"> | |
111 <param name="infile_json" value="keras01.json" ftype="json"/> | |
112 <param name="learning_type" value="KerasGBatchClassifier"/> | |
113 <conditional name="generator_selection"> | |
114 <param name="generator_type" value="FastaDNABatchGenerator"/> | |
115 <param name="seed" value="999"/> | |
116 </conditional> | |
117 <section name="fit_params"> | |
118 <param name="epochs" value="100"/> | |
119 <repeat name="callbacks"> | |
120 <conditional name="callback_selection"> | |
121 <param name="callback_type" value="None"/> | |
122 </conditional> | |
123 </repeat> | |
124 </section> | |
125 </conditional> | |
126 <param name="get_params" value="true" /> | |
127 <output name="outfile" file="keras_batch_model01" compare="sim_size" delta="5"/> | |
128 <output name="outfile_params" file="keras_batch_params01.tabular" /> | |
129 </test> | |
130 </tests> | |
131 <help> | |
132 <![CDATA[ | |
133 **What does this tool do?** | |
134 | |
135 This tool builds deep learning training models using API `galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`_, which takes parameters in FIVE categories. | |
136 | |
137 - a JSON file that contains layer information for a deep learning model. | |
138 | |
139 - a data batch generator that converts raw data, such as images and genomic sequences, into numerical data to be able to fit the deep learning model. That the cycle of `batch conversion - fitting` occur in stream mode, also called on-line transformation, guarantees the training to be CPU and memory efficient. Reference: `galaxy_ml.preprocessors.FastaDNABatchGenerator`_, `galaxy_ml.preprocessors.FastaRNABatchGenerator`_, `galaxy_ml.preprocessors.FastaProteinBatchGenerator`_, `galaxy_ml.preprocessors.GenomicIntervalBatchGenerator`_. | |
140 | |
141 - compile parameters, are mainly composed of loss function and optimizer. | |
142 | |
143 - fit parameters, a group of variables that control the training process, referring to `galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`_ and `keras.io`_. | |
144 | |
145 - other parameters, including `class_positive_factor`, `prediction_steps`, `seed` (random seed) and so on. | |
146 | |
147 | |
148 **Output** | |
149 | |
150 A zipped model file that could be used in `model_validation` tool or `hyperparameter search` tool. | |
151 | |
152 .. _`galaxy_ml.keras_galaxy_model.KerasGBatchClassifier`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#kerasgbatchclassifier | |
153 | |
154 .. _`galaxy_ml.preprocessors.FastaDNABatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#FastaDNABatchGenerator | |
155 | |
156 .. _`galaxy_ml.preprocessors.FastaRNABatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#FastaRNABatchGenerator | |
157 | |
158 .. _`galaxy_ml.preprocessors.FastaProteinBatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#FastaProteinBatchGenerator | |
159 | |
160 .. _`galaxy_ml.preprocessors.GenomicIntervalBatchGenerator`: https://goeckslab.github.io/Galaxy-ML/APIs/keras-galaxy-models/#GenomicIntervalBatchGenerator | |
161 | |
162 .. _`keras.io`: https://keras.io/models/model/#fit_generator | |
163 | |
164 ]]> | |
165 </help> | |
166 <citations> | |
167 <expand macro="keras_citation"/> | |
168 <expand macro="tensorflow_citation"/> | |
169 </citations> | |
170 </tool> |