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