sr320 / course-fish546-2016

6 stars 5 forks source link

R kernel in Jupyter for quiz #69

Closed MeganEDuffy closed 7 years ago

MeganEDuffy commented 7 years ago

I don't use R, so there is probably an obvious problem with what I'm trying to do here... I'm trying to run the R script for the quiz in an R Jupyter notebook.

What I've done so far: I installed R and got rpy2 in this notebook. This seemed to go fine. I downloaded the Phel_countdata.txt file in another notebook.

Then I started an R notebook to run the script needed, as you can see here. But I can't get to DESeq2 to install correctly, hence this error message:

Error in find.package(package, lib.loc): there is no package called ‘DESeq2’
Traceback:

1. browseVignettes("DESeq2")
2. tools::getVignetteInfo(package, lib.loc, all)
3. find.package(package, lib.loc)
4. stop(gettextf("there is no package called %s", sQuote(pkg)), 
 .     domain = NA)

If case you don't want to follow the R nb link, a screenshot:

DESeq2 install problems

sr320 commented 7 years ago

Just to reiterate and make it clear for anyone else - using the standalone R software is preferred .

I think this is some issue with rpy2.

I suggest trying in R first, make sure it works, then if you want, you could troubleshoot (but not necessary to get it to run in Jupyter.

MeganEDuffy commented 7 years ago

I've tried running RStudio and get what I think is a similar issue. Running the first part of the script:

#Step 1: Instal DESeq2 and Load Package
source("http://bioconductor.org/biocLite.R")
biocLite("DESeq2")
browseVignettes("DESeq2")
library(DESeq2)

gives a similar error that it can't install the packages needed (XML, annotate, acepack):

Error in library(DESeq2) : there is no package called ‘DESeq2’
In addition: There were 12 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘XML’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘acepack’ had non-zero exit status
3: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘annotate’ had non-zero exit status
4: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘Hmisc’ had non-zero exit status
5: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘genefilter’ had non-zero exit status
6: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘geneplotter’ had non-zero exit status
7: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘DESeq2’ had non-zero exit status
8: In install.packages(update[instlib == l, "Package"], l,  ... :
  installation of package ‘cluster’ had non-zero exit status
9: In install.packages(update[instlib == l, "Package"], l,  ... :
  installation of package ‘maps’ had non-zero exit status
10: In install.packages(update[instlib == l, "Package"], l,  ... :
  installation of package ‘pbdZMQ’ had non-zero exit status
11: In install.packages(update[instlib == l, "Package"], l,  ... :
  installation of package ‘SparseM’ had non-zero exit status
12: In install.packages(update[instlib == l, "Package"], l,  ... :
  installation of package ‘quantreg’ had non-zero exit status
> 

I'm trying to figure out if there's some underlying issue here. I've also tried to load the rpy2 extension in Jupyter and run R like Laura did, but the cell just keeps going forever with no output. That notebook is here.

sr320 commented 7 years ago

Do you have the most recent version of R? If not download the most recent version- just open plain old R and run

source("http://bioconductor.org/biocLite.R")
biocLite("DESeq2")

and let see the output.

MeganEDuffy commented 7 years ago

I did have the latest version of R:

D-69-91-184-58:FISH-546 meganduffy$ which R
/Users/meganduffy/anaconda/bin/R
D-69-91-184-58:FISH-546 meganduffy$ R --version
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"

But I did install it with conda, and maybe that introduced some problems.

When I downloaded the same version of R manually (without conda), and run DESeq2 it's fine: plot