luntergroup / octopus

Bayesian haplotype-based mutation calling
MIT License
302 stars 38 forks source link

fix buffer overrun #229

Closed jbedo closed 2 years ago

jbedo commented 2 years ago

Resolves #228.

Tested an error is thrown now rather than segfaulting:


[2022-01-20 02:08:17] <EROR>     In sample l-ovary, calls at chr10:133069535-133069536 &
[2022-01-20 02:08:17] <EROR>     chr10:133069535-133069538 were called in the same phase set but have
[2022-01-20 02:08:17] <EROR>     different genotype ploidies (2 & 3).
```
jbedo commented 2 years ago

In retrospect I think it's better to more explicitly check ploidy higher up in the loops, as this can miss some edge cases. I'll test this and update.

dancooke commented 2 years ago

Thanks for the PR - particularly in this especially gnarly section of the codebase - and sorry for the slow response.