having trouble with dexseq_prepare_annotation.py
1
0
Entering edit mode
@vakulmohanty-8232
Last seen 4.2 years ago
United States

I'm running dexseq_prepare_annotation.py on ENSEMBL GTF (I have tried gtf files from a couple of releases) files and have the following error.

File "dexseq_prepare_annotation.p", line 129

raise ValueError, "Same name found on two chromosomes: %s, %s" % ( str(l[i]), str(l[i+1]) )

SyntaxError: invalid syntax

<font face="monospace">I'm not particularly familiar with python and will be grateful for any pointers on how to deal with this problem.</font>

Thanking You,

Vakul

dexseq gtf • 1.4k views
1
Entering edit mode

Hi,

I changed the script to:

raise ValueError ("Same name found on two chromosomes: %s, %s") % ( str(l[i]), str(l[i+1]) )

and it did the trick in my case (at least for this particular syntax error). I would guess that this is a python 2/python 3 issue. I hope that I made a good choice :D

1
Entering edit mode

worked for me too, thx & dzięki! To adapt to python3, you need also replace xrange with range around those lines.

1
Entering edit mode
Alejandro Reyes ★ 1.8k
@alejandro-reyes-5124
Last seen 1 day ago
Novartis Institutes for BioMedical Rese…

Hi Vakul,

The error message is indicating that the same gene id was found in two different chromosomes. Did you check if this was the case in your gtf file?

Alejandro

0
Entering edit mode

Hi Alejandro,

I look up the GTF file it had no repeats. I however got the script to work when I switched platforms from windows to linux. Thanks you for the help.

Vakul