NAL-i5K / GFF3toolkit

Python programs for processing GFF3 files
Other
95 stars 27 forks source link

gff3_QC error #137

Open Ziwei-Liu opened 6 months ago

Ziwei-Liu commented 6 months ago

Hi team,

I just found this tool during my search for a tool fixing my gff file. However, error happens when I am trying to fix CDS phases. Do you have any idea how to mitigate this? Any help would be greatly appreciated!

My command: gff3_QC -g Lvan.LG.deduplication.gff3 -f Lvan.genome.fasta -i -o report.txt -s statistic.txt

The error message:

INFO     Checking gff file (Lvan.LG.deduplication.gff3)...
INFO     Checking genome fasta (Lvan.genome.fasta)...
INFO     Reading gff files: (Lvan.LG.deduplication.gff3)...

INFO     Checking errors in the gff files: (Lvan.LG.deduplication.gff3)...

Traceback (most recent call last):
  File "/media/hjg-r940/data/local/conda/miniconda3/envs/gff3toolkit/bin/gff3_QC", line 8, in <module>
    sys.exit(script_main())
  File "/media/hjg-r940/data/local/conda/miniconda3/envs/gff3toolkit/lib/python3.7/site-packages/gff3tool/bin/gff3_QC.py", line 86, in script_main
    gff3.check_phase(args.initial_phase)
  File "/media/hjg-r940/data/local/conda/miniconda3/envs/gff3toolkit/lib/python3.7/site-packages/gff3tool/lib/gff3/gff3.py", line 293, in check_phase
    self.add_line_error(cds_list[0], {'message': '{0:s} {1:d}, should be {2:d}'.format(ERROR_INFO['Ema0006'], cds_list[0]['phase'], 0), 'error_type': 'PHASE', 'eCode': 'Ema0006', 'error_level': 'Info'}, log_level=logging.INFO)
ValueError: Unknown format code 'd' for object of type 'str'
Ziwei-Liu commented 6 months ago

I found that if i run my command without -i option then it works properlly:

gff3_QC -g Lvan.LG.deduplication.gff3 -f Lvan.genome.fasta -o report.txt -s statistic.txt

But it is neccesary for me to check whether my initial CDS starts with phase 0 properlly, so the -i option is inevitable to me.

mpoelchau commented 6 months ago

@Ziwei-Liu sorry you're having trouble with the -i option. Are you able to share your gff3 and fasta (or a subset)? That would help me debug. Let me know if that's possible and I can send you an email address.

Ziwei-Liu commented 5 months ago

@mpoelchau OK, I can send you my fasta and gff3 file. Please tell me your email address.