Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gff3_merge iteritems error #110

Open
chklopp opened this issue Apr 14, 2021 · 3 comments
Open

gff3_merge iteritems error #110

chklopp opened this issue Apr 14, 2021 · 3 comments
Assignees

Comments

@chklopp
Copy link

chklopp commented Apr 14, 2021

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
Copy link
Contributor

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
Copy link
Author

chklopp commented Apr 16, 2021

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
Copy link
Contributor

Fixed via #111 . Thanks for reporting @chklopp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants