morinlab / GAMBLR

Set of standardized functions to operate with genomic data
https://morinlab.github.io/GAMBLR/
MIT License
3 stars 2 forks source link

Handling of dependencies #155

Closed Kdreval closed 1 year ago

Kdreval commented 1 year ago

Currently not all the dependencies are auto-installed and the devtools::document() does not make package aware of the new dependencies once they are added. This already came up in few recent issues, like #152 and #154 . One way to handle this is through specifying the correct fields in the DESCRIPTION file. Most of GAMBLR dependencies are added through Imports and Suggests directives. In a new and clean environment this results in a number of issues as reported here. Instead, critical dependencies should be added through Depends directive (see this post).

lkhilton commented 1 year ago

I just want to mention that the state of GAMBLR installation means that it's not installable in Conda environments right now. We have several Snakefiles in GAMBL and LCR-modules that depend on a working GAMBLR installation (including vcf2maf) and currently GAMBLR can't be installed with Snakemake in a Conda environment. I think that makes resolving this quite urgent. We either need robust packages installation, or a Conda environment yaml file that tracks all dependencies and ensures they all get installed correctly so that GAMBLR can be installed. I think using Conda is quite tricky though, in light of the number of dependencies that have to be installed from GitHub.

Here's a good way to test and debug GAMBLR installation:

# Use conda/mamba to create an environment that contains R 4.1.3 (to match GSC RStudio version)
# devtools has to be installed at a minimum for devtools::install_github()
# biocmanager should be installed for BioConductor packages
mamba create -n gamblr-dependencies r-base=4.1.3 r-devtools r-biocmanager

# Activate the conda environment and launch R at the command line
# Use the --vanilla directive to R to make sure it doesn't load ANY existing libraries or profiles
conda activate gamblr-dependencies
R --vanilla

# In R, try installing GAMBLR
devtools::install_github("morinlab/GAMBLR")
mattssca commented 1 year ago

I am looking into this right now Laura. I have some questions related to what Kostia wrote on the issue. I might move this conversation to the Slack thread instead of discussing on this issue here. Thanks!

Kdreval commented 1 year ago

This has been resolved in PR #146 and is now on master. Confirmed that installation from master works! Steps to reproduce:

conda create -n gamblr-dependencies r-base=4.1.3 r-devtools r-biocmanager cmake r-rmysql r-git2r mysqlclient r-tidyverse r-nloptr r-xml -c conda-forge -c anaconda

conda activate gamblr-dependencies

R --vanilla

devtools::install_github("morinlab/GAMBLR")