This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how I can put bowtie2 with tophat2 in the path?

Hey guys,

[izadi@lbox161 ~]$ bash
[izadi@lbox161 ~]$ cd /usr/data/nfs6/izadi/gij/test_data
[izadi@lbox161 test_data]$ pwd
/usr/data/nfs6/izadi/gij/test_data
[izadi@lbox161 test_data]$ ls
reads_1.fq       test_ref.2.bt2   test_ref.fa          test_ref.rev.2.ebwt
reads_2.fq       test_ref.2.ebwt  test_ref.rev.1.bt2
test_ref.1.bt2   test_ref.3.bt2   test_ref.rev.1.ebwt
test_ref.1.ebwt  test_ref.4.bt2   test_ref.rev.2.bt2
[izadi@lbox161 test_data]$ export TOP=/usr/data/nfs6/izadi/main/tophat-2.1.0.Linux_x86_64
[izadi@lbox161 test_data]$ echo $TOP
/usr/data/nfs6/izadi/main/tophat-2.1.0.Linux_x86_64
[izadi@lbox161 test_data]$ $TOP/tophat -r 20 test_ref reads_1.fq reads_2.fq

[2015-08-31 17:07:14] Beginning TopHat run (v2.1.0)
-----------------------------------------------
[2015-08-31 17:07:14] Checking for Bowtie
  Bowtie 2 not found, checking for older version..
Error: Bowtie not found on this system.
[izadi@lbox161 test_data]$

What should I do now please? I'm exhausted, I am trying for hours

rna-seq tophat2 bowtie2

you means set the path for bowtie2?

Goutham please,

suppose you have the test data in /usr/data/nfs6/izadi/gij/test_data

bowtie2 in /usr/people/home/izadi/fereshteh/bowtie2-2.2.5

and tophat in /usr/data/nfs6/izadi/main/tophat-2.1.0.Linux_x86_64

then what I should do to run

tophat -r 20 test_ref reads_1.fq reads_2.fq

as I described above

Add bowtie2 executable to your $PATH.

how mix two paths? both bowtie2 and tophat

Fereshteh,

If you add the paths of bowtie2 and tophat2 to your $PATH then bowtie should be able to find tophat. If you are on a Unix/Linux platform you can do this by:

export PATH="$PATH:/path/to/bowtie2:/different/path/to/tophat2";

thanks genomax2 for your patience...thank you alolex

I did like so

[izadi@lbox161 ~]$ bash
[izadi@lbox161 ~]$ cd /usr/data/nfs6/izadi/gij/test_data
[izadi@lbox161 test_data]$ ls
reads_1.fq       test_ref.2.bt2   test_ref.fa          test_ref.rev.2.ebwt
reads_2.fq       test_ref.2.ebwt  test_ref.rev.1.bt2   tophat_out
test_ref.1.bt2   test_ref.3.bt2   test_ref.rev.1.ebwt
test_ref.1.ebwt  test_ref.4.bt2   test_ref.rev.2.bt2
[izadi@lbox161 test_data]$ export PATH="$PATH:/usr/people/home/izadi/fereshteh/bowtie2-2.2.5:/usr/data/nfs6/izadi/main/tophat-2.1.0.Linux_x86_64";
[izadi@lbox161 test_data]$ echo $TOP
[izadi@lbox161 test_data]$ $TOP/tophat -r 20 test_ref reads_1.fq reads_2.fq
bash: /tophat: No such file or directory
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[izadi@lbox161 test_data]$ 

what I did wrong please?

[izadi@lbox161 test_data]$ echo $TOP

This did not produce any output. Looks like $TOP got reset to null.

If your $PATH (check by echo $PATH) looks correct then just run from within test_data directory

$ tophat -r 20 test_ref reads_1.fq reads_2.fq

thank you

I could run tophat

then may you please tell me what is the further steps that someone might do using these resulted files in output?

@alolex Hi, I am working on ubuntu 16.04 and tried using your command to add tophat and bowtie to my path

$ export PATH=$PATH:$home/gjjha/Downloads/softwares/bowtie2-2.2.9/index:/home/gjjha/Downloads/softwares/tophat-2.1.1

but when I tried running tophat from a directory containing the fq files to be mapped, it says that tophat can't find the b2 index files. I have already created the index which is in the bowtie2 index directory. What am I doing wrong?

1 answer

in general for adding programs to your path, if you are on a linux system, you can modify the path of .bashrc in the home directory. For Mac, this should be .bash_profile

Add the command suggested by alolex to the end of the file, or somewhere in the middle (it doesn't really matter):

export PATH=/new/path/to/some/program:$PATH

If this is your personal computer, you can move the binaries to a folder in the path, or add links to those programs from a folder that is already in the path. You can see which folders are in your path by:

echo $PATH

Also, generally, to see if a program is in your path, or where it is, use which:

which bowtie2

Log in to answer this question.