rvosa / bio-phylo

Bio::Phylo - Phyloinformatic analysis using Perl
http://search.cpan.org/dist/Bio-Phylo
GNU General Public License v3.0
16 stars 6 forks source link

Pruning without removing nodes with single child that were already in tree #11

Closed fangly closed 11 years ago

fangly commented 11 years ago

Hi Rutger, The code for keep_tips() removes unwanted tips and goes the extra mile to also remove nodes that have a single child. In a case I had, my tree contained some nodes with single children, prior to pruning. I pruned some tips and my nodes with single child were removed, even though their child was not affected by the pruning operation. So, here is a pull request containing code to preserve nodes with single child that were already present in tree. The test suite was updated and all tests pass. Cheers, Florent