annotate qiime2/qiime_sample-classifier_fit-regressor.xml @ 0:370e0b6e9826 draft

Uploaded
author florianbegusch
date Wed, 17 Jul 2019 03:05:17 -0400
parents
children a025a4a89e07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
1 <?xml version="1.0" ?>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
2 <tool id="qiime_sample-classifier_fit-regressor" name="qiime sample-classifier fit-regressor" version="2019.4">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
3 <description> - Fit a supervised learning regressor.</description>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
4 <requirements>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
5 <requirement type="package" version="2019.4">qiime2</requirement>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
6 </requirements>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
7 <command><![CDATA[
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
8 qiime sample-classifier fit-regressor
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
9
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
10 --i-table=$itable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
11 --m-metadata-column="$mmetadatacolumn"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
12
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
13 #if $pstep:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
14 --p-step=$pstep
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
15 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
16
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
17 #if $pcv:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
18 --p-cv=$pcv
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
19 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
20
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
21 #if str($prandomstate):
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
22 --p-random-state="$prandomstate"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
23 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
24
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
25 #set $pnjobs = '${GALAXY_SLOTS:-4}'
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
26 #if str($pnjobs):
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
27 --p-n-jobs="$pnjobs"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
28 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
29
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
30
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
31 #if $pnestimators:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
32 --p-n-estimators=$pnestimators
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
33 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
34
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
35 #if str($pestimator) != 'None':
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
36 --p-estimator=$pestimator
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
37 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
38
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
39 #if $poptimizefeatureselection:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
40 --p-optimize-feature-selection
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
41 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
42
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
43 #if $pparametertuning:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
44 --p-parameter-tuning
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
45 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
46
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
47 #if str($pmissingsamples) != 'None':
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
48 --p-missing-samples=$pmissingsamples
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
49 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
50
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
51
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
52 #if $input_files_mmetadatafile:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
53 #def list_dict_to_string(list_dict):
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
54 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
55 #for d in list_dict[1:]:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
56 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
57 #end for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
58 #return $file_list
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
59 #end def
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
60 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
61 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
62
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
63
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
64 --o-sample-estimator=osampleestimator
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
65 --o-feature-importance=ofeatureimportance
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
66 ;
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
67 cp osampleestimator.qza $osampleestimator;
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
68 cp ofeatureimportance.qza $ofeatureimportance
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
69 ]]></command>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
70 <inputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
71 <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"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
72 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
73 <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"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
74 <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"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
75 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
76 <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"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
77 <param label="--p-estimator: " name="pestimator" optional="True" type="select">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
78 <option selected="True" value="None">Selection is Optional</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
79 <option value="RandomForestRegressor">RandomForestRegressor</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
80 <option value="ExtraTreesRegressor">ExtraTreesRegressor</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
81 <option value="GradientBoostingRegressor">GradientBoostingRegressor</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
82 <option value="AdaBoostRegressor">AdaBoostRegressor</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
83 <option value="ElasticNet">ElasticNet</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
84 <option value="Ridge">Ridge</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
85 <option value="Lasso">Lasso</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
86 <option value="KNeighborsRegressor">KNeighborsRegressor</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
87 <option value="LinearSVR">LinearSVR</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
88 <option value="SVR">SVR</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
89 </param>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
90 <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"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
91 <param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
92 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
93 <option selected="True" value="None">Selection is Optional</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
94 <option value="error">error</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
95 <option value="ignore">ignore</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
96 </param>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
97
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
98 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
99 <param label="--m-metadata-file: Metadata file or artifact viewable as metadata. This option may be supplied multiple times to merge metadata. [optional]" name="additional_input" type="data" format="tabular,qza,no_unzip.zip" />
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
100 </repeat>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
101
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
102 </inputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
103 <outputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
104 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
105 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
106 </outputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
107 <help><![CDATA[
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
108 Fit a supervised learning regressor.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
109 ####################################
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
110
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
111 Fit a supervised learning regressor. Outputs the fit estimator (for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
112 prediction of test samples and/or unknown samples) and the relative
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
113 importance of each feature for model accuracy. Optionally use k-fold cross-
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
114 validation for automatic recursive feature elimination and hyperparameter
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
115 tuning.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
116
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
117 Parameters
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
118 ----------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
119 table : FeatureTable[Frequency]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
120 Feature table containing all features that should be used for target
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
121 prediction.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
122 metadata : MetadataColumn[Numeric]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
123 Numeric metadata column to use as prediction target.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
124 step : Float % Range(0.0, 1.0, inclusive_start=False), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
125 If optimize_feature_selection is True, step is the percentage of
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
126 features to remove at each iteration.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
127 cv : Int % Range(1, None), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
128 Number of k-fold cross-validations to perform.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
129 random_state : Int, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
130 Seed used by random number generator.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
131 n_estimators : Int % Range(1, None), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
132 Number of trees to grow for estimation. More trees will improve
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
133 predictive accuracy up to a threshold level, but will also increase
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
134 time and memory requirements. This parameter only affects ensemble
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
135 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
136 GradientBoosting.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
137 estimator : Str % Choices('RandomForestRegressor', 'ExtraTreesRegressor', 'GradientBoostingRegressor', 'AdaBoostRegressor', 'ElasticNet', 'Ridge', 'Lasso', 'KNeighborsRegressor', 'LinearSVR', 'SVR'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
138 Estimator method to use for sample prediction.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
139 optimize_feature_selection : Bool, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
140 Automatically optimize input feature selection using recursive feature
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
141 elimination.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
142 parameter_tuning : Bool, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
143 Automatically tune hyperparameters using random grid search.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
144 missing_samples : Str % Choices('error', 'ignore'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
145 How to handle missing samples in metadata. "error" will fail if missing
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
146 samples are detected. "ignore" will cause the feature table and
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
147 metadata to be filtered, so that only samples found in both files are
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
148 retained.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
149
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
150 Returns
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
151 -------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
152 sample_estimator : SampleEstimator[Regressor]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
153 \
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
154 feature_importance : FeatureData[Importance]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
155 Importance of each input feature to model accuracy.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
156 ]]></help>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
157 <macros>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
158 <import>qiime_citation.xml</import>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
159 </macros>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
160 <expand macro="qiime_citation"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
161 </tool>