Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version conflicts in running F1000 Workflow #545

Closed
abalter opened this issue Aug 17, 2018 · 5 comments
Closed

Version conflicts in running F1000 Workflow #545

abalter opened this issue Aug 17, 2018 · 5 comments

Comments

@abalter
Copy link

abalter commented Aug 17, 2018

This may just indicate my R ignorance, but there are packages in that workflow that only build with R≥3.5.0 (for example phyloseqGraphTest)and ones that only build for lower R versions, such as structSSI, R≤ 3.4.4.

How does one create an environment to run the workflow?

Perhaps you could create a packrat or (better yet) conda environment.

@spholmes
Copy link
Collaborator

spholmes commented Aug 17, 2018 via email

@abalter
Copy link
Author

abalter commented Aug 20, 2018

@spholmes -- I was able to fix things eventually by going outside R and installing some additional linux libraries. But I'll still see if I can come up with a working example showing the kinds of conflicts I was running into.

However, have you had any success setting up the environment using Conda?

lab@conda-test:~$ conda create -n r35 r-base=3.5 bioconductor-dada2
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - bioconductor-dada2 -> bioconductor-biostrings[version='>=2.32.1'] -> bioconductor-biocgenerics[version='>=0.15.6'] -> r=3.3.1 -> r-base==3.3.1
  - r-base=3.5
Use "conda info <package>" to see the dependencies for each package.

I set my channels as per the bioconda docs:

lab@conda-test:~$ cat .condarc
channels:
  - bioconda
  - conda-forge
  - defaults

@spholmes
Copy link
Collaborator

spholmes commented Aug 20, 2018 via email

@abalter
Copy link
Author

abalter commented Aug 20, 2018

Yes--having them in sync would be a great help to the community. I've never had trouble with using conda as my master tool except with Bioconductor packages.

@abalter
Copy link
Author

abalter commented Aug 27, 2018

I did come up with a reproducible installation using conda. It requires an older version of R, but everything else is more or less up to date, and DADA2 is at the latest.

1. Set the channels

First of all, you need to set the channels like this, which is different than the order bioconda recommends:

.condarc

channels:
  - conda-forge
  - bioconda
  - defaults

Note, that if you don't want this as your default .condarc, you can put it inside the environment folder as an override.

2. Create the environment and activate it

conda create -n dada2
conda activate dada2

At this point, you can put the above .condarc in <path to conda>/envs/dada2.

3. Install the packages:

conda install r-knitr r-rmarkdown r-ggplot2 r-gridextra r-nlme r-data.table r-dplyr krb5 curl libssh2 zlib bioconductor-dada2

4. Reinstall krb5

conda install krb5   

There seems to be a glitch in the way conda relates to krb5. You can create a circular situation where updating the environment downgrades krb5, and then conda install krb5 upgrades it. For DADA2 to load correctly, krb5 needs to be in the upgraded state.

5. Usage:

RStudio Desktop loaded from command line.

For this I activate the dada2 environment and then start RStudio at the command line. Seems to work seamlessly.

RStudio Server

I had to do a little trickery still for this to work:

  1. At the command line activate the dada2 environment and then library(dada2). You get a message that Rcpp is loading, and then a warning that it was built under a different version of R. Then you can close R.
  2. In RStudio Server set .libPaths('<path to conda>/envs/dada2/lib/R/library'). I tried putting this in my .Rprofile, but it did not seem to work.
  3. Then you can library(dada2) without Rcpp loading or the warning message and proceed happily onward.

RStudio Desktop not loaded from command line

I have actually not tested this. However, I would guess you would follow the same procedure as for RStudio Server.

I hope this is all helpful

I also hope down the road this becomes easier!

@benjjneb benjjneb reopened this Aug 27, 2018
@benjjneb benjjneb closed this as completed Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants