saezlab / CARNIVAL

CAusal Reasoning for Network Identification with integer VALue programming in R
https://saezlab.github.io/CARNIVAL/
57 stars 29 forks source link

Remove 'tidyverse' dependency #8

Closed ptrairatphisan closed 5 years ago

ptrairatphisan commented 5 years ago

Our colleague Rosa identified an error upon installing the tidyverse package on a Linux cluster environment. The actual problem came from the installation of the sub-package 'lubridate' which has to be installed together with the tidyverse but it was not used in the CARNIVAL framework.

Lubridate_Package_Issue_on_Linux_cluster

The most stainable solution is to make the CARNIVAL (DEG-preprocessing) pipeline to be independent of the big tidyverse package by calling only the required packages (see more details in the note of the commit).

================ Note from the commit

Substitute tidyverse with dplyr,purr,tibble and tidyr

ptrairatphisan commented 5 years ago

Note: certain packages including 'lubridate' as well as 'igraph' require newer version of gcc compiler on the system while CARNIVAL users might not have the administrative right for sudo installation. The issue with the 'lubridate' package is resolved but the installation of the old release version of 'igraph' might still be needed.

ptrairatphisan commented 5 years ago

We checked with Rosa on the local (Bioquant) cluster and we found that the hidden dependent packages couldn't be automatically installed based on the DESCRIPTION file so they have to be forced installed manually in a specific order. These include:

In addition, if the existing igraph package is very outdated (older than v1.0), then it also has to be re-installed with a newer version while the newest one on CRAN (v1.2.4) might not compatible with old gcc compiler (e.g. on the cluster) either. A pragmatic approach is to install a stable version from GitHub (v1.1.0) instead using the command: devtools::install_github("igraph/rigraph").

To conclude, this issue seems to be depended on the environment (OS, R-version, pre-installed packages) so we will fix the issue case-by-case and we will document this issue on the Wiki page.

@anikaliu - could you please check if you agree that we could replace the sub-packages from tidyverse (purrr,tibble,tidyr) instead of installing and calling the whole package? If so, could you make a test run locally?

@enio23 - could you please clone this new branch (tidyverse_in_dependency) and make a test-run on the JRC-COMBINE cluster as another test case with different environment?

anikaliu commented 5 years ago

Sounds fine!

ptrairatphisan commented 5 years ago

@anikaliu - I verified that adding only dplyr (+ ggplot2) is not sufficient for the 'runDoRothEA' function. Additional packages including purrr, tibble and tidyr are also needed if tidyverse is not loaded. Have you tried running an example?

anikaliu commented 5 years ago

@ptrairatphisan Yes, I saw that you already added all of these packages?

ptrairatphisan commented 5 years ago

@anikaliu yes, they are all now listed in the DESCRIPTION file. I've already solved the issue and just need to cross-check among our developers before pushing this minor mod to the master branch.