NAL-i5K / GFF3toolkit

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

gff3_merge iteritems error #110

Open chklopp opened 3 years ago

chklopp commented 3 years ago

When I run gff3_merge I get the following error

Traceback (most recent call last): File "/tools/python/3.6.3/bin/gff3_merge", line 8, in sys.exit(script_main()) File "/tools/python/3.6.3/lib/python3.6/site-packages/gff3tool/bin/gff3_merge.py", line 229, in script_main main(args.gff_file1, args.gff_file2, args.fasta, report_fh, args.output_gff, args.all, args.auto_assignment, args.user_defined_file1, args.user_defined_file2, logger=logger_stderr) File "/tools/python/3.6.3/lib/python3.6/site-packages/gff3tool/bin/gff3_merge.py", line 85, in main gff3_merge.merge.main(autoReviseGff, gff_file2, output_gff, report, user_defined1, user_defined2, logger) File "/tools/python/3.6.3/lib/python3.6/site-packages/gff3tool/lib/gff3_merge/merge.py", line 22, in main gff3_sort.main(gff_file1, output='WA_sorted.gff', logger=logger) File "/tools/python/3.6.3/lib/python3.6/site-packages/gff3tool/bin/gff3_sort.py", line 279, in main report.write(TwoParent(child['attributes']['ID'],exon)) File "/tools/python/3.6.3/lib/python3.6/site-packages/gff3tool/bin/gff3_sort.py", line 138, in TwoParent attributes_line = ";".join("=".join((str(k),str(v))) for k,v in attributes.iteritems()) AttributeError: 'dict' object has no attribute 'iteritems'

There seems to be a python2 syntax used in the gff3_sort.py script.

mpoelchau commented 3 years ago

Thanks for the bug report, @chklopp ! We'll look into this in the next couple of days. In the meantime, would you be willing to share the datasets/command you used so we can make sure we can reproduce the error?

chklopp commented 3 years ago

We have replaced iteritems by items in the code and it worked.

Here is a link a data subset including fasta and both gff files : http://genoweb.toulouse.inra.fr/~klopp/tmp/chr1.tgz and the command line gff3_merge -g2 maker_root_stem_leaf.chr1.gff -g1 Pvul.07092020.chr1.gff3 -f Eukaryota.dna.masked.chr1.fa -og EuGene_all_maker_root_stem_leaf.chr1.gff

ShangYuChiang commented 3 years ago

Fixed via #111 . Thanks for reporting @chklopp.