Question: TopHat installation error
0
gravatar for salamandra
2.6 years ago by
salamandra260
salamandra260 wrote:

I'm new to ubuntu and i am trying to install tophat-2.1.1.Linux_x86_64 in an ubuntu 16.04 LTS system.

I unpacked the binary version to the home directory, and because ~/bin is in my $PATH I did:

cd 
tar xvfz tophat-2.1.1.Linux_x86_64.tar.gz
cd ~/bin
ln -s ~/tophat-2.1.1.Linux_x86_64/tophat2

And I got the following error when type tophat2:

File "/home/tania/tophat-2.1.1.Linux_x86_64/tophat", line 1003
    except getopt.error, msg:
                       ^
SyntaxError: invalid syntax

What am I doing wrong?

tophat • 2.2k views
ADD COMMENTlink modified 23 months ago by Bilal50 • written 2.6 years ago by salamandra260

Try tophat2 -h. (or -help) It is expecting you to provide some input.

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by genomax75k

it gives the same error

ADD REPLYlink written 2.6 years ago by salamandra260

The investigate @Wouter's suggestion below.

ADD REPLYlink written 2.6 years ago by genomax75k

Looks like a wrong python version issue

ADD REPLYlink written 2.6 years ago by WouterDeCoster42k

to use tophat Python version 2.6 or higher is required, and mine is Python 3.5.2, so it isn't cause of that

ADD REPLYlink written 2.6 years ago by salamandra260
1

See http://seqanswers.com/forums/showthread.php?t=17514

ADD REPLYlink written 2.6 years ago by WouterDeCoster42k

Oh and stop using tophat for new projects, it's deprecated

ADD REPLYlink written 2.6 years ago by WouterDeCoster42k
4
gravatar for Devon Ryan
2.6 years ago by
Devon Ryan93k
Freiburg, Germany
Devon Ryan93k wrote:

You're using python3, which won't work for tophat2 (or bowtie2). Anyway, there's no reason to ever use tophat2 for new analyses. Use STAR or BBmap.

ADD COMMENTlink written 2.6 years ago by Devon Ryan93k

.toggled status to accepted.

ADD REPLYlink written 2.6 years ago by WouterDeCoster42k
4
gravatar for Bilal
23 months ago by
Bilal50
Bilal50 wrote:

edit the first line in your_tophat_directory/tophat from:

#!/usr/bin/env python

to:

#!/usr/bin/env python2

It worked for me.

ADD COMMENTlink written 23 months ago by Bilal50

Thanks, this worked for me. I know tophat hasn't been updated since 2016, but some pipelines still use it.

ADD REPLYlink written 12 weeks ago by alex.v.nesta10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1352 users visited in the last hour