funannotate icon indicating copy to clipboard operation
funannotate copied to clipboard

UnboundLocalError: local variable 'values1' referenced before assignment

Open bgruening opened this issue 2 years ago • 4 comments

Hi,

we got the following traceback with one of our runs.

Traceback (most recent call last):
  File "/usr/local/tools/_conda/envs/[email protected]/bin/funannotate", line 10, in <module>
    sys.exit(main())
  File "/usr/local/tools/_conda/envs/[email protected]/lib/python3.8/site-packages/funannotate/funannotate.py", line 716, in main
    mod.main(arguments)
  File "/usr/local/tools/_conda/envs/[email protected]/lib/python3.8/site-packages/funannotate/predict.py", line 2074, in main
    lib.trainAugustus(
  File "/usr/local/tools/_conda/envs/[email protected]/lib/python3.8/site-packages/funannotate/library.py", line 10942, in trainAugustus
    train_results = getTrainResults(
  File "/usr/local/tools/_conda/envs/[email protected]/lib/python3.8/site-packages/funannotate/library.py", line 10679, in getTrainResults
    float(values1[1]),
UnboundLocalError: local variable 'values1' referenced before assignment

bgruening avatar Nov 18 '23 12:11 bgruening

Looks like augustus training failed, not exactly sure why from the error here. Is there any information in the outdir/logfiles/augustus_training.log?

nextgenusfs avatar Nov 18 '23 18:11 nextgenusfs

I see a similiar error, it looks like there are issues with exon coordinates during augustus training (the log is longer, the issues occurs with 100s of exons):

Will create parameters for a EUKARYOTIC species!
creating directory /../funannotate/predict_misc/ab_initio_parameters/augustus/species/saccharomyces_uvarum_zp964/ ...
creating /../funannotate/predict_misc/ab_initio_parameters/augustus/species/saccharomyces_uvarum_zp964/saccharomyces_uvarum_zp964_parameters.cfg ...
creating /../funannotate/predict_misc/ab_initio_parameters/augustus/species/saccharomyces_uvarum_zp964/saccharomyces_uvarum_zp964_weightmatrix.txt ...
creating /../funannotate/predict_misc/ab_initio_parameters/augustus/species/saccharomyces_uvarum_zp964/saccharomyces_uvarum_zp964_metapars.cfg ...
The necessary files for training saccharomyces_uvarum_zp964 have been created.
Now, either run etraining or optimize_parameters.pl with --species=saccharomyces_uvarum_zp964.
etraining quickly estimates the parameters from a file with training genes.
optimize_augustus.pl alternates running etraining and augustus to find optimal metaparameters.

Error: In sequence scaffold_1_63445-70692: One CDS exon does not begin properly after the previous CDS exon.602 >= 600
GBProcessor::getGeneList(): Intron has non-positive length.
Encountered error after reading 0 annotations.
Error: In sequence scaffold_1_92820-94373: One CDS exon does not begin properly after the previous CDS exon.602 >= 600
GBProcessor::getGeneList(): Intron has non-positive length.
Encountered error after reading 0 annotations.
Error: In sequence scaffold_1_137998-140189: One CDS exon does not begin properly after the previous CDS exon.1591 >= 1589
GBProcessor::getGeneList(): Intron has non-positive length.
Encountered error after reading 0 annotations.

aforestsomewhere avatar Jul 29 '24 13:07 aforestsomewhere