Repository navigation
Added special case for minimum alignment matrices in the NJ algorithm - #1891
Conversation
| clades[1].branch_length = 0 | ||
| clades[1].clades.append(clades[0]) | ||
| root = clades[1] | ||
| while len(dm) > 2: |
There was a problem hiding this comment.
I think rather than indenting all the old code one level using:
# special case for Minimum Alignment Matrices
if len(dm) == 2:
# new code
else:
while len(dm) > 2:
# old code (indented)you could leave it as:
if len(dm) == 2:
# new code
while len(dm) > 2:
# old code (unchanged)This should make the diff much smaller, and be easier to review.
There was a problem hiding this comment.
I agree, much better now that I think about it.
Codecov Report
@@ Coverage Diff @@
## master #1891 +/- ##
==========================================
- Coverage 85.5% 85.46% -0.04%
==========================================
Files 303 303
Lines 49447 49459 +12
==========================================
- Hits 42279 42272 -7
- Misses 7168 7187 +19
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1891 +/- ##
==========================================
- Coverage 85.5% 85.02% -0.48%
==========================================
Files 303 310 +7
Lines 49447 49951 +504
==========================================
+ Hits 42279 42472 +193
- Misses 7168 7479 +311
Continue to review full report at Codecov.
|
The root var was being overwritten after the last commit. Now the minimum alignment case immediately returns the tree.
|
Much clearer now - what do you think @etal? |
Added a case for matrices of length 1 which returns a trivial tree with 1 node.
|
Appveyor seems to run into this error, but I doubt it's in any way related to TreeConstruction:
Should I fork from the latest commit (710fc1b), open another Pull Request and retry from there? My branch is 14 commits behind biopython:master. |
|
A similar PIL DLL problem showed up on another pull request, it may have been sorted out now... The latest TravisCI flake8 problems (F117 and F632) were caused by a recent flake8 update, just fixed on the master branch. Any minor update to your branch should trigger a rebuild merged into the latest master branch (and thus fix that). I don't think you need to, but the way to 'move' all your work to be on top of the a recent commit from the official master branch (or simply the latest master branch) would be with You'd need to adjust Note this is about the only time you'd ever use |
|
If flake8 and the other issues have been fixed then I guess I don't need to rebase. Thanks for the info tho. |
|
Squash-and-merged, thank you. I'm assuming you don't want to be acknowledged by name as a contributor - but if you do, please just ask. |
|
Sorry for the late reply. And thanks for your contribution @ZykeDev . As it's been 5 years since the first version of this library, and I'm currently not working in this field, it would be nice if you or someone else can maintain it with more clear knowledge in this field. |
|
Great - thanks @lijax |
Original author Yanbo Ye and contributors since as tracked with version control have all agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Jordan Willis (@jwillis0720) biopython#292 (comment) - Marco Vincenzi (@ZykeDev) biopython#1891 - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Travis Wrightsman (@twrightsman) biopython#898 (comment) - Yanbo Ye (@lijax) biopython#898 (comment)
Original author Yanbo Ye and contributors since as tracked with version control have all agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Jordan Willis (@jwillis0720) biopython#292 (comment) - Marco Vincenzi (@ZykeDev) biopython#1891 - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Travis Wrightsman (@twrightsman) biopython#898 (comment) - Yanbo Ye (@lijax) biopython#898 (comment)
Original author Yanbo Ye and contributors since as tracked with version control have all agreed: - Adhemar Zerlotini (@azneto) #1412 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Chris Rands (@chris-rands) #1301 - Christian Brueffer (@cbrueffer) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Jordan Willis (@jwillis0720) #292 (comment) - Marco Vincenzi (@ZykeDev) #1891 - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Sergio Valqui (@svalqui) #1749 - Suresh Panneerselvam (@Amrithasuresh) #1575 - Travis Wrightsman (@twrightsman) #898 (comment) - Yanbo Ye (@lijax) #898 (comment)
This pull request addresses issue #1323
I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.
I have read the
CONTRIBUTING.rstfile and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)