This is a test version of Biostars. For the public version, visit https://www.biostars.org.
error in prepare annotation script DEXseq

Hi everybody, I've tried to do some DEXseq analysis in R, but first I know that I have to run some python scripts, is here when I get stuck. I'm working with mouse, and I downloaded gtf files from here and also from here, but when I run:

python R/x86_64-pc-linux-gnu-library/3.3/DEXSeq/python_scripts/dexseq_prepare_annotation.py gencode.mouse.annotation.gtf annot.mouse.DEXSeq.gff

I get this error message: F

File "/R/x86_64-pc-linux-gnu-library/3.3/DEXSeq/python_scripts/dexseq_prepare_annotation.py", line 129
    raise ValueError, "Same name found on two chromosomes: %s, %s" % ( str(l[i]), str(l[i+1]) )
                    ^
SyntaxError: invalid syntax

I know that people have the same problems sometimes, but I couldn't find a way to fix it, some suggestions? Thanks!

dexseq rnaseq ensamble gencode deu

Hi @Lila M. Were you able to rectify this error? I am also getting the same

1 answer

Hi Lila, You may change that line to this,

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

I think the reason is that this script was written in python2, you should make changes to make it compatible with python3 or run it using 2. There are also two uses of xrange that you can change them to range.

Hope this is still useful for you after 10 weeks!

Log in to answer this question.