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