You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handling of node labels should be consistent across Phylo export formats #1817
As discussed in #1803 (comment) it's probably a good idea if we establish the convention that nodes are labelled with a string like tsk{node.id}, and this should be the consistent default across phylo export, i.e., in
After discussing with @hyanwong we think a good way forward for the default node labels would be f"n{node.id}. The advantages are:
The prefix "n" indicates that this object is a node. The prefix tsk doesn't actually give any real information (other than where the data came from), and it helps us to disambiguate integer IDs from the different entities in the data model. (This convention is already used in the SVG tree structures)
It's much less likely that confusion will arise when comparing trees with VCF output, which uses the labels tsk_{some integer}. The way things are done in VCF is complicated, so a clean break from this would be quite helpful.
The labels are as concise as possible, without being bare integers.
I propose we use this as the default form then across newick, nexus and Fasta (we're deprecating the existing newick method, #1671 )
Does this sounds like a good default labelling strategy @jeetsukumaran?
After discussing with @hyanwong we think a good way forward for the default node labels would be f"n{node.id}. The advantages are:
The prefix "n" indicates that this object is a node. The prefix tsk doesn't actually give any real information (other than where the data came from), and it helps us to disambiguate integer IDs from the different entities in the data model. (This convention is already used in the SVG tree structures)
It's much less likely that confusion will arise when comparing trees with VCF output, which uses the labels tsk_{some integer}. The way things are done in VCF is complicated, so a clean break from this would be quite helpful.
The labels are as concise as possible, without being bare integers.
I propose we use this as the default form then across newick, nexus and Fasta (we're deprecating the existing newick method, #1671 )
Does this sounds like a good default labelling strategy @jeetsukumaran?
In terms of just Nexus syntax itself -- yep, it's trouble free, robust, unambiguous, and easily parsed. Only consideration is if ever you will want to attach labels to internal nodes and distinguish them from tip labels by another prefix. But that's easily solved (e.g., using "i" as for the internal node label prefix).
Activity
jeromekelleher commentedon Oct 22, 2021
After discussing with @hyanwong we think a good way forward for the default node labels would be
f"n{node.id}. The advantages are:tskdoesn't actually give any real information (other than where the data came from), and it helps us to disambiguate integer IDs from the different entities in the data model. (This convention is already used in the SVG tree structures)tsk_{some integer}. The way things are done in VCF is complicated, so a clean break from this would be quite helpful.I propose we use this as the default form then across newick, nexus and Fasta (we're deprecating the existing newick method, #1671 )
Does this sounds like a good default labelling strategy @jeetsukumaran?
jeetsukumaran commentedon Oct 22, 2021
In terms of just Nexus syntax itself -- yep, it's trouble free, robust, unambiguous, and easily parsed. Only consideration is if ever you will want to attach labels to internal nodes and distinguish them from tip labels by another prefix. But that's easily solved (e.g., using "i" as for the internal node label prefix).
benjeffery commentedon Oct 25, 2021
Sounds good to me, I also think that the
tsk_was redundant.jeromekelleher commentedon May 25, 2022
Closing this, resolved.