Question: Tophat not installing with Biostar Handbook
1
gravatar for k.e.pendleton
12 months ago by
k.e.pendleton20 wrote:

I'm working from the Biostar Handbook and trying to do the alignment with tophat. I'm on page 480 for reference.

I was able to successfully run

$ bowtie2-build $REF $IDX

However, then it says that I need to change the invocation of the aligner to

$ tophat -G $GTF -o tophat_hbr1 $IDX $R1 $R2
bash: /usr/bin/tophat: No such file or directory
(bioinfo)

And that's my output. If I do which tophat, nothing comes up, so it seems like it's just not there. So, I tried to install tophat with

$ conda install tophat
Fetching package metadata .................
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - python 3.6*
  - tophat -> python 2.7*
Use "conda info <package>" to see the dependencies for each package.

(bioinfo)

I saw some solutions online for changing a line of code in tophat to do this, but I don't even know where that file is. I can downgrade python, but I'm not sure if that will work, and I'm worried that I'll break other things if I do. Also, when I do

$ ls /usr/bin | grep python
dh_python2
dh_python3
python
python-config
python2
python2-config
python2.7
python2.7-config
python3
python3.4
python3.4m
python3m
x86_64-linux-gnu-python-config
x86_64-linux-gnu-python2.7-config
(bioinfo) 
moltres@moltres-ao ~/biostar/Sequencing/griffith
$ python -V
Python 3.6.3
(bioinfo)

I see a bunch of different python versions, and I'm not sure if I should switch between them or what.

I'm a little frustrated because I bought this book because I'm a beginner, but I keep running into errors that are over my head. I'd really appreciate help here.

ADD COMMENTlink modified 12 months ago by h.mon24k • written 12 months ago by k.e.pendleton20
2

Authors of Tophat paper recommend not to use the software anymore.

ADD REPLYlink written 12 months ago by Chirag Nepal2.2k

That's cool. If I were doing real analysis, that would matter. I'm just trying to learn basics and follow the book. Thanks for the input, though.

ADD REPLYlink written 12 months ago by k.e.pendleton20
2

As you can see above TopHat requires python v.2.x (and won't run properly with python v.2.x). Your default python is the latest v.3.6.

I am going to suggest that you try the solution given in this thread for now: A: Tophat2 shows error during running (> in the thread is the system prompt so that should be $ for you).

Tagging Istvan Albert to make him aware of this hurdle for new users.

ADD REPLYlink modified 12 months ago • written 12 months ago by genomax65k
2
gravatar for h.mon
12 months ago by
h.mon24k
Brazil
h.mon24k wrote:

Create a new environment for Tophat:

conda create -n tophat2 tophat2

should create a new environment and install Tophat2 and its correct dependencies.

ADD COMMENTlink written 12 months ago by h.mon24k
1

i guess you can add python version as well in conda environment (for eg. python=2.7 )

ADD REPLYlink written 12 months ago by cpad011211k

This is correct. Also, I didn't realize that there's a GitHub page especially for the book, so I'll try to target that instead if I think it's a book specific issue. I had also posted the question there since I thought it might be more appropriate, and I essentially got the same response.

https://github.com/biostars/biostar-handbook-issues/issues/37

Thank you for your help!

ADD REPLYlink written 12 months ago by k.e.pendleton20
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: 666 users visited in the last hour