having trouble with dexseq_prepare_annotation.py
1
0
Entering edit mode
@vakulmohanty-8232
Last seen 7.4 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 • 2.5k views
ADD COMMENT
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

ADD REPLY
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.

ADD REPLY
1
Entering edit mode
Alejandro Reyes ★ 1.9k
@alejandro-reyes-5124
Last seen 4 months 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

ADD COMMENT
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

ADD REPLY

Login before adding your answer.

Traffic: 887 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6