0
|
1 <?xml version="1.0" ?>
|
|
2 <tool id="qiime_sample-classifier_regress-samples" name="qiime sample-classifier regress-samples" version="2019.4">
|
|
3 <description> - Train and test a cross-validated supervised learning regressor.</description>
|
|
4 <requirements>
|
|
5 <requirement type="package" version="2019.4">qiime2</requirement>
|
|
6 </requirements>
|
|
7 <command><![CDATA[
|
|
8 qiime sample-classifier regress-samples
|
|
9
|
|
10 --i-table=$itable
|
|
11 --m-metadata-column="$mmetadatacolumn"
|
|
12
|
5
|
13 #if str($ptestsize):
|
0
|
14 --p-test-size=$ptestsize
|
|
15 #end if
|
|
16
|
5
|
17 #if str($pstep):
|
0
|
18 --p-step=$pstep
|
|
19 #end if
|
|
20
|
6
|
21 #if str($pcv):
|
0
|
22 --p-cv=$pcv
|
|
23 #end if
|
|
24
|
|
25 #if str($prandomstate):
|
|
26 --p-random-state="$prandomstate"
|
|
27 #end if
|
|
28
|
|
29 #set $pnjobs = '${GALAXY_SLOTS:-4}'
|
|
30
|
|
31 #if str($pnjobs):
|
|
32 --p-n-jobs="$pnjobs"
|
|
33 #end if
|
|
34
|
|
35
|
5
|
36 #if str($pnestimators):
|
0
|
37 --p-n-estimators=$pnestimators
|
|
38 #end if
|
|
39
|
|
40 #if str($pestimator) != 'None':
|
|
41 --p-estimator=$pestimator
|
|
42 #end if
|
|
43
|
|
44 #if $poptimizefeatureselection:
|
|
45 --p-optimize-feature-selection
|
|
46 #end if
|
|
47
|
|
48 #if $pstratify:
|
|
49 --p-stratify
|
|
50 #end if
|
|
51
|
|
52 #if $pparametertuning:
|
|
53 --p-parameter-tuning
|
|
54 #end if
|
|
55
|
|
56 #if str($pmissingsamples) != 'None':
|
|
57 --p-missing-samples=$pmissingsamples
|
|
58 #end if
|
|
59
|
|
60
|
5
|
61
|
|
62
|
|
63 #if $metadatafile:
|
|
64 --m-metadata-file=$metadatafile
|
0
|
65 #end if
|
|
66
|
|
67
|
5
|
68
|
|
69
|
0
|
70 --o-sample-estimator=osampleestimator
|
|
71 --o-feature-importance=ofeatureimportance
|
|
72 --o-predictions=opredictions
|
|
73 --o-model-summary=omodelsummary
|
|
74 --o-accuracy-results=oaccuracyresults
|
|
75 ;
|
|
76 cp osampleestimator.qza $osampleestimator;
|
|
77 cp ofeatureimportance.qza $ofeatureimportance;
|
|
78 cp opredictions.qza $opredictions;
|
|
79 qiime tools export --input-path omodelsummary.qzv --output-path out && mkdir -p '$omodelsummary.files_path'
|
|
80 && cp -r out/* '$omodelsummary.files_path'
|
|
81 && mv '$omodelsummary.files_path/index.html' '$omodelsummary';
|
|
82 qiime tools export --input-path oaccuracyresults.qzv --output-path out && mkdir -p '$oaccuracyresults.files_path'
|
|
83 && cp -r out/* '$oaccuracyresults.files_path'
|
|
84 && mv '$oaccuracyresults.files_path/index.html' '$oaccuracyresults'
|
|
85 ]]></command>
|
|
86 <inputs>
|
|
87 <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"/>
|
|
88 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/>
|
5
|
89 <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" />
|
|
90 <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" />
|
|
91 <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"/>
|
0
|
92 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/>
|
|
93 <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"/>
|
|
94 <param label="--p-estimator: " name="pestimator" optional="True" type="select">
|
|
95 <option selected="True" value="None">Selection is Optional</option>
|
|
96 <option value="RandomForestRegressor">RandomForestRegressor</option>
|
|
97 <option value="ExtraTreesRegressor">ExtraTreesRegressor</option>
|
|
98 <option value="GradientBoostingRegressor">GradientBoostingRegressor</option>
|
|
99 <option value="AdaBoostRegressor">AdaBoostRegressor</option>
|
|
100 <option value="ElasticNet">ElasticNet</option>
|
|
101 <option value="Ridge">Ridge</option>
|
|
102 <option value="Lasso">Lasso</option>
|
|
103 <option value="KNeighborsRegressor">KNeighborsRegressor</option>
|
|
104 <option value="LinearSVR">LinearSVR</option>
|
|
105 <option value="SVR">SVR</option>
|
|
106 </param>
|
|
107 <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"/>
|
|
108 <param label="--p-stratify: --p-no-stratify Evenly stratify training and test data among metadata categories. If True, all values in column must match at least two samples. [default: False]" name="pstratify" selected="False" type="boolean"/>
|
|
109 <param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean"/>
|
|
110 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
|
|
111 <option selected="True" value="None">Selection is Optional</option>
|
|
112 <option value="error">error</option>
|
|
113 <option value="ignore">ignore</option>
|
|
114 </param>
|
|
115
|
5
|
116
|
|
117 <param label="--m-metadata-file METADATA" name="metadatafile" type="data" format="tabular,qza,no_unzip.zip" />
|
|
118
|
0
|
119
|
|
120 </inputs>
|
|
121 <outputs>
|
|
122 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/>
|
|
123 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/>
|
|
124 <data format="qza" label="${tool.name} on ${on_string}: predictions.qza" name="opredictions"/>
|
|
125 <data format="html" label="${tool.name} on ${on_string}: modelsummary.qzv" name="omodelsummary"/>
|
|
126 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.qzv" name="oaccuracyresults"/>
|
|
127 </outputs>
|
|
128 <help><![CDATA[
|
|
129 Train and test a cross-validated supervised learning regressor.
|
|
130 ###############################################################
|
|
131
|
|
132 Predicts a continuous sample metadata column using a supervised learning
|
|
133 regressor. Splits input data into training and test sets. The training set
|
|
134 is used to train and test the estimator using a stratified k-fold cross-
|
|
135 validation scheme. This includes optional steps for automated feature
|
|
136 extraction and hyperparameter optimization. The test set validates
|
|
137 classification accuracy of the optimized estimator. Outputs classification
|
|
138 results for test set. For more details on the learning algorithm, see
|
|
139 http://scikit-learn.org/stable/supervised_learning.html
|
|
140
|
|
141 Parameters
|
|
142 ----------
|
|
143 table : FeatureTable[Frequency]
|
|
144 Feature table containing all features that should be used for target
|
|
145 prediction.
|
|
146 metadata : MetadataColumn[Numeric]
|
|
147 Numeric metadata column to use as prediction target.
|
|
148 test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
|
|
149 Fraction of input samples to exclude from training set and use for
|
|
150 classifier testing.
|
|
151 step : Float % Range(0.0, 1.0, inclusive_start=False), optional
|
|
152 If optimize_feature_selection is True, step is the percentage of
|
|
153 features to remove at each iteration.
|
|
154 cv : Int % Range(1, None), optional
|
|
155 Number of k-fold cross-validations to perform.
|
|
156 random_state : Int, optional
|
|
157 Seed used by random number generator.
|
|
158 n_estimators : Int % Range(1, None), optional
|
|
159 Number of trees to grow for estimation. More trees will improve
|
|
160 predictive accuracy up to a threshold level, but will also increase
|
|
161 time and memory requirements. This parameter only affects ensemble
|
|
162 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
|
|
163 GradientBoosting.
|
|
164 estimator : Str % Choices('RandomForestRegressor', 'ExtraTreesRegressor', 'GradientBoostingRegressor', 'AdaBoostRegressor', 'ElasticNet', 'Ridge', 'Lasso', 'KNeighborsRegressor', 'LinearSVR', 'SVR'), optional
|
|
165 Estimator method to use for sample prediction.
|
|
166 optimize_feature_selection : Bool, optional
|
|
167 Automatically optimize input feature selection using recursive feature
|
|
168 elimination.
|
|
169 stratify : Bool, optional
|
|
170 Evenly stratify training and test data among metadata categories. If
|
|
171 True, all values in column must match at least two samples.
|
|
172 parameter_tuning : Bool, optional
|
|
173 Automatically tune hyperparameters using random grid search.
|
|
174 missing_samples : Str % Choices('error', 'ignore'), optional
|
|
175 How to handle missing samples in metadata. "error" will fail if missing
|
|
176 samples are detected. "ignore" will cause the feature table and
|
|
177 metadata to be filtered, so that only samples found in both files are
|
|
178 retained.
|
|
179
|
|
180 Returns
|
|
181 -------
|
|
182 sample_estimator : SampleEstimator[Regressor]
|
|
183 Trained sample estimator.
|
|
184 feature_importance : FeatureData[Importance]
|
|
185 Importance of each input feature to model accuracy.
|
|
186 predictions : SampleData[RegressorPredictions]
|
|
187 Predicted target values for each input sample.
|
|
188 model_summary : Visualization
|
|
189 Summarized parameter and (if enabled) feature selection information for
|
|
190 the trained estimator.
|
|
191 accuracy_results : Visualization
|
|
192 Accuracy results visualization.
|
|
193 ]]></help>
|
|
194 <macros>
|
|
195 <import>qiime_citation.xml</import>
|
|
196 </macros>
|
|
197 <expand macro="qiime_citation"/>
|
|
198 </tool>
|