How can I get the 97% GG tree that has branch lengths? Also is there a version I can download that is already a qza file? Thanks!
Good afternoon Stephanie,
On the resources page there is a link to the newest version of greengenes, which includes trees and branch lengths. At least it should… Are you getting an error?
That’s a great idea! We should totally include that with the default databases.
I’m still getting the branch error. I downloaded 13_8 version of greengenes. Then I imported it with this command:
qiime tools import \ > --input-path 97_otus.tree \ > --output-path unrooted-tree.qza \ > --type 'Phylogeny[Rooted]'
But when I tried to run alpha rarefaction using the new .qza tree it didnt work and I got the " All non-root nodes in
tree must have a branch length" error.
Thanks for posting your command. The example on the Importing page uses
--type 'Phylogeny[Unrooted]' while your script says
Can you try passing
--type 'Phylogeny[Unrooted]' instead, and see if the alpha rarefaction works?
The issue comes from the reroot performed on that release of Greengenes where the added branch did not get set with a length (connecting “k__Bacteria” to a common vertex with “k__Archaea”). In QIIME1, this missing length was not an issue as PyCogent’s
PhyloNode interpreted a missing length as 0.0 when computing phylogenetic metrics so this went unnoticed at the time of release. One way to solve this is to open the tree, set a length, and write it out. An example of doing so is below using Python and saving a
In : import skbio In : t = skbio.TreeNode.read('97_otus.tree') In : for n in t.traverse(): ...: if n.length is None: ...: n.length = 0.0 ...: In : import qiime2 In : ar = qiime2.Artifact.import_data('Phylogeny[Rooted]', t) In : ar.save('97_otus.qza') Out: '97_otus.qza'
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.