orthofiller icon indicating copy to clipboard operation
orthofiller copied to clipboard

Error in gff_to_gtf_safe.py

Open KScott6 opened this issue 5 years ago • 2 comments

I am experiencing an error with the gff_to_gtf_safe.py script. I am working with the gff output of the MAKER software and have successfully used clean_gff but when I try to convert to gtf using the wrapper script I get the error:

Traceback (most recent call last): File "gff_to_gtf.py", line 76, in printGTF(Transcriptdb) File "gff_to_gtf.py", line 48, in printGTF for idz, ex_cod in enumerate(exons): TypeError: iteration over a 0-d array

I get this error with all of my files and have been unable to determine the cause. I have attached one of my files for reference. How can I resolve this error? ExampleGFF.txt

KScott6 avatar Jun 03 '19 00:06 KScott6

Hi! Does the normal gff_to_gtf code (without the placeholding) work? This can be found https://toolshed.g2.bx.psu.edu/repository?repository_id=afcb6456d8e300ed.

All the wrapper does is indexes the chromosome names before converting, and then unindexes them after the conversion. This is because of a bug with gff_to_gtf that causes chromosome names of length 15 or more to be truncated.

mpdunne avatar Jun 05 '19 09:06 mpdunne

Hi, This code also does not work with an identical error report:

Traceback (most recent call last): File "gff_to_gtf.py", line 76, in printGTF(Transcriptdb) File "gff_to_gtf.py", line 48, in printGTF for idz, ex_cod in enumerate(exons): TypeError: iteration over a 0-d array

My MAKER output gff seems to be formatted in a different way than expected by the gff_to_gtf code, so I am using another workaround to convert to gtf. Thank you for your quick response!

KScott6 avatar Jun 06 '19 18:06 KScott6