comparison qiime2/qiime_sample-classifier_fit-classifier.xml @ 0:370e0b6e9826 draft

Uploaded
author florianbegusch
date Wed, 17 Jul 2019 03:05:17 -0400
parents
children a025a4a89e07
comparison
equal deleted inserted replaced
-1:000000000000 0:370e0b6e9826
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
13 #if $pstep:
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
53 #if $input_files_mmetadatafile:
54 #def list_dict_to_string(list_dict):
55 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
56 #for d in list_dict[1:]:
57 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
58 #end for
59 #return $file_list
60 #end def
61 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
62 #end if
63
64
65 --o-sample-estimator=osampleestimator
66 --o-feature-importance=ofeatureimportance
67 ;
68 cp osampleestimator.qza $osampleestimator;
69 cp ofeatureimportance.qza $ofeatureimportance
70 ]]></command>
71 <inputs>
72 <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"/>
73 <param label="--m-metadata-column: COLUMN MetadataColumn[Categorical] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/>
74 <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"/>
75 <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"/>
76 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/>
77 <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"/>
78 <param label="--p-estimator: " name="pestimator" optional="True" type="select">
79 <option selected="True" value="None">Selection is Optional</option>
80 <option value="RandomForestClassifier">RandomForestClassifier</option>
81 <option value="ExtraTreesClassifier">ExtraTreesClassifier</option>
82 <option value="GradientBoostingClassifier">GradientBoostingClassifier</option>
83 <option value="AdaBoostClassifier">AdaBoostClassifier</option>
84 <option value="KNeighborsClassifier">KNeighborsClassifier</option>
85 <option value="LinearSVC">LinearSVC</option>
86 <option value="SVC">SVC</option>
87 </param>
88 <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"/>
89 <param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean"/>
90 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
91 <option selected="True" value="None">Selection is Optional</option>
92 <option value="error">error</option>
93 <option value="ignore">ignore</option>
94 </param>
95
96 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
97 <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" />
98 </repeat>
99
100 </inputs>
101 <outputs>
102 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/>
103 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/>
104 </outputs>
105 <help><![CDATA[
106 Fit a supervised learning classifier.
107 #####################################
108
109 Fit a supervised learning classifier. Outputs the fit estimator (for
110 prediction of test samples and/or unknown samples) and the relative
111 importance of each feature for model accuracy. Optionally use k-fold cross-
112 validation for automatic recursive feature elimination and hyperparameter
113 tuning.
114
115 Parameters
116 ----------
117 table : FeatureTable[Frequency]
118 Feature table containing all features that should be used for target
119 prediction.
120 metadata : MetadataColumn[Categorical]
121 Numeric metadata column to use as prediction target.
122 step : Float % Range(0.0, 1.0, inclusive_start=False), optional
123 If optimize_feature_selection is True, step is the percentage of
124 features to remove at each iteration.
125 cv : Int % Range(1, None), optional
126 Number of k-fold cross-validations to perform.
127 random_state : Int, optional
128 Seed used by random number generator.
129 n_estimators : Int % Range(1, None), optional
130 Number of trees to grow for estimation. More trees will improve
131 predictive accuracy up to a threshold level, but will also increase
132 time and memory requirements. This parameter only affects ensemble
133 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
134 GradientBoosting.
135 estimator : Str % Choices('RandomForestClassifier', 'ExtraTreesClassifier', 'GradientBoostingClassifier', 'AdaBoostClassifier', 'KNeighborsClassifier', 'LinearSVC', 'SVC'), optional
136 Estimator method to use for sample prediction.
137 optimize_feature_selection : Bool, optional
138 Automatically optimize input feature selection using recursive feature
139 elimination.
140 parameter_tuning : Bool, optional
141 Automatically tune hyperparameters using random grid search.
142 missing_samples : Str % Choices('error', 'ignore'), optional
143 How to handle missing samples in metadata. "error" will fail if missing
144 samples are detected. "ignore" will cause the feature table and
145 metadata to be filtered, so that only samples found in both files are
146 retained.
147
148 Returns
149 -------
150 sample_estimator : SampleEstimator[Classifier]
151 Trained sample classifier.
152 feature_importance : FeatureData[Importance]
153 Importance of each input feature to model accuracy.
154 ]]></help>
155 <macros>
156 <import>qiime_citation.xml</import>
157 </macros>
158 <expand macro="qiime_citation"/>
159 </tool>