comparison qiime2/qiime_sample-classifier_classify-samples-ncv.xml @ 0:370e0b6e9826 draft

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