Mercurial > repos > iuc > deepmicro
comparison deepmicro.xml @ 2:604bf9c9294f draft default tip
planemo upload for repository https://github.com/paulzierep/DeepMicro commit 574cb8c241e18a15f006bf307235c7dd23f07c69
| author | iuc |
|---|---|
| date | Tue, 23 Jul 2024 15:56:26 +0000 |
| parents | 5fc85e6bdc19 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:5fc85e6bdc19 | 2:604bf9c9294f |
|---|---|
| 16 #if $mode.mode_type == "only_encoding": | 16 #if $mode.mode_type == "only_encoding": |
| 17 | 17 |
| 18 #for $params in $mode.parameter_set: | 18 #for $params in $mode.parameter_set: |
| 19 | 19 |
| 20 #if $params.rl_type.rl_type_choice == "--pca" or $params.rl_type.rl_type_choice == "--rp": | 20 #if $params.rl_type.rl_type_choice == "--pca" or $params.rl_type.rl_type_choice == "--rp": |
| 21 DM.py -r 1 -cd features.csv '$params.rl_type.rl_type_choice' --save_rep --no_clf -t \${GALAXY_SLOTS:-8} && | 21 DM.py -r 1 |
| 22 -cd features.csv | |
| 23 '$params.rl_type.rl_type_choice' | |
| 24 --save_rep | |
| 25 --no_clf | |
| 26 -t \${GALAXY_SLOTS:-8} && | |
| 22 #else: | 27 #else: |
| 23 DM.py -r 1 -cd features.csv '$params.rl_type.rl_type_choice' -dm '$params.rl_type.dm' --save_rep --no_clf -t \${GALAXY_SLOTS:-8} && | 28 DM.py -r 1 |
| 29 -cd features.csv | |
| 30 '$params.rl_type.rl_type_choice' | |
| 31 -dm '$params.rl_type.dm' | |
| 32 --save_rep | |
| 33 --no_clf | |
| 34 -t \${GALAXY_SLOTS:-8} && | |
| 24 #end if | 35 #end if |
| 25 #end for | 36 #end for |
| 26 | 37 |
| 27 #else: | 38 #else: |
| 28 | 39 |
| 29 ln -s '$mode.class_labels' data/labels.csv && | 40 ln -s '$mode.class_labels' data/labels.csv && |
| 30 | 41 |
| 31 #for $params in $mode.parameter_set: | 42 #for $params in $mode.parameter_set: |
| 32 | 43 |
| 44 ## general args | |
| 45 DM.py | |
| 46 -r '$mode.repeat' | |
| 47 -cd features.csv | |
| 48 -cl labels.csv | |
| 49 --save_rep | |
| 50 -m '$params.rl_type.classifier' | |
| 51 --scoring '$mode.scoring' | |
| 52 -f '$mode.folds' | |
| 53 -t \${GALAXY_SLOTS:-8} | |
| 54 | |
| 33 ## only train classifier without encoding | 55 ## only train classifier without encoding |
| 34 #if $params.rl_type.rl_type_choice == "no_rl": | 56 #if $params.rl_type.rl_type_choice == "no_rl": |
| 35 DM.py -r 1 -cd features.csv -cl labels.csv --save_rep -m '$params.rl_type.classifier' -t \${GALAXY_SLOTS:-8} && | 57 && echo "Only train Clf - no encoding!" |
| 58 ## add rl type | |
| 36 #elif $params.rl_type.rl_type_choice == "--pca" or $params.rl_type.rl_type_choice == "--rp": | 59 #elif $params.rl_type.rl_type_choice == "--pca" or $params.rl_type.rl_type_choice == "--rp": |
| 37 DM.py -r 1 -cd features.csv -cl labels.csv '$params.rl_type.rl_type_choice' --save_rep -m '$params.rl_type.classifier' -t \${GALAXY_SLOTS:-8} && | 60 '$params.rl_type.rl_type_choice' |
| 61 ## add rl type and dm options | |
| 38 #else: | 62 #else: |
| 39 DM.py -r 1 -cd features.csv -cl labels.csv '$params.rl_type.rl_type_choice' -dm '$params.rl_type.dm' --save_rep -m '$params.rl_type.classifier' -t \${GALAXY_SLOTS:-8} && | 63 '$params.rl_type.rl_type_choice' |
| 64 -dm '$params.rl_type.dm' | |
| 40 #end if | 65 #end if |
| 66 && | |
| 41 #end for | 67 #end for |
| 42 | 68 |
| 43 #end if | 69 #end if |
| 44 | 70 |
| 45 echo Done ! | 71 echo Done ! |
| 57 <repeat name="parameter_set" title="Parameter Set"> | 83 <repeat name="parameter_set" title="Parameter Set"> |
| 58 <conditional name="rl_type"> | 84 <conditional name="rl_type"> |
| 59 <param name="rl_type_choice" type="select" label="Representation learning type" help="The type of representation learning" > | 85 <param name="rl_type_choice" type="select" label="Representation learning type" help="The type of representation learning" > |
| 60 <option value="--pca">PCA</option> | 86 <option value="--pca">PCA</option> |
| 61 <option value="--rp">Random Projection</option> | 87 <option value="--rp">Random Projection</option> |
| 62 <option value="--ae">Autoencoder or Deep Autoencoder</option> | 88 <option value="--ae">Shallow Autoencoder or Deep Autoencoder (SAE, DAE)</option> |
| 63 <option value="--vae">Variational Autoencoder</option> | 89 <option value="--vae">Variational Autoencoder (VAE)</option> |
| 64 <option value="--cae">Convolutional Autoencoder</option> | 90 <option value="--cae">Convolutional Autoencoder (CAE)</option> |
| 65 </param> | 91 </param> |
| 66 <when value="--pca"/> | 92 <when value="--pca"/> |
| 67 <when value="--rp"/> | 93 <when value="--rp"/> |
| 68 <when value="--ae"> | 94 <when value="--ae"> |
| 69 <expand macro="dm" /> | 95 <expand macro="dm" /> |
| 77 </conditional> | 103 </conditional> |
| 78 </repeat> | 104 </repeat> |
| 79 </when> | 105 </when> |
| 80 <when value="e_and_c"> | 106 <when value="e_and_c"> |
| 81 <param argument="--class_labels" type="data" format="tabular" label="Class labels" help="Dataset containing the class labels corresponding to the features"/> | 107 <param argument="--class_labels" type="data" format="tabular" label="Class labels" help="Dataset containing the class labels corresponding to the features"/> |
| 108 <param name="scoring" type="select" label="Scoring function for the classifiere" help="The classifiere will be optimized for this scoring function." > | |
| 109 <option value="roc_auc">ROC AUC</option> | |
| 110 <option value="accuracy">Accuracy</option> | |
| 111 <option value="f1">F1 Score</option> | |
| 112 <option value="recall">Recall</option> | |
| 113 <option value="precision">Precision</option> | |
| 114 </param> | |
| 115 <param name="folds" type="integer" value="5" label="Cross-validation folds" min="2" max="10" help="The number of folds for cross-validation in the tranining set"/> | |
| 116 <param name="repeat" type="integer" value="1" label="Repeat the experiment with different seed" min="1" max="5" help="Repeat the experiment with different seeds. Leads to a different train / test split each time."/> | |
| 82 <repeat name="parameter_set" title="Parameter Set"> | 117 <repeat name="parameter_set" title="Parameter Set"> |
| 83 <conditional name="rl_type"> | 118 <conditional name="rl_type"> |
| 84 <param name="rl_type_choice" type="select" label="Representation learning type" help="The type of representation learning. `Train on input` trains the classifier on the input features without representation learning" > | 119 <param name="rl_type_choice" type="select" label="Representation learning type" help="The type of representation learning. `Train on input` trains the classifier on the input features without representation learning" > |
| 85 <option value="--pca">PCA</option> | 120 <option value="--pca">PCA</option> |
| 86 <option value="--rp">Random Projection</option> | 121 <option value="--rp">Random Projection</option> |
| 87 <option value="--ae">Autoencoder or Deep Autoencoder</option> | 122 <option value="--ae">Shallow Autoencoder or Deep Autoencoder (SAE, DAE)</option> |
| 88 <option value="--vae">Variational Autoencoder</option> | 123 <option value="--vae">Variational Autoencoder (VAE)</option> |
| 89 <option value="--cae">Convolutional Autoencoder</option> | 124 <option value="--cae">Convolutional Autoencoder (CAE)</option> |
| 90 <option value="no_rl">Train on input</option> | 125 <option value="no_rl">Train on input</option> |
| 91 </param> | 126 </param> |
| 92 <when value="no_rl"> | 127 <when value="no_rl"> |
| 93 <expand macro="clfs" /> | 128 <expand macro="clfs" /> |
| 94 </when> | 129 </when> |
| 124 <!-- the encoded features generated by the tool are only for the training set, this is not very useful, therefore omitting | 159 <!-- the encoded features generated by the tool are only for the training set, this is not very useful, therefore omitting |
| 125 todo change tool do export features complete dataset also when classification is performed --> | 160 todo change tool do export features complete dataset also when classification is performed --> |
| 126 <filter>mode["mode_type"] == "only_encoding"</filter> | 161 <filter>mode["mode_type"] == "only_encoding"</filter> |
| 127 <discover_datasets directory="results" pattern="(?P<designation>.*)_rep\.csv" format="tabular" visible="false" /> | 162 <discover_datasets directory="results" pattern="(?P<designation>.*)_rep\.csv" format="tabular" visible="false" /> |
| 128 </collection> | 163 </collection> |
| 164 <collection name="model" type="list" label="Keras Models"> | |
| 165 <!-- the encoded features generated by the tool are only for the training set, this is not very useful, therefore omitting | |
| 166 todo change tool do export features complete dataset also when classification is performed --> | |
| 167 <filter>mode["mode_type"] == "only_encoding"</filter> | |
| 168 <discover_datasets directory="." pattern="(?P<designation>.*).h5" format="data" visible="false" /> | |
| 169 </collection> | |
| 129 </outputs> | 170 </outputs> |
| 130 <tests> | 171 <tests> |
| 131 | 172 |
| 132 <!-- only encoding --> | 173 <!-- only encoding --> |
| 133 <!-- test one parameter sets --> | 174 <!-- test one parameter sets --> |
| 134 | 175 |
| 135 <test expect_num_outputs="1"> | 176 <test expect_num_outputs="2"> |
| 136 <param name="mode_type" value="only_encoding" /> | 177 <param name="mode_type" value="only_encoding" /> |
| 137 <param name="features" value="UserDataExample.csv" /> | 178 <param name="features" value="UserDataExample.csv" /> |
| 138 <param name="rl_type_choice" value="--ae" /> | 179 <param name="rl_type_choice" value="--ae" /> |
| 139 <param name="dm" value="40" /> | 180 <param name="dm" value="40" /> |
| 140 <output_collection name="encoded_features" type="list"> | 181 <output_collection name="encoded_features" type="list"> |
| 146 </assert_contents> | 187 </assert_contents> |
| 147 </element> | 188 </element> |
| 148 </output_collection> | 189 </output_collection> |
| 149 </test> | 190 </test> |
| 150 | 191 |
| 151 <test expect_num_outputs="1"> | 192 <test expect_num_outputs="2"> |
| 152 <param name="mode_type" value="only_encoding" /> | 193 <param name="mode_type" value="only_encoding" /> |
| 153 <param name="features" value="UserDataExample.csv" /> | 194 <param name="features" value="UserDataExample.csv" /> |
| 154 <param name="rl_type_choice" value="--pca" /> | 195 <param name="rl_type_choice" value="--pca" /> |
| 155 <output_collection name="encoded_features" type="list"> | 196 <output_collection name="encoded_features" type="list"> |
| 156 <element name="PCA_features" ftype="tabular" > | 197 <element name="PCA_features" ftype="tabular" > |
| 160 </assert_contents> | 201 </assert_contents> |
| 161 </element> | 202 </element> |
| 162 </output_collection> | 203 </output_collection> |
| 163 </test> | 204 </test> |
| 164 | 205 |
| 206 <!-- only encoding --> | |
| 207 | |
| 208 <test expect_num_outputs="2"> | |
| 209 <param name="mode_type" value="only_encoding" /> | |
| 210 <param name="features" value="UserDataExample.csv" /> | |
| 211 <param name="rl_type_choice" value="--ae" /> | |
| 212 <param name="dm" value="40" /> | |
| 213 | |
| 214 <output_collection name="encoded_features" type="list"> | |
| 215 <!-- output is non determinisitc --> | |
| 216 <element name="AE[40]_features" ftype="tabular" > | |
| 217 <assert_contents> | |
| 218 <has_n_lines n="20"/> | |
| 219 <!-- <has_n_columns n="40" sep="," /> --> | |
| 220 </assert_contents> | |
| 221 </element> | |
| 222 </output_collection> | |
| 223 </test> | |
| 224 | |
| 165 <!-- test multiple parameter sets --> | 225 <!-- test multiple parameter sets --> |
| 166 <test expect_num_outputs="1"> | 226 <test expect_num_outputs="2"> |
| 167 <param name="features" value="UserDataExample.csv" /> | 227 <param name="features" value="UserDataExample.csv" /> |
| 168 <conditional name="mode"> | 228 <conditional name="mode"> |
| 169 <param name="mode_type" value="only_encoding" /> | 229 <param name="mode_type" value="only_encoding" /> |
| 170 | 230 |
| 171 <repeat name="parameter_set"> | 231 <repeat name="parameter_set"> |
| 200 | 260 |
| 201 </test> | 261 </test> |
| 202 | 262 |
| 203 <!-- encoding and clf --> | 263 <!-- encoding and clf --> |
| 204 <!-- test one parameter set --> | 264 <!-- test one parameter set --> |
| 205 | 265 <!-- test additional parameters scoring / folds and repeat --> |
| 206 <test expect_num_outputs="1"> | 266 <test expect_num_outputs="1"> |
| 207 <param name="features" value="UserDataExample.csv" /> | 267 <param name="features" value="UserDataExample.csv" /> |
| 208 <param name="mode_type" value="e_and_c" /> | 268 <param name="mode_type" value="e_and_c" /> |
| 209 <param name="class_labels" value="UserLabelExample.csv" /> | 269 <param name="class_labels" value="UserLabelExample.csv" /> |
| 210 <param name="rl_type_choice" value="--vae" /> | 270 <param name="rl_type_choice" value="--vae" /> |
| 211 <param name="dm" value="40" /> | 271 <param name="dm" value="40" /> |
| 272 <param name="scoring" value="roc_auc" /> | |
| 273 <param name="folds" value="2" /> | |
| 274 <param name="repeat" value="2" /> | |
| 212 <param name="classifier" value="rf" /> | 275 <param name="classifier" value="rf" /> |
| 213 <output ftype="tabular" name="results" > | 276 <output ftype="tabular" name="results" > |
| 214 <assert_contents> | 277 <assert_contents> |
| 215 <has_text text="VAE[40]_rf" /> | 278 <has_text text="VAE[40]_rf" /> |
| 216 </assert_contents> | 279 </assert_contents> |
| 217 </output> | 280 </output> |
| 218 | 281 |
| 219 </test> | 282 </test> |
| 220 | 283 |
| 284 | |
| 285 <!-- no rl --> | |
| 221 <test expect_num_outputs="1"> | 286 <test expect_num_outputs="1"> |
| 222 <param name="features" value="UserDataExample.csv" /> | 287 <param name="features" value="UserDataExample.csv" /> |
| 223 <param name="mode_type" value="e_and_c" /> | 288 <param name="mode_type" value="e_and_c" /> |
| 224 <param name="class_labels" value="UserLabelExample.csv" /> | 289 <param name="class_labels" value="UserLabelExample.csv" /> |
| 225 <param name="rl_type_choice" value="no_rl" /> | 290 <param name="rl_type_choice" value="no_rl" /> |
