Node labels/internal nodes on rooted tree phylogeny

Hi,

I am running into a problem using my exported rooted tree in other programs (specifically R). I have not run into this problem before with other projects. What is happening with this tree is it has missing node labels. What are the node labels? I thought they were support values for the nodes.

For instance, in this attached tree file that is rooted, there are 6798 tip labels, but 6768 node labels. Usually, there is one less node label than tip labels. Some of the node labels are 0, but others are just missing. I am guessing that it has to deal with several branches of the tree that shared the same node that are not supported at all?

When I try to use this tree in phyloseq and do analyses using unifrac distances I receive error messages that relate to the node labels being incorrect.

But, when I do unifrac analyses in QIIME2 there is no issue. So, somehow your software is ok with dealing with the missing node labels.

I could replace the node labels in R with 0s, but I wanted to make sure there is not some larger issue here that I am missing. Nevermind, I replaced the node labels with zero, and it does not fix the issue. The tree still has 6768 internal nodes.

I'm wondering if taking an approach as indicated in this post might be useful: Equivalent to remove PyNAST failures in QIIME2

Thank you,

Carlyrooted-tree-coffee.qza (237.4 KB)

1 Like

Hi @CarlyRae,

Thanks for attaching your qza (letting me see what algorithm was used) and for asking this great question!

According to fasttree's documentation, it looks like the internal labels are indeed support values. The reason some of them are blank is because we use midpoint rooting via scikit-bio. This does not preserve node labels of the internal nodes which is why some of them are blank. In other words, in the original unrooted form, you'd have support labels for every node. But when we "pivot" the tree around to root it, that information stops being relevant and isn't retained.

In QIIME 2, we only need the tip labels, otherwise the only other information needed is the length and topology itself, which means we don't notice the missing names for the internal nodes (nor would the algorithm really have anything to do with that information).

Replacing with 0 is fine if that's what PhyloSeq (I'm assuming here) needs.


Looking at your tree, it appears that some of the tips have more than 1 sibling. This is likely the product of the midpoint root as well, as all of these distances appear to be zero:

In [25]: for x in t.traverse(): 
    ...:     if len(x.children) != 2 and len(x.children) != 0: 
    ...:         print(repr(x), repr(['%s, length: %d' % (e.name, e.length) for e in x.children]))                                                                                                                                                                                 
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['98dcb6d7f87feb1cb5267bd81145eab3, length: 0', 'ead32bfd61c90ef0a3cad273f913d71e, length: 0', '72cc246085731269f5a6b0881b545ba2, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['e5be36bb796466cfd3962a19d4f92c15, length: 0', 'b6892dd17f29911b9ede4fb813c0169e, length: 0', 'ea03fb206209c9359d65118f3959003c, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['edd3186cc5a4423fb65d96621f4d8126, length: 0', 'a52efaeb39f28777ccfea337688afec0, length: 0', '82d8874e1eb0667639731c46dee0722e, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['6a03862eb648c0ef58d7ce6a1d03d9b3, length: 0', '0688ce4d7041046cd788bfe46e21bd5c, length: 0', '9a3a331881019be6ed8ba5e18db7a1c9, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['8b817c0bcd380ea9c7c528e25e82f41a, length: 0', 'af26cd8d3694c04cb1b890f5a8a38cdc, length: 0', '5a44fdd8baa21cc52cb1e80f7fe0db68, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['aff86460e49b40f31d8a788c71f0dae3, length: 0', '62952b43781cbe5dbdab8630b85e304b, length: 0', '818dba2985a778738a5ee0f777a2a936, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['fafee1138c29402ddd1be5ee132cc5e1, length: 0', '023307be5a10ed07179085fea7672dce, length: 0', 'f6109784bb7abecfeba05ee3a52d4ca5, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['dcde8bb6bfb922fc45dc8c58167b3302, length: 0', '9bfc451196bd9e7c728e4c1e7b696b12, length: 0', '8f764f2d5f24e5367b1e16c2c8f9367a, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['75331a03ed6bc4a4a5df36d6e77e305c, length: 0', 'a6afee8fbb81fc75697790b22729edc3, length: 0', 'c94ab4f30f41634d4a6eddae58eaffc6, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['ed24e7ff7e5c9500f77600aca5cd8bef, length: 0', '9f98c61984199d1d3f8d3547a702644a, length: 0', '470d5f4583ba324b22d6622dd858d4c7, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['029ff9b74d4c6f5124c6cfc6b05af501, length: 0', '2ef0b2b1451f066e96974ceb4e71122e, length: 0', 'ecff1834d5cad9af11fcb5476601c954, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['34e9f4e7e6b4b5c474b4f6c43f3ff652, length: 0', '8719202c081179d6a2d51315bddf38b6, length: 0', 'f4eb367b839245d490e2347c990c8fd5, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['c3ae224f273a03ac2839d75beac238d1, length: 0', '33ed85e4e03231017307f5f743074158, length: 0', '2ba6d168acf1d2daec23d66e4f49c9ac, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['b01fc517c326e395abe684b676e5aabe, length: 0', '35402422b50f121a0dd8d0195f200742, length: 0', '9f6af5207589d4bee3e79fa5be185512, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['5f54dc7f9cae3e4247005a97bd86a710, length: 0', 'f8b0a1237e570909f37ab8d3cb64d6ae, length: 0', '51c27d7088ce3497dd9bcd6245836575, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['74d2af131bc3cd7ac61637716be6e279, length: 0', '9b1a0491b0d539c7b73036bc6557deba, length: 0', 'a57c03323270c44fc6b99eea0d5c7cee, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 4> ['82c4aef610416bb331bfca650416a86e, length: 0', '54c04a668af798a315931cede1d432bb, length: 0', '1863f3ae07bcfd86e043a75c3b584fb6, length: 0', '821d9a89a4c717b51fdc71a8a6f040a5, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['2015b5b1e5e9c7265aa8cd5ed869d2bd, length: 0', 'e547abfe33692d9b01c6ce7705ff52d4, length: 0', 'f21aaffa64f9431203be0594bcb3b736, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['9a05e08c64a810034236d5610a1514f2, length: 0', '3afa846cb1117d639c915900e3a7265d, length: 0', 'd031b2697e100a9ed5371827eedc5e03, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['69852a7d634d8928a3d17b7d752fdd66, length: 0', '57c88825143da93b0bb151a982ee5226, length: 0', 'f7a4e92a04b4c16928899afffbeb3723, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['a5af3e115996d742ef284146f123f03d, length: 0', '635e891c68a43a43461d92668f1777c3, length: 0', '8f69772784a21b09dbc6e8c02895d057, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 4> ['df76889c8f451fda5397f4699dad5ecc, length: 0', '430a8f3ac4c85fdfe4588c75b641611b, length: 0', 'dcadab4be7f6a6ee76e83c2fcf5cb24a, length: 0', '49aaf63a73d0f3beaae437a0860739b2, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['f6f1ef061f99a86cac98e58a6392cd4b, length: 0', '695146060601cad6d9177d99be6339b0, length: 0', '4da94f330b3ffa83bdeb532480d58f19, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['747abc58f039dfdf0e3d891a27d6165f, length: 0', 'b8d53db065c2b6dafec1c60c59355e61, length: 0', '50ebe174708115f9d006ba75cc18b1f2, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 3> ['1896746b7af9f71a9b5693cb6c63e168, length: 0', 'e3db2f3dc18a2ece6e03a553c9c2e239, length: 0', 'f090563112e78e7bc144268b46165208, length: 0']
<TreeNode, name: unnamed, internal node count: 0, tips count: 4> ['d3164009f7b983bc82140ceec9450692, length: 0', '4e18fad15206d5effab2be818add415a, length: 0', '70cb4498763d26d6b0a71639533694f3, length: 0', '122559f15c3ef7861c6901f2ad394982, length: 0']

This doesn't affect the UniFrac calculation as those branches were of zero length, so any bifurcating configuration gives the same result (of adding zero).

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.