Mercurial > repos > florianbegusch > qiime2_suite
comparison qiime2/qiime_sample-classifier_classify-samples.xml @ 14:a0a8d77a991c draft
Uploaded
author | florianbegusch |
---|---|
date | Thu, 03 Sep 2020 09:51:29 +0000 |
parents | f190567fe3f6 |
children |
comparison
equal
deleted
inserted
replaced
13:887cd4ad8e16 | 14:a0a8d77a991c |
---|---|
1 <?xml version="1.0" ?> | 1 <?xml version="1.0" ?> |
2 <tool id="qiime_sample-classifier_classify-samples" name="qiime sample-classifier classify-samples" version="2019.7"> | 2 <tool id="qiime_sample-classifier_classify-samples" name="qiime sample-classifier classify-samples" |
3 <description> - Train and test a cross-validated supervised learning classifier.</description> | 3 version="2020.8"> |
4 <requirements> | 4 <description>Train and test a cross-validated supervised learning classifier.</description> |
5 <requirement type="package" version="2019.7">qiime2</requirement> | 5 <requirements> |
6 </requirements> | 6 <requirement type="package" version="2020.8">qiime2</requirement> |
7 <command><![CDATA[ | 7 </requirements> |
8 <command><![CDATA[ | |
8 qiime sample-classifier classify-samples | 9 qiime sample-classifier classify-samples |
9 | 10 |
10 --i-table=$itable | 11 --i-table=$itable |
11 --m-metadata-column="$mmetadatacolumn" | 12 # if $input_files_mmetadatafile: |
12 | 13 # def list_dict_to_string(list_dict): |
13 #if str($ptestsize): | 14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name') |
14 --p-test-size=$ptestsize | 15 # for d in list_dict[1:]: |
15 #end if | 16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name') |
16 | 17 # end for |
17 #if str($pstep): | 18 # return $file_list |
18 --p-step=$pstep | 19 # end def |
19 #end if | 20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile) |
20 | 21 # end if |
21 #if str($pcv): | 22 |
22 --p-cv=$pcv | 23 #if '__ob__' in str($mmetadatacolumn): |
23 #end if | 24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[') |
25 #set $mmetadatacolumn = $mmetadatacolumn_temp | |
26 #end if | |
27 #if '__cb__' in str($mmetadatacolumn): | |
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']') | |
29 #set $mmetadatacolumn = $mmetadatacolumn_temp | |
30 #end if | |
31 #if 'X' in str($mmetadatacolumn): | |
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\') | |
33 #set $mmetadatacolumn = $mmetadatacolumn_temp | |
34 #end if | |
35 #if '__sq__' in str($mmetadatacolumn): | |
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'") | |
37 #set $mmetadatacolumn = $mmetadatacolumn_temp | |
38 #end if | |
39 #if '__db__' in str($mmetadatacolumn): | |
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"') | |
41 #set $mmetadatacolumn = $mmetadatacolumn_temp | |
42 #end if | |
43 | |
44 --m-metadata-column=$mmetadatacolumn | |
45 | |
46 | |
47 --p-test-size=$ptestsize | |
48 | |
49 --p-step=$pstep | |
50 | |
51 --p-cv=$pcv | |
24 | 52 |
25 #if str($prandomstate): | 53 #if str($prandomstate): |
26 --p-random-state="$prandomstate" | 54 --p-random-state=$prandomstate |
27 #end if | 55 #end if |
28 | 56 --p-n-jobs=$pnjobs |
29 #set $pnjobs = '${GALAXY_SLOTS:-4}' | 57 |
30 | 58 --p-n-estimators=$pnestimators |
31 #if str($pnjobs): | |
32 --p-n-jobs="$pnjobs" | |
33 #end if | |
34 | |
35 | |
36 #if $pnestimators: | |
37 --p-n-estimators=$pnestimators | |
38 #end if | |
39 | 59 |
40 #if str($pestimator) != 'None': | 60 #if str($pestimator) != 'None': |
41 --p-estimator=$pestimator | 61 --p-estimator=$pestimator |
42 #end if | 62 #end if |
43 | 63 |
44 #if $poptimizefeatureselection: | 64 #if $poptimizefeatureselection: |
45 --p-optimize-feature-selection | 65 --p-optimize-feature-selection |
46 #end if | 66 #end if |
48 #if $pparametertuning: | 68 #if $pparametertuning: |
49 --p-parameter-tuning | 69 --p-parameter-tuning |
50 #end if | 70 #end if |
51 | 71 |
52 #if str($ppalette) != 'None': | 72 #if str($ppalette) != 'None': |
53 --p-palette=$ppalette | 73 --p-palette=$ppalette |
54 #end if | 74 #end if |
55 | 75 |
56 #if str($pmissingsamples) != 'None': | 76 #if str($pmissingsamples) != 'None': |
57 --p-missing-samples=$pmissingsamples | 77 --p-missing-samples=$pmissingsamples |
58 #end if | 78 #end if |
59 | 79 |
60 | 80 --o-sample-estimator=osampleestimator |
61 #if $metadatafile: | 81 |
62 --m-metadata-file=$metadatafile | 82 --o-feature-importance=ofeatureimportance |
63 #end if | 83 |
64 | 84 --o-predictions=opredictions |
65 | 85 |
86 --o-model-summary=omodelsummary | |
87 | |
88 --o-accuracy-results=oaccuracyresults | |
66 | 89 |
67 --o-probabilities=oprobabilities | 90 --o-probabilities=oprobabilities |
68 --o-sample-estimator=osampleestimator | 91 |
69 --o-feature-importance=ofeatureimportance | 92 --o-heatmap=oheatmap |
70 --o-predictions=opredictions | 93 |
71 --o-model-summary=omodelsummary | 94 #if str($examples) != 'None': |
72 --o-accuracy-results=oaccuracyresults | 95 --examples=$examples |
96 #end if | |
97 | |
73 ; | 98 ; |
74 cp oprobabilities.qza $oprobabilities; | 99 cp oprobabilities.qza $oprobabilities |
75 cp osampleestimator.qza $osampleestimator; | 100 |
76 cp ofeatureimportance.qza $ofeatureimportance; | 101 ; |
77 cp opredictions.qza $opredictions; | 102 qiime tools export oheatmap.qzv --output-path out |
78 qiime tools export --input-path omodelsummary.qzv --output-path out && mkdir -p '$omodelsummary.files_path' | 103 && mkdir -p '$oheatmap.files_path' |
79 && cp -r out/* '$omodelsummary.files_path' | 104 && cp -r out/* '$oheatmap.files_path' |
80 && mv '$omodelsummary.files_path/index.html' '$omodelsummary'; | 105 && mv '$oheatmap.files_path/index.html' '$oheatmap' |
81 qiime tools export --input-path oaccuracyresults.qzv --output-path out && mkdir -p '$oaccuracyresults.files_path' | 106 |
82 && cp -r out/* '$oaccuracyresults.files_path' | 107 ]]></command> |
83 && mv '$oaccuracyresults.files_path/index.html' '$oaccuracyresults' | 108 <inputs> |
84 ]]></command> | 109 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] Feature table containing all features that should be used for target prediction. [required]" name="itable" optional="False" type="data" /> |
85 <inputs> | 110 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file"> |
86 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] Feature table containing all features that should be used for target prediction. [required]" name="itable" optional="False" type="data"/> | 111 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" /> |
87 <param label="--m-metadata-column: COLUMN MetadataColumn[Categorical] Categorical metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/> | 112 </repeat> |
88 <param label="--p-test-size: PROPORTION Range(0.0, 1.0, inclusive_start=False) Fraction of input samples to exclude from training set and use for classifier testing. [default: 0.2]" name="ptestsize" optional="True" type="float" value="0.2" min="0" max="1" exclusive_start="True"/> | 113 <param label="--m-metadata-column: COLUMN MetadataColumn[Categorical] Categorical metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text" /> |
89 <param label="--p-step: PROPORTION Range(0.0, 1.0, inclusive_start=False) If optimize-feature-selection is True, step is the percentage of features to remove at each iteration. [default: 0.05]" name="pstep" optional="True" type="float" value="0.05" min="0" max="1" exclusive_start="True"/> | 114 <param exclude_min="True" label="--p-test-size: PROPORTION Range(0.0, 1.0, inclusive_start=False) Fraction of input samples to exclude from training set and use for classifier testing. [default: 0.2]" max="1.0" min="0.0" name="ptestsize" optional="True" type="float" value="0.2" /> |
90 <param label="--p-cv: INTEGER Number of k-fold cross-validations to perform. Range(1, None) [default: 5]" name="pcv" optional="True" type="integer" value="5" min="1"/> | 115 <param exclude_min="True" label="--p-step: PROPORTION Range(0.0, 1.0, inclusive_start=False) If optimize-feature-selection is True, step is the percentage of features to remove at each iteration. [default: 0.05]" max="1.0" min="0.0" name="pstep" optional="True" type="float" value="0.05" /> |
91 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/> | 116 <param label="--p-cv: INTEGER Number of k-fold cross-validations to perform. Range(1, None) [default: 5]" min="1" name="pcv" optional="True" type="integer" value="5" /> |
92 <param label="--p-n-estimators: INTEGER Range(1, None) Number of trees to grow for estimation. More trees will improve predictive accuracy up to a threshold level, but will also increase time and memory requirements. This parameter only affects ensemble estimators, such as Random Forest, AdaBoost, ExtraTrees, and GradientBoosting. [default: 100]" name="pnestimators" optional="True" type="integer" value="100" min="1"/> | 117 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="False" type="text" /> |
93 <param label="--p-estimator: " name="pestimator" optional="True" type="select"> | 118 <param label="--p-n-estimators: INTEGER Range(1, None) Number of trees to grow for estimation. More trees will improve predictive accuracy up to a threshold level, but will also increase time and memory requirements. This parameter only affects ensemble estimators, such as Random Forest, AdaBoost, ExtraTrees, and GradientBoosting. [default: 100]" min="1" name="pnestimators" optional="True" type="integer" value="100" /> |
94 <option selected="True" value="None">Selection is Optional</option> | 119 <param label="--p-estimator: " name="pestimator" optional="True" type="select"> |
95 <option value="RandomForestClassifier">RandomForestClassifier</option> | 120 <option selected="True" value="None">Selection is Optional</option> |
96 <option value="ExtraTreesClassifier">ExtraTreesClassifier</option> | 121 <option value="RandomForestClassifier">RandomForestClassifier</option> |
97 <option value="GradientBoostingClassifier">GradientBoostingClassifier</option> | 122 <option value="ExtraTreesClassifier">ExtraTreesClassifier</option> |
98 <option value="AdaBoostClassifier">AdaBoostClassifier</option> | 123 <option value="GradientBoostingClassifier">GradientBoostingClassifier</option> |
99 <option value="KNeighborsClassifier">KNeighborsClassifier</option> | 124 <option value="AdaBoostClassifier">AdaBoostClassifier</option> |
100 <option value="LinearSVC">LinearSVC</option> | 125 <option value="KNeighborsClassifier">KNeighborsClassifier</option> |
101 <option value="SVC">SVC</option> | 126 <option value="LinearSVC">LinearSVC</option> |
102 </param> | 127 <option value="SVC">SVC</option> |
103 <param label="--p-optimize-feature-selection: --p-no-optimize-feature-selection Automatically optimize input feature selection using recursive feature elimination. [default: False]" name="poptimizefeatureselection" selected="False" type="boolean"/> | 128 </param> |
104 <param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean"/> | 129 <param label="--p-optimize-feature-selection: --p-optimize-feature-selection: / --p-no-optimize-feature-selection Automatically optimize input feature selection using recursive feature elimination. [default: False]" name="poptimizefeatureselection" selected="False" type="boolean" /> |
105 <param label="--p-palette: " name="ppalette" optional="True" type="select"> | 130 <param label="--p-parameter-tuning: --p-parameter-tuning: / --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean" /> |
106 <option selected="True" value="None">Selection is Optional</option> | 131 <param label="--p-palette: " name="ppalette" optional="True" type="select"> |
107 <option value="YellowOrangeBrown">YellowOrangeBrown</option> | 132 <option selected="True" value="None">Selection is Optional</option> |
108 <option value="YellowOrangeRed">YellowOrangeRed</option> | 133 <option value="YellowOrangeBrown">YellowOrangeBrown</option> |
109 <option value="OrangeRed">OrangeRed</option> | 134 <option value="YellowOrangeRed">YellowOrangeRed</option> |
110 <option value="PurpleRed">PurpleRed</option> | 135 <option value="OrangeRed">OrangeRed</option> |
111 <option value="RedPurple">RedPurple</option> | 136 <option value="PurpleRed">PurpleRed</option> |
112 <option value="BluePurple">BluePurple</option> | 137 <option value="RedPurple">RedPurple</option> |
113 <option value="GreenBlue">GreenBlue</option> | 138 <option value="BluePurple">BluePurple</option> |
114 <option value="PurpleBlue">PurpleBlue</option> | 139 <option value="GreenBlue">GreenBlue</option> |
115 <option value="YellowGreen">YellowGreen</option> | 140 <option value="PurpleBlue">PurpleBlue</option> |
116 <option value="summer">summer</option> | 141 <option value="YellowGreen">YellowGreen</option> |
117 <option value="copper">copper</option> | 142 <option value="summer">summer</option> |
118 <option value="viridis">viridis</option> | 143 <option value="copper">copper</option> |
119 <option value="plasma">plasma</option> | 144 <option value="viridis">viridis</option> |
120 <option value="inferno">inferno</option> | 145 <option value="cividis">cividis</option> |
121 <option value="magma">magma</option> | 146 <option value="plasma">plasma</option> |
122 <option value="sirocco">sirocco</option> | 147 <option value="inferno">inferno</option> |
123 <option value="drifting">drifting</option> | 148 <option value="magma">magma</option> |
124 <option value="melancholy">melancholy</option> | 149 <option value="sirocco">sirocco</option> |
125 <option value="enigma">enigma</option> | 150 <option value="drifting">drifting</option> |
126 <option value="eros">eros</option> | 151 <option value="melancholy">melancholy</option> |
127 <option value="spectre">spectre</option> | 152 <option value="enigma">enigma</option> |
128 <option value="ambition">ambition</option> | 153 <option value="eros">eros</option> |
129 <option value="mysteriousstains">mysteriousstains</option> | 154 <option value="spectre">spectre</option> |
130 <option value="daydream">daydream</option> | 155 <option value="ambition">ambition</option> |
131 <option value="solano">solano</option> | 156 <option value="mysteriousstains">mysteriousstains</option> |
132 <option value="navarro">navarro</option> | 157 <option value="daydream">daydream</option> |
133 <option value="dandelions">dandelions</option> | 158 <option value="solano">solano</option> |
134 <option value="deepblue">deepblue</option> | 159 <option value="navarro">navarro</option> |
135 <option value="verve">verve</option> | 160 <option value="dandelions">dandelions</option> |
136 <option value="greyscale">greyscale</option> | 161 <option value="deepblue">deepblue</option> |
137 </param> | 162 <option value="verve">verve</option> |
138 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select"> | 163 <option value="greyscale">greyscale</option> |
139 <option selected="True" value="None">Selection is Optional</option> | 164 </param> |
140 <option value="error">error</option> | 165 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select"> |
141 <option value="ignore">ignore</option> | 166 <option selected="True" value="None">Selection is Optional</option> |
142 </param> | 167 <option value="error">error</option> |
143 | 168 <option value="ignore">ignore</option> |
144 <param label="--m-metadata-file METADATA" name="metadatafile" type="data" format="tabular,qza,no_unzip.zip" /> | 169 </param> |
145 | 170 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" /> |
146 </inputs> | 171 |
147 <outputs> | 172 </inputs> |
148 <data format="qza" label="${tool.name} on ${on_string}: probabilities.qza" name="oprobabilities"/> | 173 |
149 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/> | 174 <outputs> |
150 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/> | 175 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator" /> |
151 <data format="qza" label="${tool.name} on ${on_string}: predictions.qza" name="opredictions"/> | 176 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance" /> |
152 <data format="html" label="${tool.name} on ${on_string}: modelsummary.qzv" name="omodelsummary"/> | 177 <data format="qza" label="${tool.name} on ${on_string}: predictions.qza" name="opredictions" /> |
153 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.qzv" name="oaccuracyresults"/> | 178 <data format="html" label="${tool.name} on ${on_string}: modelsummary.html" name="omodelsummary" /> |
154 </outputs> | 179 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.html" name="oaccuracyresults" /> |
155 <help><![CDATA[ | 180 <data format="qza" label="${tool.name} on ${on_string}: probabilities.qza" name="oprobabilities" /> |
181 <data format="html" label="${tool.name} on ${on_string}: heatmap.html" name="oheatmap" /> | |
182 | |
183 </outputs> | |
184 | |
185 <help><![CDATA[ | |
156 Train and test a cross-validated supervised learning classifier. | 186 Train and test a cross-validated supervised learning classifier. |
157 ################################################################ | 187 ############################################################### |
158 | 188 |
159 Predicts a categorical sample metadata column using a supervised learning | 189 Predicts a categorical sample metadata column using a supervised learning |
160 classifier. Splits input data into training and test sets. The training set | 190 classifier. Splits input data into training and test sets. The training set |
161 is used to train and test the estimator using a stratified k-fold cross- | 191 is used to train and test the estimator using a stratified k-fold cross- |
162 validation scheme. This includes optional steps for automated feature | 192 validation scheme. This includes optional steps for automated feature |
180 features to remove at each iteration. | 210 features to remove at each iteration. |
181 cv : Int % Range(1, None), optional | 211 cv : Int % Range(1, None), optional |
182 Number of k-fold cross-validations to perform. | 212 Number of k-fold cross-validations to perform. |
183 random_state : Int, optional | 213 random_state : Int, optional |
184 Seed used by random number generator. | 214 Seed used by random number generator. |
215 n_jobs : Int, optional | |
216 Number of jobs to run in parallel. | |
185 n_estimators : Int % Range(1, None), optional | 217 n_estimators : Int % Range(1, None), optional |
186 Number of trees to grow for estimation. More trees will improve | 218 Number of trees to grow for estimation. More trees will improve |
187 predictive accuracy up to a threshold level, but will also increase | 219 predictive accuracy up to a threshold level, but will also increase |
188 time and memory requirements. This parameter only affects ensemble | 220 time and memory requirements. This parameter only affects ensemble |
189 estimators, such as Random Forest, AdaBoost, ExtraTrees, and | 221 estimators, such as Random Forest, AdaBoost, ExtraTrees, and |
193 optimize_feature_selection : Bool, optional | 225 optimize_feature_selection : Bool, optional |
194 Automatically optimize input feature selection using recursive feature | 226 Automatically optimize input feature selection using recursive feature |
195 elimination. | 227 elimination. |
196 parameter_tuning : Bool, optional | 228 parameter_tuning : Bool, optional |
197 Automatically tune hyperparameters using random grid search. | 229 Automatically tune hyperparameters using random grid search. |
198 palette : Str % Choices('YellowOrangeBrown', 'YellowOrangeRed', 'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue', 'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy', 'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream', 'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale'), optional | 230 palette : Str % Choices('YellowOrangeBrown', 'YellowOrangeRed', 'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue', 'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'cividis', 'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy', 'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream', 'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale'), optional |
199 The color palette to use for plotting. | 231 The color palette to use for plotting. |
200 missing_samples : Str % Choices('error', 'ignore'), optional | 232 missing_samples : Str % Choices('error', 'ignore'), optional |
201 How to handle missing samples in metadata. "error" will fail if missing | 233 How to handle missing samples in metadata. "error" will fail if missing |
202 samples are detected. "ignore" will cause the feature table and | 234 samples are detected. "ignore" will cause the feature table and |
203 metadata to be filtered, so that only samples found in both files are | 235 metadata to be filtered, so that only samples found in both files are |
216 the trained estimator. | 248 the trained estimator. |
217 accuracy_results : Visualization | 249 accuracy_results : Visualization |
218 Accuracy results visualization. | 250 Accuracy results visualization. |
219 probabilities : SampleData[Probabilities] | 251 probabilities : SampleData[Probabilities] |
220 Predicted class probabilities for each input sample. | 252 Predicted class probabilities for each input sample. |
221 ]]></help> | 253 heatmap : Visualization |
222 <macros> | 254 A heatmap of the top 50 most important features from the table. |
255 ]]></help> | |
256 <macros> | |
223 <import>qiime_citation.xml</import> | 257 <import>qiime_citation.xml</import> |
224 </macros> | 258 </macros> |
225 <expand macro="qiime_citation"/> | 259 <expand macro="qiime_citation"/> |
226 </tool> | 260 </tool> |