Closed stenglein-lab closed 6 years ago
It is a string mismatch between similarly named pairs that we miss with visual inspection, but don't pass array.prototype.indexOf.
For PhleboVirus_L and _M, they are:
Watermelon_silverottle_reference
versus
Watermelon_silver_mottle_reference
Bajaru_sample_
versus
Bajaru_sample
and
Severe_fever_with_thrombocytopenia_reference
versus Severe_fever_with_thrombocytopenia_syndrome_reference
The underlying cophy-treetools doesn't implement the "best-match" method, which it should obviously be using here.
The package is https://www.npmjs.com/package/string-similarity and it is used to draw the bridging lines here https://github.com/stenglein-lab/TreeTangler/blob/6dc48fd04113efc8714927b11c070926d2f09498/lib/cophylogeny/src/cophylogeny-draw.js#L51
This problem exposed an incorrect statement in the evaluation of dfoot that happened to work in ideal, matched leaf names. The revision is https://github.com/meekrob/cophy-treetools/blob/29a34489f7e6c17a241c3f17d69573be8f8c414b/functions/detangler.js#L52
A connecting line that connects nodes that seem like they should have a 0 S.F. distance are colored red.
This is evident in Watermelon-silver_mottle connecting line in this tree:
http://localhost:8000/?left=trees/Phlebovirus_L&right=trees/Phlebovirus_M#