miRTop / mirtop

command lines tool to annotate miRNAs with a standard mirna/isomir naming
https://mirtop.readthedocs.org
MIT License
18 stars 21 forks source link

Error in the convertion of the gff files #67

Closed anna687 closed 4 years ago

anna687 commented 4 years ago

Expected behavior and actual behavior

I am using the export function to obtain isomiRs compatible files from some gff files, but there seems to be a parsing error.

Traceback (most recent call last):
  File "/share/tools/miRge2/bin/mirtop", line 8, in <module>
    sys.exit(main())
  File "/share/tools/miRge2/lib/python2.7/site-packages/mirtop/command_line.py", line 45, in main
    export(kwargs["args"])
  File "/share/tools/miRge2/lib/python2.7/site-packages/mirtop/exporter/__init__.py", line 11, in export
    isomirs.convert(args)
  File "/share/tools/miRge2/lib/python2.7/site-packages/mirtop/exporter/isomirs.py", line 35, in convert
    _convert_file(gff, args)
  File "/share/tools/miRge2/lib/python2.7/site-packages/mirtop/exporter/isomirs.py", line 80, in _convert_file
    if mirna not in matures[parent]:
TypeError: 'NoneType' object has no attribute '__getitem__'

Going through the python files I cannot precisely localize the reason of this error, but I think it could be in classgff.py

Steps to reproduce the problem

I only used the command mirtop export *.gff - out --format isomir --hairpin hairpin.fa All the gff files and hairpin.fa are in the working directory. The gff files were obtained with miRge 2.0 and do in fact contain a "parent" for each line.

Specifications

I am using miRTop 0.4.23 on Ubuntu 18.04

Thanks

lpantano commented 4 years ago

Hi,

sorry about the issue. Can you give me a little more information about what are the GFF files? where they come from?

As well, beside the hairpin.fa, you need the GFF3 from miRBase that match the hairpin file. Can you give me the full command line, and if you can share one input file and the hairpin and GFF3 file I can try to reproduce.

Thanks

anna687 commented 4 years ago

Thank you for your quick answer I couldn't attach the files to the comment so I sent you an email

lpantano commented 4 years ago

Thanks for the files. How did you get the example.gff file? If it was with mirge, and they didn't update the version to the lates, maybe you could try: mirtop update to update the file to the latest gff version. Let me know what happens.

anna687 commented 4 years ago

Yes, the files were from mirge, but I believe I was trying to convert the wrong ones. Thank you for your patience and sorry for the inconvenience.