Skip to content

Treeconstructor methods - #292

Closed
jwillis0720 wants to merge 7 commits into
biopython:masterfrom
jwillis0720:treeconstructor_methods
Closed

jwillis0720 wants to merge 7 commits into
biopython:masterfrom
jwillis0720:treeconstructor_methods

Conversation

@jwillis0720

Copy link
Copy Markdown

Adding methods to tree constructor to work with phylip packages for neighbor joining that suffers from speed. Also converting to PIP8 standards.

willisjr and others added 5 commits February 18, 2014 19:50
…e built in neighbor joining method works great but it suffers from speed. The phylip package can output a newick tree rapidly. For large trees, the distance matrix is difficult to format for phylip.
@jwillis0720

Copy link
Copy Markdown
Author

I don't understand why it's failing...when I run the tests locally test_KEGG passes. I'm sorry I stopped paying attention, but will be doing a lot of phylo over the next few..years...

@peterjc

peterjc commented Nov 11, 2014

Copy link
Copy Markdown
Member

In general doing merges on pull requests just confuses things. The KEGG test failing was my fault, and nothing to do with your code - it should be fixed again with 2f5ea19

@peterjc

peterjc commented Nov 11, 2014

Copy link
Copy Markdown
Member

Looking at your convert_distance_matrix method, I wouldn't take an output filename. Rather I might take a handle, or simply return the matrix as a string? This would allow other uses (e.g. piping the matrix to stdin of a command line tool, or whatever).

@jwillis0720

Copy link
Copy Markdown
Author

yes that sounds good.

On Nov 10, 2014, at 7:59 PM, Peter Cock <[email protected]mailto:[email protected]> wrote:

Looking at your convert_distance_matrix method, I wouldn't take an output filename. Rather I might take a handle, or simply return the matrix as a string? This would allow other uses (e.g. piping the matrix to stdin of a command line tool, or whatever).

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/292#issuecomment-62498899.

@peterjc

peterjc commented Apr 11, 2017

Copy link
Copy Markdown
Member

Sorry, it looks like we forgot about this pull request. Rebasing looks a bit tedious, so copying the proposed new convert_distance_matrix method looks easier.

@lijax, @JoaoRodrigues - what do you think?

@etal

etal commented Apr 11, 2017

Copy link
Copy Markdown
Contributor

Just copying the convert_distance_matrix method sounds good to me. I'm not sure why it's associated with the DistanceCalculator class instead of _DistanceMatrix -- it doesn't use self, but it does require a _DistanceMatrix instance. Maybe it would be best to copy it into the _DistanceMatrix class definition instead.

An example of Phylip's input format is given in the documentation for the neighbor program. That page says several Phylip programs take that input format, and they are listed here.

Since this format is a fairly general and human-readable table (though columns are not necessarily aligned prettily in this implementation), it could even be used as the __str__ method -- or format, format_phylip, or to_phylip to reserve the option for another human-readable string representation. (But note that the original use case for this was for huge distance matrices.)

Potential enhancement: It looks like the format allows multiple spaces between values in the table, so aligned columns would be OK: ljust the taxon names in the first column to the width of the longest name, and use a float format of %.6f or so for the numeric values.

@peterjc

peterjc commented Apr 11, 2017

Copy link
Copy Markdown
Member

@jwillis0720 Are you happy to dual licence your contributions under both the Biopython License Agreement AND the BSD 3-Clause License? See #898.

Also, are you happy to be thanked by name in the NEWS.rst and CONTRIB.rst files?

@etal Can I leave this with you please?

@jwillis0720

jwillis0720 commented Apr 11, 2017 via email

Copy link
Copy Markdown
Author

@etal

etal commented Apr 13, 2017

Copy link
Copy Markdown
Contributor

OK, I think I can take care of this next week.

@etal etal closed this in 27cbe4a Jul 4, 2017
MarkusPiotrowski pushed a commit to MarkusPiotrowski/biopython that referenced this pull request Oct 31, 2017
MarkusPiotrowski pushed a commit to MarkusPiotrowski/biopython that referenced this pull request Oct 31, 2017
@peterjc

peterjc commented Aug 30, 2019

Copy link
Copy Markdown
Member

@jwillis0720 would you agree to dual license your Biopython contributions as discussed on #898 so we can switch to the standard 3-clause BSD license?

peterjc added a commit to peterjc/biopython that referenced this pull request Nov 1, 2019
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)
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 29, 2019
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)
peterjc added a commit that referenced this pull request Dec 3, 2019
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants