deseq2.r command not found
2
0
Entering edit mode
3.1 years ago
a_bis ▴ 40

Hi, I'm following the tutorial to RNA-seq instructions in the biostars handbook and I've reached the stage in section I.6 "The differential expression" where I am downloading deseq2.r and running it. I ran curl http://data.biostarhandbook.com/books/rnaseq/code/deseq2.r > ~/bin/deseq2.r, made it executable chmod +x ~/bin/*.r, activated the stats environment conda activate stats and then ran deseq2.r to see if it works. However, instead of getting the error message that the handbook says I should expect:

Error: The experimental design must be specified as NxM Execution halted

, I am instead getting

-bash: deseq2.r: command not found.

As expected, when I later try to use deseq2.r to perform a differential analysis, I get the same error message about the command not being found.

Does anybody have any advice on why this might be happening? Thanks in advance!

rna-seq deseq2 • 1.5k views
ADD COMMENT
2
Entering edit mode
3.1 years ago

deseq2.r was written to automatically run through R, the first line of it is:

#!/usr/bin/env Rscript --vanilla

this means that normally it finds the installed R and executes correctly.

Here the problem is that your PATH variable has not set correctly, the ~/bin folder has not been added to the path as indicated in the chapter that talks about computer setup. Note how the minimal recommended bashrc contains adds ~/bin to the PATH

http://data.biostarhandbook.com/install/bashrc.txt

The solution is to either update your .bashrc or, a simpler solution is to run the script with its full path

~/bin/deseq2.r 
ADD COMMENT
0
Entering edit mode

Thank you very much, that was exactly the problem!

ADD REPLY
1
Entering edit mode
3.1 years ago

deseq2.r is a script that needs to be run within R

You need to install R and a GUI such as RStudio. Then, you load deseq2.r into it

ADD COMMENT
0
Entering edit mode

Thank you very much. I was trying to run R through the command line but I will also try running it through Rstudio.

ADD REPLY

Login before adding your answer.

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