sanger-tol / PretextView

OpenGL Powered Pretext Contact Map Viewer
Other
27 stars 7 forks source link

Correct list references to always use positive indexing. #23

Open brantfaircloth opened 4 months ago

brantfaircloth commented 4 months ago

Howdy,

I was using PretextView to correct some scaffolds, and I noticed upon correcting and "painting" a handful of scaffolds and exported the AGP file, the AGPCorrect.py script was failing when run against that AGP file. That failure was due to the fact that AGPCorrect.py was using negative list indexing... and when you add more columns (during correction), the negative indexes point to the wrong places.

I think the following corrects that error by switching the negative indexes to positive ones. There are some scaffolds that get "out-of-order" in the AGP, as well, but that seems to be how PretextView exports them (and all scaffolds/contigs are accounted for in the output - some are just slightly out-of-order).

brantfaircloth commented 4 months ago

Ha! Just noticed that this recapitulates most of what is in #22, although these changes don't appear to be integrated to the main branch (i,e., the problem still exists).