mmcguffi / pLannotate

Webserver and command line tool for annotating engineered plasmids
GNU General Public License v3.0
97 stars 20 forks source link

annotations start one base pair too late when reverse #9

Closed dr3y closed 2 years ago

dr3y commented 2 years ago

Just installed this great software but noticed a weird problem! All my reverse annotations are starting one base pair later than they should be. reverse: image forward: image

here is an example sequence: https://gist.github.com/dr3y/b3eac9953cb4808fb875d2d273d2ebe3

dr3y commented 2 years ago

sorry accidentally closed

mmcguffi commented 2 years ago

Thanks for spotting this bug and the great example -- I fixed this bug at one point, though it looks like it slipped through somehow. I'll have it fixed in the next update.

dr3y commented 2 years ago

any hints as to where the error could be happening? I am interested in fixing it myself but I'm not familiar enough with the code yet

mmcguffi commented 2 years ago

One way of fixing this is adding an extra line or two of code to correct the positioning for reverse hits after this line:

https://github.com/barricklab/pLannotate/blob/c9ad39bb67fb0f5a4be9a27d08f02d6286ff8e66/plannotate/annotate.py#L340

This line itself is a bug -- it is not modifying the correct variable.

That said, I have a major refactor of the code that I am trying to get out soon (and a fix for this will be included), so while you are welcome to fix it locally, I likely will not accept a pull request for this bug. I very much appreciate you opening an issue though!

mmcguffi commented 2 years ago

Fixed in v1.1.0