Question: Problem Running Bowtie2-build from Rstudio
0
gravatar for rj.innet
5 months ago by
rj.innet0
rj.innet0 wrote:

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!

rna-seq systempiper bowtie-2 • 362 views
ADD COMMENTlink written 5 months ago by rj.innet0
1

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

ADD REPLYlink written 5 months ago by h.mon24k

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.

ADD REPLYlink written 5 months ago by rj.innet0

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.

ADD REPLYlink written 5 months ago by h.mon24k

Thank you very much!

ADD REPLYlink written 5 months ago by rj.innet0

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?

ADD REPLYlink modified 5 months ago • written 5 months ago by ATpoint14k

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??

ADD REPLYlink written 5 months ago by rj.innet0
1

Please post the commands you used.

ADD REPLYlink written 5 months ago by ATpoint14k

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*
ADD REPLYlink written 5 months ago by rj.innet0
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: 895 users visited in the last hour