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