comparison qiime2/qiime_longitudinal_feature-volatility.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_longitudinal_feature-volatility" name="qiime longitudinal feature-volatility" version="2019.7"> 2 <tool id="qiime_longitudinal_feature-volatility" name="qiime longitudinal feature-volatility"
3 <description> - Feature volatility analysis</description> 3 version="2020.8">
4 <requirements> 4 <description>Feature volatility analysis</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 longitudinal feature-volatility 9 qiime longitudinal feature-volatility
9 10
10 --i-table=$itable 11 --i-table=$itable
11 12 # if $input_files_mmetadatafile:
12 13 # def list_dict_to_string(list_dict):
13 --p-state-column="$pstatecolumn" 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
22
23 #if '__ob__' in str($pstatecolumn):
24 #set $pstatecolumn_temp = $pstatecolumn.replace('__ob__', '[')
25 #set $pstatecolumn = $pstatecolumn_temp
26 #end if
27 #if '__cb__' in str($pstatecolumn):
28 #set $pstatecolumn_temp = $pstatecolumn.replace('__cb__', ']')
29 #set $pstatecolumn = $pstatecolumn_temp
30 #end if
31 #if 'X' in str($pstatecolumn):
32 #set $pstatecolumn_temp = $pstatecolumn.replace('X', '\\')
33 #set $pstatecolumn = $pstatecolumn_temp
34 #end if
35 #if '__sq__' in str($pstatecolumn):
36 #set $pstatecolumn_temp = $pstatecolumn.replace('__sq__', "'")
37 #set $pstatecolumn = $pstatecolumn_temp
38 #end if
39 #if '__db__' in str($pstatecolumn):
40 #set $pstatecolumn_temp = $pstatecolumn.replace('__db__', '"')
41 #set $pstatecolumn = $pstatecolumn_temp
42 #end if
43
44 --p-state-column=$pstatecolumn
45
46
47 #if '__ob__' in str($pindividualidcolumn):
48 #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__ob__', '[')
49 #set $pindividualidcolumn = $pindividualidcolumn_temp
50 #end if
51 #if '__cb__' in str($pindividualidcolumn):
52 #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__cb__', ']')
53 #set $pindividualidcolumn = $pindividualidcolumn_temp
54 #end if
55 #if 'X' in str($pindividualidcolumn):
56 #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('X', '\\')
57 #set $pindividualidcolumn = $pindividualidcolumn_temp
58 #end if
59 #if '__sq__' in str($pindividualidcolumn):
60 #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__sq__', "'")
61 #set $pindividualidcolumn = $pindividualidcolumn_temp
62 #end if
63 #if '__db__' in str($pindividualidcolumn):
64 #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__db__', '"')
65 #set $pindividualidcolumn = $pindividualidcolumn_temp
66 #end if
14 67
15 #if str($pindividualidcolumn): 68 #if str($pindividualidcolumn):
16 --p-individual-id-column="$pindividualidcolumn" 69 --p-individual-id-column=$pindividualidcolumn
17 #end if 70 #end if
18 71
19 #if str($pcv): 72 --p-cv=$pcv
20 --p-cv=$pcv
21 #end if
22 73
23 #if str($prandomstate): 74 #if str($prandomstate):
24 --p-random-state="$prandomstate" 75 --p-random-state=$prandomstate
25 #end if 76 #end if
26 77 --p-n-jobs=$pnjobs
27 #set $pnjobs = '${GALAXY_SLOTS:-4}' 78
28 79 --p-n-estimators=$pnestimators
29 #if str($pnjobs):
30 --p-n-jobs="$pnjobs"
31 #end if
32
33
34 #if str($pnestimators):
35 --p-n-estimators=$pnestimators
36 #end if
37 80
38 #if str($pestimator) != 'None': 81 #if str($pestimator) != 'None':
39 --p-estimator=$pestimator 82 --p-estimator=$pestimator
40 #end if 83 #end if
41 84
42 #if $pparametertuning: 85 #if $pparametertuning:
43 --p-parameter-tuning 86 --p-parameter-tuning
44 #end if 87 #end if
45 88
46 #if str($pmissingsamples) != 'None': 89 #if str($pmissingsamples) != 'None':
47 --p-missing-samples=$pmissingsamples 90 --p-missing-samples=$pmissingsamples
48 #end if 91 #end if
49 92
50 93 #if str($pimportancethreshold) != 'None':
51 #if $input_files_mmetadatafile: 94 --p-importance-threshold=$pimportancethreshold
52 #def list_dict_to_string(list_dict): 95 #end if
53 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name') 96
54 #for d in list_dict[1:]: 97 #if str($pfeaturecount) != 'None':
55 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name') 98 --p-feature-count=$pfeaturecount
56 #end for 99 #end if
57 #return $file_list
58 #end def
59 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
60 #end if
61
62 100
63 --o-filtered-table=ofilteredtable 101 --o-filtered-table=ofilteredtable
102
64 --o-feature-importance=ofeatureimportance 103 --o-feature-importance=ofeatureimportance
104
65 --o-volatility-plot=ovolatilityplot 105 --o-volatility-plot=ovolatilityplot
106
66 --o-accuracy-results=oaccuracyresults 107 --o-accuracy-results=oaccuracyresults
108
67 --o-sample-estimator=osampleestimator 109 --o-sample-estimator=osampleestimator
110
111 #if str($examples) != 'None':
112 --examples=$examples
113 #end if
114
68 ; 115 ;
69 cp ofilteredtable.qza $ofilteredtable;
70 cp ofeatureimportance.qza $ofeatureimportance;
71 qiime tools export --input-path ovolatilityplot.qzv --output-path out && mkdir -p '$ovolatilityplot.files_path'
72 && cp -r out/* '$ovolatilityplot.files_path'
73 && mv '$ovolatilityplot.files_path/index.html' '$ovolatilityplot';
74 qiime tools export --input-path oaccuracyresults.qzv --output-path out && mkdir -p '$oaccuracyresults.files_path'
75 && cp -r out/* '$oaccuracyresults.files_path'
76 && mv '$oaccuracyresults.files_path/index.html' '$oaccuracyresults';
77 cp osampleestimator.qza $osampleestimator 116 cp osampleestimator.qza $osampleestimator
78 ]]></command> 117
79 <inputs> 118 ]]></command>
80 <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"/> 119 <inputs>
81 <param label="--p-state-column: TEXT Metadata containing collection time (state) values for each sample. Must contain exclusively numeric values. [required]" name="pstatecolumn" optional="False" type="text"/> 120 <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" />
82 <param label="--p-individual-id-column: TEXT Metadata column containing IDs for individual subjects. [optional]" name="pindividualidcolumn" optional="True" type="text"/> 121 <repeat name="input_files_mmetadatafile" optional="False" title="--m-metadata-file">
83 <param label="--p-cv: INTEGER Number of k-fold cross-validations to perform. Range(1, None) [default: 5]" name="pcv" optional="True" type="integer" min="1" value="5"/> 122 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA... (multiple Sample metadata file containing arguments will be individual-id-column. merged) [required]" name="additional_input" optional="False" type="data" />
84 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/> 123 </repeat>
85 <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" min="1" value="100"/> 124 <param label="--p-state-column: TEXT Metadata containing collection time (state) values for each sample. Must contain exclusively numeric values. [required]" name="pstatecolumn" optional="False" type="text" />
86 <param label="--p-estimator: " name="pestimator" optional="True" type="select"> 125 <param label="--p-individual-id-column: TEXT Metadata column containing IDs for individual subjects. [optional]" name="pindividualidcolumn" optional="False" type="text" />
87 <option selected="True" value="None">Selection is Optional</option> 126 <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" />
88 <option value="RandomForestRegressor">RandomForestRegressor</option> 127 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="False" type="text" />
89 <option value="ExtraTreesRegressor">ExtraTreesRegressor</option> 128 <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" />
90 <option value="GradientBoostingRegressor">GradientBoostingRegressor</option> 129 <param label="--p-estimator: " name="pestimator" optional="True" type="select">
91 <option value="AdaBoostRegressor">AdaBoostRegressor</option> 130 <option selected="True" value="None">Selection is Optional</option>
92 <option value="ElasticNet">ElasticNet</option> 131 <option value="RandomForestRegressor">RandomForestRegressor</option>
93 <option value="Ridge">Ridge</option> 132 <option value="ExtraTreesRegressor">ExtraTreesRegressor</option>
94 <option value="Lasso">Lasso</option> 133 <option value="GradientBoostingRegressor">GradientBoostingRegressor</option>
95 <option value="KNeighborsRegressor">KNeighborsRegressor</option> 134 <option value="AdaBoostRegressor">AdaBoostRegressor</option>
96 <option value="LinearSVR">LinearSVR</option> 135 <option value="ElasticNet">ElasticNet</option>
97 <option value="SVR">SVR</option> 136 <option value="Ridge">Ridge</option>
98 </param> 137 <option value="Lasso">Lasso</option>
99 <param label="--p-parameter-tuning: --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean"/> 138 <option value="KNeighborsRegressor">KNeighborsRegressor</option>
100 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select"> 139 <option value="LinearSVR">LinearSVR</option>
101 <option selected="True" value="None">Selection is Optional</option> 140 <option value="SVR">SVR</option>
102 <option value="error">error</option> 141 </param>
103 <option value="ignore">ignore</option> 142 <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" />
104 </param> 143 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
105 144 <option selected="True" value="None">Selection is Optional</option>
106 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file [required]"> 145 <option value="error">error</option>
107 <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" /> 146 <option value="ignore">ignore</option>
108 </repeat> 147 </param>
109 148 <param label="--p-importance-threshold: " name="pimportancethreshold" optional="True" type="select">
110 </inputs> 149 <option selected="True" value="None">Selection is Optional</option>
111 <outputs> 150 <option value="Float % Range(0">Float % Range(0</option>
112 <data format="qza" label="${tool.name} on ${on_string}: filteredtable.qza" name="ofilteredtable"/> 151 <option value="None">None</option>
113 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance"/> 152 <option value="inclusive_start=False">inclusive_start=False</option>
114 <data format="html" label="${tool.name} on ${on_string}: volatilityplot.qzv" name="ovolatilityplot"/> 153 </param>
115 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.qzv" name="oaccuracyresults"/> 154 <param label="--p-feature-count: " name="pfeaturecount" optional="True" type="select">
116 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator"/> 155 <option selected="True" value="None">Selection is Optional</option>
117 </outputs> 156 <option value="Int % Range(1">Int % Range(1</option>
118 <help><![CDATA[ 157 <option value="None">None</option>
158 </param>
159 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
160
161 </inputs>
162
163 <outputs>
164 <data format="qza" label="${tool.name} on ${on_string}: filteredtable.qza" name="ofilteredtable" />
165 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance" />
166 <data format="html" label="${tool.name} on ${on_string}: volatilityplot.html" name="ovolatilityplot" />
167 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.html" name="oaccuracyresults" />
168 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator" />
169
170 </outputs>
171
172 <help><![CDATA[
119 Feature volatility analysis 173 Feature volatility analysis
120 ########################### 174 ###############################################################
121 175
122 Identify features that are predictive of a numeric metadata column, 176 Identify features that are predictive of a numeric metadata column,
123 state_column (e.g., time), and plot their relative frequencies across 177 state_column (e.g., time), and plot their relative frequencies across
124 states using interactive feature volatility plots. A supervised learning 178 states using interactive feature volatility plots. A supervised learning
125 regressor is used to identify important features and assess their ability 179 regressor is used to identify important features and assess their ability
140 Metadata column containing IDs for individual subjects. 194 Metadata column containing IDs for individual subjects.
141 cv : Int % Range(1, None), optional 195 cv : Int % Range(1, None), optional
142 Number of k-fold cross-validations to perform. 196 Number of k-fold cross-validations to perform.
143 random_state : Int, optional 197 random_state : Int, optional
144 Seed used by random number generator. 198 Seed used by random number generator.
199 n_jobs : Int, optional
200 Number of jobs to run in parallel.
145 n_estimators : Int % Range(1, None), optional 201 n_estimators : Int % Range(1, None), optional
146 Number of trees to grow for estimation. More trees will improve 202 Number of trees to grow for estimation. More trees will improve
147 predictive accuracy up to a threshold level, but will also increase 203 predictive accuracy up to a threshold level, but will also increase
148 time and memory requirements. This parameter only affects ensemble 204 time and memory requirements. This parameter only affects ensemble
149 estimators, such as Random Forest, AdaBoost, ExtraTrees, and 205 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
155 missing_samples : Str % Choices('error', 'ignore'), optional 211 missing_samples : Str % Choices('error', 'ignore'), optional
156 How to handle missing samples in metadata. "error" will fail if missing 212 How to handle missing samples in metadata. "error" will fail if missing
157 samples are detected. "ignore" will cause the feature table and 213 samples are detected. "ignore" will cause the feature table and
158 metadata to be filtered, so that only samples found in both files are 214 metadata to be filtered, so that only samples found in both files are
159 retained. 215 retained.
216 importance_threshold : Float % Range(0, None, inclusive_start=False) | Str % Choices('q1', 'q2', 'q3'), optional
217 Filter feature table to exclude any features with an importance score
218 less than this threshold. Set to "q1", "q2", or "q3" to select the
219 first, second, or third quartile of values. Set to "None" to disable
220 this filter.
221 feature_count : Int % Range(1, None) | Str % Choices('all'), optional
222 Filter feature table to include top N most important features. Set to
223 "all" to include all features.
160 224
161 Returns 225 Returns
162 ------- 226 -------
163 filtered_table : FeatureTable[RelativeFrequency] 227 filtered_table : FeatureTable[RelativeFrequency]
164 Feature table containing only important features. 228 Feature table containing only important features.
168 Interactive volatility plot visualization. 232 Interactive volatility plot visualization.
169 accuracy_results : Visualization 233 accuracy_results : Visualization
170 Accuracy results visualization. 234 Accuracy results visualization.
171 sample_estimator : SampleEstimator[Regressor] 235 sample_estimator : SampleEstimator[Regressor]
172 Trained sample regressor. 236 Trained sample regressor.
173 ]]></help> 237 ]]></help>
174 <macros> 238 <macros>
175 <import>qiime_citation.xml</import> 239 <import>qiime_citation.xml</import>
176 </macros> 240 </macros>
177 <expand macro="qiime_citation"/> 241 <expand macro="qiime_citation"/>
178 </tool> 242 </tool>