trvrb / antigen

Simulating virus evolution and epidemiology
http://bedford.io/projects/antigen/
20 stars 8 forks source link

Reimplemented commonAncestor() to work when MRCA is ur-virus #20

Closed edbaskerville closed 9 years ago

edbaskerville commented 9 years ago

The commonAncestor() method of the Virus class returned null if the MRCA was the ur-virus, since the final if statement would get triggered and break out of the loop before the ancestry set had a chance to get checked. This would trigger a null pointer exception during tree re-rooting if the root of the tree was the ur-virus.

trvrb commented 9 years ago

@edbaskerville ---

Thanks for the pull request. I'm glad you caught this. Feels like this is how scientific software is supposed to work.