This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem Running Bowtie2-build from Rstudio

I am trying to run an alignment using Bowtie2 from Rstudio and following the systemPipeR workflow. Though, after installing Bowtie2 and hisat2 I am unable to run the tools and I get the following error message in Rstudio

*`

sh: 1: bowtie2-build: not found
Warning message:
In system("bowtie2-build ./data/tair10.fasta ./data/tair10.fasta") :
  error in running command

`* Is there any way by which I could be able to run it from Rstudio ?? I have added the tools to my PATH variables also. Is there any specific way to add the PATH variable to environment as I have tried in various ways?? Any answers will be very helpful!

systempiper bowtie-2 rna-seq

You add the PATH to ~/.bashrc or ~/.bash_profile like PATH=$PATH:/path/to/folder (only the path to the folder, not the executable itself), and then run source ~/.bashrc or source ~/.bash_profile. From there on, you should be able to call the executable. Did you do that?

Yes I did that as suggested by you but the error is still same. I am giving PATH to The unzipped folder where all executable are there. Am I doing something wrong?? Do I need to change something in Rstudio also??

Please post the commands you used.

I added the following lines to my ~/.bashrc file.

export PATH=$PATH:/home/rna/tool/bowtie2-2.3.4.3
export PATH=$PATH:/home/rna/tool/hisat2-2.1.0

Also when I check for Bowtie2 and hisat2 from terminal it gives the following, *

$bowtie2
    No index, query, or output file specified!
    Bowtie 2 version 2.3.4.3 by Ben Langmead (langmea@cs.jhu.edu, www.cs.jhu.edu/~langmea)

*

I tried to install Bowtie2 by Bioconda also so it shows the following when I run which bowtie2

*$which bowtie2
/home/rna/anaconda3/bin/bowtie2*

Are you sure you want to run bowtie from RStudio? Wouldn't be simpler to run from the command-line?

I don't want to run bowtie from Rstudio but did it as an alternative. I want to run from command line more specificaly from the systemPipeR workflow.

Change the call to the bowtie2-build executable, from:

system("bowtie2-build ./data/tair10.fasta ./data/tair10.fasta")

To:

system("/home/rna/tool/bowtie2-2.3.4.3/bowtie2-build ./data/tair10.fasta ./data/tair10.fasta")

You will have to do this to every software call. Probably, if you read systemPipeR documentation carefully, it should tell how to set PATHs. From my quick glance, it likes using the modules system, but it should have documentation on alternatives.

0 answers

No answers yet.

Log in to answer this question.