Skip to content

Commit

Permalink
Revise text on reference taxonomy; test for the phylogeny reference (#11
Browse files Browse the repository at this point in the history
)

* Revise text on reference taxonomy

* Test for the phylogeny file
  • Loading branch information
wasade authored Feb 15, 2023
1 parent a6ac787 commit 139e365
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions q2_gg2/_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,13 @@ def _load_tree_and_cache(data, features):
if node.parent.is_root():
node.ancestor_cache = []
else:
if node.parent.name is None:
raise ValueError("The provided reference seems malformed. "
"This error would happen if the "
"<version>.phylogeny.*.nwk.qza file was "
"provided. Please try rerunning using the "
"<version>.taxonomy.*.nwk.qza file as the "
"reference")
parent_cache = node.parent.ancestor_cache
node.ancestor_cache = [node.parent.name] + parent_cache
return tree
Expand Down
4 changes: 3 additions & 1 deletion q2_gg2/plugin_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@
parameters={},
outputs=[('classification', FeatureData[Taxonomy])],
input_descriptions={
'reference_taxonomy': 'The reference taxonomy to derive from',
'reference_taxonomy': ('The reference taxonomy to derive from. Note '
'that this input corresponds to the .nwk '
'reference artifact'),
'table': 'The feature table to classify'
},
parameter_descriptions={},
Expand Down

0 comments on commit 139e365

Please sign in to comment.