We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The branch lengths in the output newick tree when performing e.g., gas mcluster appear to be double the distances in the distance matrix.
gas mcluster
For example, given the following distance matrix:
dists sample1 sample2 sample3 sample1 0 1 2 sample2 1 0 3 sample3 2 3 0
From https://github.com/phac-nml/gasclustering/blob/main/tests/data/clusters/expected_tree_hamming.nwk
The below is an example newick tree:
((sample2:1.000000,sample1:1.000000):0.75,sample3:2.500000);
The distance from the above distance matrix between sample1 and sample2 is 1.
1
But, if you add up the branch lengths in the newick file between sample1 and sample2 you get 1 + 1 = 2.
1 + 1 = 2
A possible cause is in the buildNewick function:
buildNewick
genomic_address_service/genomic_address_service/classes/multi_level_clustering.py
Lines 52 to 59 in ffca4ed
Internal branch lengths are being divided by 2 here, but not branch lengths leading directly to leaves.
Credit goes to @kylacochrane, @apetkau, and @jrober84 for finding the issue 😄
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The branch lengths in the output newick tree when performing e.g.,
gas mcluster
appear to be double the distances in the distance matrix.Example Input
For example, given the following distance matrix:
From https://github.com/phac-nml/gasclustering/blob/main/tests/data/clusters/expected_tree_hamming.nwk
Example output
The below is an example newick tree:
From https://github.com/phac-nml/gasclustering/blob/main/tests/data/clusters/expected_tree_hamming.nwk
Comparison
The distance from the above distance matrix between sample1 and sample2 is
1
.But, if you add up the branch lengths in the newick file between sample1 and sample2 you get
1 + 1 = 2
.Possible cause
A possible cause is in the
buildNewick
function:genomic_address_service/genomic_address_service/classes/multi_level_clustering.py
Lines 52 to 59 in ffca4ed
Internal branch lengths are being divided by 2 here, but not branch lengths leading directly to leaves.
Credit
Credit goes to @kylacochrane, @apetkau, and @jrober84 for finding the issue 😄
The text was updated successfully, but these errors were encountered: