funannotate icon indicating copy to clipboard operation
funannotate copied to clipboard

How to fix a local variable in gff3

Open yumi-nakadera opened this issue 1 year ago • 4 comments

Are you using the latest release? 1.8.15+galaxy5, 1.8.17 (locally installed)

Describe the bug I have been trying to run funannotate to make a consolidated annotation report based on the outputs of eggNOG-mapper and InterProscan. However, I believe the some format of gff3 file is not proper?, and got the error listed below. For the genome annotation file, I just downloaded the gff file, and converted it to gff3. I very much appreciate if you could give me advice on this issue.

What command did you issue? funannotate annotate --gff ../genome/L_stagnalis.annot_v2.gff3 --fasta ../genome/Lymnaea_stagnalis_v1.0.fa --eggnog ../eggNOG/target.sfp_eggnog.emapper.annotations --iprscan ../InterPro/output/target_sfp.fasta.xml --species "Lymnaea stagnalis" --out outdir

Logfiles [May 21 12:15 PM]: OS: Debian GNU/Linux 10, 125 cores, ~ 438 GB RAM. Python: 3.8.15 [May 21 12:15 PM]: Running 1.8.15 [May 21 12:15 PM]: No NCBI SBT file given, will use default, however if you plan to submit to NCBI, create one and pass it here '--sbt' [May 21 12:15 PM]: Parsing annotation and preparing annotation files. [May 21 12:15 PM]: Found 22,499 gene models from GFF3 annotation Index Error retriving transcript 0: (nbisL1-mrna-1, {'name': 'GSLYST00000001001', 'type': 'transcript', 'transcript': [], 'cds_transcript': [], 'protein': [], '5UTR': [[(1456, 1506)]], '3UTR': [[]], 'gene_synonym': [], 'codon_start': [[]], 'ids': ['GSLYST00000001001'], 'CDS': [[(242, 465), (906, 1455)]], 'mRNA': [[(242, 465), (906, 1506)]], 'strand': '-', 'EC_number': [[]], 'location': (242, 1506), 'contig': 'Lsta_scaffold1', 'product': ['hypothetical protein'], 'source': 'Gmove', 'phase': [['?', '?']], 'db_xref': [[]], 'go_terms': [[]], 'note': [[]], 'partialStart': [False], 'partialStop': [False], 'pseudo': False}) Traceback (most recent call last): File "/usr/local/bin/funannotate", line 10, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/funannotate/funannotate.py", line 716, in main mod.main(arguments) File "/usr/local/lib/python3.8/site-packages/funannotate/annotate.py", line 698, in main GeneCounts, GeneDB = lib.convertgff2tbl( File "/usr/local/lib/python3.8/site-packages/funannotate/library.py", line 2381, in convertgff2tbl Transcript = RevComp(Transcript) UnboundLocalError: local variable 'Transcript' referenced before assignment

OS/Install Information

  • Mac, Galaxy

yumi-nakadera avatar May 21 '24 11:05 yumi-nakadera

Having the exactly same problem. More than happy to try out any advice that someone thinks might be helpful! Thank you!

tianchuw-TinaWu avatar Jul 02 '24 21:07 tianchuw-TinaWu

What was the source of the input GFF?, it is likely a formatting issue. You can try to clean it up with GFFtk sanitize.

nextgenusfs avatar Jul 02 '24 21:07 nextgenusfs

Thanks! As it was a while ago, I changed my approach to interpret the outcomes of annotation reports and it turned out very fruitful for my case. I might try cleaning it up sometime but not soon I am afraid. And I am happy to share what I did @tianchuw-TinaWu if you are interested.

yumi-nakadera avatar Jul 05 '24 07:07 yumi-nakadera

Thank you @nextgenusfs @yumi-nakadera very much for the reply!

I found the post about GFFtk sanitize. It's indeed very helpful! I've completed the funannotate-annotate process successfully thanks to all the very useful information in the community! I'm more than happy to help if you encounter any problem @yumi-nakadera

tianchuw-TinaWu avatar Jul 15 '24 14:07 tianchuw-TinaWu