nextgenusfs / funannotate

Eukaryotic Genome Annotation Pipeline
http://funannotate.readthedocs.io
BSD 2-Clause "Simplified" License
300 stars 82 forks source link

Update funannotate-p2g.py for contig_expand to use int #1023

Open photocyte opened 2 months ago

photocyte commented 2 months ago

Mea culpa, I didn't actually test my previous PR until just now, and immediately ran into this rookie mistake. This PR fixes it.

I've also run into some other bugs in funannotate-p2g.py with issues if you have a colon : in the FASTA record id for the protein queries. Will try to work on a PR to report / correct for that edge case as well.

Can I get a brief pointer on how you are implemented tests in this repo? I've never actually done tests, but, figure it is time to learn as formal unit tests would have caught my rookie mistake :)

conda_env_linux-64/lib/python3.9/site-packages/funannotate/aux_scripts/funannotate-p2g.py", line 309, in <module>
    start = x[1] - args.contig_expand
TypeError: unsupported operand type(s) for -: 'int' and 'str'