|
18 | 18 | ZodiacFolder, ZodiacDirFmt,
|
19 | 19 | CSIFolder, CSIDirFmt,
|
20 | 20 | FeatureData, TSVMoleculesFormat, Molecules)
|
21 |
| -from ._plot import plot |
22 | 21 |
|
23 | 22 | from qiime2.plugin import (Plugin, Str, Range, Choices, Float, Int, Bool, List,
|
24 | 23 | Citations)
|
|
235 | 234 | 'tips that are in feature data'}
|
236 | 235 | )
|
237 | 236 |
|
238 |
| -plugin.visualizers.register_function( |
239 |
| - function=plot, |
240 |
| - name='Generate an annotated qemistree plot in iTOL', |
241 |
| - description=('Plots the phenetic tree in iTOL with clade colors, ' |
242 |
| - 'feature labels and relative abundance per sample group'), |
243 |
| - inputs={'grouped_table': FeatureTable[Frequency], |
244 |
| - 'tree': Phylogeny[Rooted], |
245 |
| - 'feature_metadata': FeatureData[Molecules] |
246 |
| - }, |
247 |
| - parameters={ |
248 |
| - 'category': Str, |
249 |
| - 'color_palette': Str % Choices(['Pastel1', 'Pastel2', 'Paired', |
250 |
| - 'Accent', 'Dark2', 'Set1', 'Set2', |
251 |
| - 'Set3', 'tab10', 'tab20', 'tab20b', |
252 |
| - 'tab20c', 'Greys', 'Purples', 'Blues', |
253 |
| - 'Greens', 'Oranges', 'Reds', 'YlOrBr', |
254 |
| - 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', |
255 |
| - 'BuPu', 'GnBu', 'PuBu', 'YlGnBu', |
256 |
| - 'PuBuGn', 'BuGn', 'YlGn']), |
257 |
| - 'ms2_label': Bool, |
258 |
| - 'parent_mz': Bool, |
259 |
| - 'normalize_features': Bool |
260 |
| - }, |
261 |
| - input_descriptions={'grouped_table': 'Feature table of samples ' |
262 |
| - 'grouped by categories. We recommend ' |
263 |
| - 'collapsing feature table by a ' |
264 |
| - 'sample metadata category using ' |
265 |
| - '`qiime feature-table group`. ' |
266 |
| - 'We can then plot the prevalence ' |
267 |
| - 'of these categories for ' |
268 |
| - 'each molecule on the tree', |
269 |
| - 'tree': 'Phenetic tree', |
270 |
| - 'feature_metadata': 'Feature metadata' |
271 |
| - }, |
272 |
| - parameter_descriptions={ |
273 |
| - 'category': 'The feature data column used to color and label the tips', |
274 |
| - 'color_palette': 'The color palette to use for coloring tips. ' |
275 |
| - 'For examples, see: https://matplotlib.org/' |
276 |
| - 'tutorials/colors/colormaps.html', |
277 |
| - 'ms2_label': 'Whether to label the tips with the MS2 value', |
278 |
| - 'parent_mz': 'If the feature is unclassified, label the tips using ' |
279 |
| - 'this parent mass of the molecule', |
280 |
| - 'normalize_features': 'Whether to normalize feature abundance to ' |
281 |
| - 'a constant sum i.e convert to ' |
282 |
| - 'relative abundance' |
283 |
| - }, |
284 |
| - citations=[citations['letunic2019itol']]) |
285 |
| - |
286 | 237 | importlib.import_module('q2_qemistree._transformer')
|
0 commit comments