GFF3toolkit icon indicating copy to clipboard operation
GFF3toolkit copied to clipboard

gff3_merge iteritems error

Open chklopp opened this issue 3 years ago • 3 comments

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.

chklopp avatar Apr 14 '21 08:04 chklopp

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?

mpoelchau avatar Apr 15 '21 15:04 mpoelchau

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

chklopp avatar Apr 16 '21 10:04 chklopp

Fixed via #111 . Thanks for reporting @chklopp.

ShangYuChiang avatar Apr 21 '21 16:04 ShangYuChiang