2
0
Entering edit mode
7 weeks ago
a_bis ▴ 20

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

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 • 341 views
2
Entering edit mode
7 weeks 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

0
Entering edit mode

Thank you very much, that was exactly the problem!

1
Entering edit mode
7 weeks 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

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.