brettc / partitionfinder

PartitionFinder discovers optimal partitioning schemes for DNA sequences.
Other
60 stars 42 forks source link

Catch edge case of single partition in greedy algorithm #90

Closed biologyguy closed 8 years ago

biologyguy commented 8 years ago

The program crashed during greedy 'lumping' loop if only a single partition was present. Add an extra logical operation in 'while' test to catch this state and pass through safely.

biologyguy commented 8 years ago

I'm not familiar enough with your code to decide if this little change will have unintended consequences. Three of the test_full::test_dna tests failed on me, but they failed with or without the tweek, so as far as I can tell it's safe.

biologyguy commented 8 years ago

Apologies... I should have made this pull request on the development branch, not Main.