comparison qiime2/qiime_sample-classifier_fit-regressor.xml @ 14:a0a8d77a991c draft

Uploaded
author florianbegusch
date Thu, 03 Sep 2020 09:51:29 +0000
parents f190567fe3f6
children
comparison
equal deleted inserted replaced
13:887cd4ad8e16 14:a0a8d77a991c
1 <?xml version="1.0" ?> 1 <?xml version="1.0" ?>
2 <tool id="qiime_sample-classifier_fit-regressor" name="qiime sample-classifier fit-regressor" version="2019.7"> 2 <tool id="qiime_sample-classifier_fit-regressor" name="qiime sample-classifier fit-regressor"
3 <description> - Fit a supervised learning regressor.</description> 3 version="2020.8">
4 <requirements> 4 <description>Fit a supervised learning regressor.</description>
5 <requirement type="package" version="2019.7">qiime2</requirement> 5 <requirements>
6 </requirements> 6 <requirement type="package" version="2020.8">qiime2</requirement>
7 <command><![CDATA[ 7 </requirements>
8 <command><![CDATA[
8 qiime sample-classifier fit-regressor 9 qiime sample-classifier fit-regressor
9 10
10 --i-table=$itable 11 --i-table=$itable
11 --m-metadata-column="$mmetadatacolumn" 12 # if $input_files_mmetadatafile:
13 # def list_dict_to_string(list_dict):
14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
15 # for d in list_dict[1:]:
16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
17 # end for
18 # return $file_list
19 # end def
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
21 # end if
12 22
13 #if str($pstep): 23 #if '__ob__' in str($mmetadatacolumn):
14 --p-step=$pstep 24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
25 #set $mmetadatacolumn = $mmetadatacolumn_temp
26 #end if
27 #if '__cb__' in str($mmetadatacolumn):
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
29 #set $mmetadatacolumn = $mmetadatacolumn_temp
30 #end if
31 #if 'X' in str($mmetadatacolumn):
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
33 #set $mmetadatacolumn = $mmetadatacolumn_temp
34 #end if
35 #if '__sq__' in str($mmetadatacolumn):
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
37 #set $mmetadatacolumn = $mmetadatacolumn_temp
38 #end if
39 #if '__db__' in str($mmetadatacolumn):
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
41 #set $mmetadatacolumn = $mmetadatacolumn_temp
15 #end if 42 #end if
16 43
17 #if str($pcv): 44 --m-metadata-column=$mmetadatacolumn
18 --p-cv=$pcv 45
19 #end if 46
47 --p-step=$pstep
48
49 --p-cv=$pcv
20 50
21 #if str($prandomstate): 51 #if str($prandomstate):
22 --p-random-state="$prandomstate" 52 --p-random-state=$prandomstate
23 #end if 53 #end if
54 --p-n-jobs=$pnjobs
24 55
25 #set $pnjobs = '${GALAXY_SLOTS:-4}' 56 --p-n-estimators=$pnestimators
26 #if str($pnjobs):
27 --p-n-jobs="$pnjobs"
28 #end if
29
30
31 #if str($pnestimators):
32 --p-n-estimators=$pnestimators
33 #end if
34 57
35 #if str($pestimator) != 'None': 58 #if str($pestimator) != 'None':
36 --p-estimator=$pestimator 59 --p-estimator=$pestimator
37 #end if 60 #end if
38 61
39 #if $poptimizefeatureselection: 62 #if $poptimizefeatureselection:
40 --p-optimize-feature-selection 63 --p-optimize-feature-selection
41 #end if 64 #end if
43 #if $pparametertuning: 66 #if $pparametertuning:
44 --p-parameter-tuning 67 --p-parameter-tuning
45 #end if 68 #end if
46 69
47 #if str($pmissingsamples) != 'None': 70 #if str($pmissingsamples) != 'None':
48 --p-missing-samples=$pmissingsamples 71 --p-missing-samples=$pmissingsamples
49 #end if 72 #end if
50 73
74 --o-sample-estimator=osampleestimator
51 75
76 --o-feature-importance=ofeatureimportance
52 77
53 78 #if str($examples) != 'None':
54 #if $metadatafile: 79 --examples=$examples
55 --m-metadata-file=$metadatafile
56 #end if 80 #end if
57 81
82 ;
83 cp ofeatureimportance.qza $ofeatureimportance
58 84
85 ]]></command>
86 <inputs>
87 <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" />
88 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
89 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
90 </repeat>
91 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text" />
92 <param exclude_min="True" 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]" max="1.0" min="0.0" name="pstep" optional="True" type="float" value="0.05" />
93 <param label="--p-cv: INTEGER Number of k-fold cross-validations to perform. Range(1, None) [default: 5]" min="1" name="pcv" optional="True" type="integer" value="5" />
94 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="False" type="text" />
95 <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]" min="1" name="pnestimators" optional="True" type="integer" value="100" />
96 <param label="--p-estimator: " name="pestimator" optional="True" type="select">
97 <option selected="True" value="None">Selection is Optional</option>
98 <option value="RandomForestRegressor">RandomForestRegressor</option>
99 <option value="ExtraTreesRegressor">ExtraTreesRegressor</option>
100 <option value="GradientBoostingRegressor">GradientBoostingRegressor</option>
101 <option value="AdaBoostRegressor">AdaBoostRegressor</option>
102 <option value="ElasticNet">ElasticNet</option>
103 <option value="Ridge">Ridge</option>
104 <option value="Lasso">Lasso</option>
105 <option value="KNeighborsRegressor">KNeighborsRegressor</option>
106 <option value="LinearSVR">LinearSVR</option>
107 <option value="SVR">SVR</option>
108 </param>
109 <param label="--p-optimize-feature-selection: --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" />
110 <param label="--p-parameter-tuning: --p-parameter-tuning: / --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean" />
111 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
112 <option selected="True" value="None">Selection is Optional</option>
113 <option value="error">error</option>
114 <option value="ignore">ignore</option>
115 </param>
116 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
117
118 </inputs>
59 119
60 --o-sample-estimator=osampleestimator 120 <outputs>
61 --o-feature-importance=ofeatureimportance 121 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator" />
62 ; 122 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance" />
63 cp osampleestimator.qza $osampleestimator; 123
64 cp ofeatureimportance.qza $ofeatureimportance 124 </outputs>
65 ]]></command>
66 <inputs>
67 <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"/>
68 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/>
69 <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"/>
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-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"/>
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 125
94 <param label="--m-metadata-file METADATA" name="metadatafile" type="data" format="tabular,qza,no_unzip.zip" /> 126 <help><![CDATA[
95
96 </inputs>
97 <outputs>
98 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/>
99 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/>
100 </outputs>
101 <help><![CDATA[
102 Fit a supervised learning regressor. 127 Fit a supervised learning regressor.
103 #################################### 128 ###############################################################
104 129
105 Fit a supervised learning regressor. Outputs the fit estimator (for 130 Fit a supervised learning regressor. Outputs the fit estimator (for
106 prediction of test samples and/or unknown samples) and the relative 131 prediction of test samples and/or unknown samples) and the relative
107 importance of each feature for model accuracy. Optionally use k-fold cross- 132 importance of each feature for model accuracy. Optionally use k-fold cross-
108 validation for automatic recursive feature elimination and hyperparameter 133 validation for automatic recursive feature elimination and hyperparameter
120 features to remove at each iteration. 145 features to remove at each iteration.
121 cv : Int % Range(1, None), optional 146 cv : Int % Range(1, None), optional
122 Number of k-fold cross-validations to perform. 147 Number of k-fold cross-validations to perform.
123 random_state : Int, optional 148 random_state : Int, optional
124 Seed used by random number generator. 149 Seed used by random number generator.
150 n_jobs : Int, optional
151 Number of jobs to run in parallel.
125 n_estimators : Int % Range(1, None), optional 152 n_estimators : Int % Range(1, None), optional
126 Number of trees to grow for estimation. More trees will improve 153 Number of trees to grow for estimation. More trees will improve
127 predictive accuracy up to a threshold level, but will also increase 154 predictive accuracy up to a threshold level, but will also increase
128 time and memory requirements. This parameter only affects ensemble 155 time and memory requirements. This parameter only affects ensemble
129 estimators, such as Random Forest, AdaBoost, ExtraTrees, and 156 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
142 retained. 169 retained.
143 170
144 Returns 171 Returns
145 ------- 172 -------
146 sample_estimator : SampleEstimator[Regressor] 173 sample_estimator : SampleEstimator[Regressor]
147 \
148 feature_importance : FeatureData[Importance] 174 feature_importance : FeatureData[Importance]
149 Importance of each input feature to model accuracy. 175 Importance of each input feature to model accuracy.
150 ]]></help> 176 ]]></help>
151 <macros> 177 <macros>
152 <import>qiime_citation.xml</import> 178 <import>qiime_citation.xml</import>
153 </macros> 179 </macros>
154 <expand macro="qiime_citation"/> 180 <expand macro="qiime_citation"/>
155 </tool> 181 </tool>