0
|
1 <?xml version="1.0" ?>
|
|
2 <tool id="qiime_sample-classifier_maturity-index" name="qiime sample-classifier maturity-index" version="2019.4">
|
|
3 <description> - Microbial maturity index prediction.</description>
|
|
4 <requirements>
|
|
5 <requirement type="package" version="2019.4">qiime2</requirement>
|
|
6 </requirements>
|
|
7 <command>
|
|
8 <![CDATA[
|
|
9 qiime sample-classifier maturity-index --i-table=$itable
|
|
10
|
2
|
11 #if $input_files_mmetadatafile:
|
0
|
12 #def list_dict_to_string(list_dict):
|
|
13 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
|
|
14 #for d in list_dict[1:]:
|
|
15 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
|
|
16 #end for
|
|
17 #return $file_list
|
|
18 #end def
|
|
19
|
2
|
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
|
|
21 #end fi
|
|
22
|
|
23
|
|
24 --p-group-by="$pgroupby" --p-column="$pcolumn" --p-control="$pcontrol"
|
0
|
25
|
|
26 #set $pnjobs = '${GALAXY_SLOTS:-4}'
|
|
27
|
|
28 #if str($pnjobs):
|
|
29 --p-n-jobs="$pnjobs"
|
|
30 #end if
|
|
31
|
|
32
|
|
33 #if $pparametertuning:
|
|
34 --p-parameter-tuning
|
|
35 #else
|
|
36 --p-no-parameter-tuning
|
|
37 #end if
|
|
38
|
|
39 #if $pstep:
|
|
40 --p-step=$pstep
|
|
41 #end if
|
|
42
|
|
43 #if $pstratify:
|
|
44 --p-stratify
|
|
45 #else
|
|
46 --p-no-stratify
|
|
47 #end if
|
|
48
|
|
49 #if $poptimizefeatureselection:
|
|
50 --p-optimize-feature-selection
|
|
51 #else
|
|
52 --p-no-optimize-feature-selection
|
|
53 #end if
|
|
54
|
|
55 #if $ptestsize:
|
|
56 --p-test-size=$ptestsize
|
|
57 #end if
|
|
58 --o-visualization=ovisualization
|
|
59 #if str($pestimator) != 'None':
|
|
60 --p-estimator=$pestimator
|
|
61 #end if
|
|
62
|
|
63 #if $pmazstats:
|
|
64 --p-maz-stats
|
|
65 #else
|
|
66 --p-no-maz-stats
|
|
67 #end if
|
|
68
|
|
69 #if str($cmdconfig) != 'None':
|
|
70 --cmd-config=$cmdconfig
|
|
71 #end if
|
|
72
|
|
73 #if $pcv:
|
|
74 --p-cv=$pcv
|
|
75 #end if
|
|
76
|
|
77 #if $pnestimators:
|
|
78 --p-n-estimators=$pnestimators
|
|
79 #end if
|
|
80
|
|
81 #if str($prandomstate):
|
|
82 --p-random-state="$prandomstate"
|
|
83 #end if
|
|
84 ;
|
1
|
85 qiime tools export --input-path ovisualization.qzv --output-path out && mkdir -p '$ovisualization.files_path'
|
0
|
86 && cp -r out/* '$ovisualization.files_path'
|
|
87 && mv '$ovisualization.files_path/index.html' '$ovisualization'
|
|
88 ]]>
|
|
89 </command>
|
|
90 <inputs>
|
|
91 <param format="qza,no_unzip.zip" label="--i-table: FeatureTable[Frequency] Feature table containing all features that should be used for target prediction. [required]" name="itable" optional="False" type="data"/>
|
|
92
|
|
93 <repeat name="input_files_mmetadatafile" optional="False" title="--m-metadata-file">
|
|
94 <param label="--m-metadata-file: Metadata file or artifact viewable as metadata. This option may be supplied multiple times to merge metadata. [required]" name="additional_input" type="data" format="tabular,qza,no_unzip.zip" />
|
|
95 </repeat>
|
|
96
|
|
97 <param label="--p-column: Numeric metadata column to use as prediction target. [required]" name="pcolumn" optional="False" type="text"/>
|
|
98
|
|
99 <param label="--p-group-by: Categorical metadata column to use for plotting and significance testing between main treatment groups. [required]" name="pgroupby" optional="False" type="text"/>
|
|
100 <param label="--p-control: Value of group_by to use as control group. The regression model will be trained using only control group data, and the maturity scores of other groups consequently will be assessed relative to this group. [required]" name="pcontrol" optional="False" type="text"/>
|
|
101
|
|
102 <param label="--p-estimator: Regression model to use for prediction.
|
|
103 [default: RandomForestRegressor]" name="pestimator" optional="True" type="select">
|
|
104 <option selected="True" value="None">Selection is Optional</option>
|
|
105 <option value="Ridge">Ridge</option>
|
|
106 <option value="RandomForestRegressor">RandomForestRegressor</option>
|
|
107 <option value="GradientBoostingRegressor">GradientBoostingRegressor</option>
|
|
108 <option value="ExtraTreesRegressor">ExtraTreesRegressor</option>
|
|
109 <option value="SVR">SVR</option>
|
|
110 <option value="ElasticNet">ElasticNet</option>
|
|
111 <option value="Lasso">Lasso</option>
|
|
112 </param>
|
|
113 <param label="--p-n-estimators: 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"/>
|
|
114
|
|
115 <param label="--p-test-size: Fraction of input samples to exclude from training set and use for classifier testing. [default: 0.2]" name="ptestsize" optional="True" type="float" value="0.2"/>
|
|
116
|
|
117 <param label="--p-step: 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"/>
|
|
118
|
|
119 <param label="--p-cv: Number of k-fold cross-validations to perform. [default: 5]" name="pcv" optional="True" type="integer" value="5"/>
|
|
120
|
|
121 <param label="--p-random-state: Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="text"/>
|
|
122
|
|
123 <param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: True]" name="pparametertuning" checked="True" type="boolean"/>
|
|
124 <param label="--p-optimize-feature-selection: --p-no-optimize-feature-selection Automatically optimize input feature selection using recursive feature elimination. [default: True]" name="poptimizefeatureselection" checked="True" type="boolean"/>
|
|
125
|
|
126 <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" checked="False" type="boolean"/>
|
|
127
|
|
128 <param label="--p-maz-stats: --p-no-maz-stats Calculate anova and pairwise tests on MAZ scores. [default: True]" name="pmazstats" checked="True" type="boolean"/>
|
|
129
|
|
130 <param label="--cmd-config: Use config file for command options" name="cmdconfig" optional="True" type="data"/>
|
|
131 </inputs>
|
|
132 <outputs>
|
|
133 <data format="html" label="${tool.name} on ${on_string}: visualization.qzv" name="ovisualization"/>
|
|
134 </outputs>
|
|
135 <help>
|
|
136 <![CDATA[
|
|
137 Microbial maturity index prediction.
|
|
138 -------------------------------------
|
|
139
|
|
140 Calculates a "microbial maturity" index from a regression model trained on
|
|
141 feature data to predict a given continuous metadata column, e.g., to
|
|
142 predict age as a function of microbiota composition. The model is trained
|
|
143 on a subset of control group samples, then predicts the column value for
|
|
144 all samples. This visualization computes maturity index z-scores to compare
|
|
145 relative "maturity" between each group, as described in
|
|
146 doi:10.1038/nature13421. This method can be used to predict between-group
|
|
147 differences in relative trajectory across any type of continuous metadata
|
|
148 gradient, e.g., intestinal microbiome development by age, microbial
|
|
149 succession during wine fermentation, or microbial community differences
|
|
150 along environmental gradients, as a function of two or more different
|
|
151 "treatment" groups.
|
|
152
|
|
153 Parameters
|
|
154 ----------
|
|
155 table : FeatureTable[Frequency]
|
|
156 Feature table containing all features that should be used for target
|
|
157 prediction.
|
|
158 metadata : Metadata
|
|
159 \
|
|
160 column : Str
|
|
161 Numeric metadata column to use as prediction target.
|
|
162 group_by : Str
|
|
163 Categorical metadata column to use for plotting and significance
|
|
164 testing between main treatment groups.
|
|
165 control : Str
|
|
166 Value of group_by to use as control group. The regression model will be
|
|
167 trained using only control group data, and the maturity scores of other
|
|
168 groups consequently will be assessed relative to this group.
|
|
169 estimator : Str % Choices({'ElasticNet', 'ExtraTreesRegressor', 'GradientBoostingRegressor', 'Lasso', 'RandomForestRegressor', 'Ridge', 'SVR'}), optional
|
|
170 Regression model to use for prediction.
|
|
171 n_estimators : Int % Range(1, None), optional
|
|
172 Number of trees to grow for estimation. More trees will improve
|
|
173 predictive accuracy up to a threshold level, but will also increase
|
|
174 time and memory requirements. This parameter only affects ensemble
|
|
175 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
|
|
176 GradientBoosting.
|
|
177 test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
|
|
178 Fraction of input samples to exclude from training set and use for
|
|
179 classifier testing.
|
|
180 step : Float % Range(0.0, 1.0, inclusive_start=False), optional
|
|
181 If optimize_feature_selection is True, step is the percentage of
|
|
182 features to remove at each iteration.
|
|
183 cv : Int % Range(1, None), optional
|
|
184 Number of k-fold cross-validations to perform.
|
|
185 random_state : Int, optional
|
|
186 Seed used by random number generator.
|
|
187 parameter_tuning : Bool, optional
|
|
188 Automatically tune hyperparameters using random grid search.
|
|
189 optimize_feature_selection : Bool, optional
|
|
190 Automatically optimize input feature selection using recursive feature
|
|
191 elimination.
|
|
192 stratify : Bool, optional
|
|
193 Evenly stratify training and test data among metadata categories. If
|
|
194 True, all values in column must match at least two samples.
|
|
195 maz_stats : Bool, optional
|
|
196 Calculate anova and pairwise tests on MAZ scores.
|
|
197
|
|
198 Returns
|
|
199 -------
|
|
200 visualization : Visualization
|
|
201 \
|
|
202 ]]>
|
|
203 </help>
|
|
204 <macros>
|
|
205 <import>qiime_citation.xml</import>
|
|
206 </macros>
|
|
207 <expand macro="qiime_citation" />
|
|
208 </tool>
|