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