TopHat installation error
2
1
Entering edit mode
7.7 years ago
salamandra ▴ 550

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 • 8.4k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

it gives the same error

ADD REPLY
0
Entering edit mode

The investigate @Wouter's suggestion below.

ADD REPLY
0
Entering edit mode

Looks like a wrong python version issue

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
5
Entering edit mode
7.7 years ago

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 COMMENT
0
Entering edit mode

.toggled status to accepted.

ADD REPLY
5
Entering edit mode
7.0 years ago
Bilal ▴ 60

edit the first line in your_tophat_directory/tophat from:

#!/usr/bin/env python

to:

#!/usr/bin/env python2

It worked for me.

ADD COMMENT
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

This works for me...thanks

ADD REPLY

Login before adding your answer.

Traffic: 1849 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