NathanSkene / EWCE

Expression Weighted Celltype Enrichment. See the package website for up-to-date instructions on usage.
https://nathanskene.github.io/EWCE/index.html
53 stars 25 forks source link

Cannot install EWCE > 1.2 with R 4.1 or R 4.2 (incompatible dependencies) #70

Closed iscastanho closed 2 years ago

iscastanho commented 2 years ago

I'm starting a new thread since this is a new issue.

I was missing q-values in full_results$results and EWCE functions until I realized that I have been using EWCE 1.2, which I hadn't noticed before because I installed EWCE recently and assumed that a recent version had been installed. I am using conda environments and with R 4.1 I can only seem to be able to install EWCE 1.2. I've created a conda environment with R 4.2 but I sill can't manage to install EWCE 1.4+. If I use conda install -c r bioconductor-ewce it asks me if I want to revert to R 4.1 (-c bioconda doesn't seem to have R 4.2 yet, so that obviously didn't work either). if I try to install EWCE in an R session using BiocManager::install("EWCE") the installation is not successful and I get similar errors to when I try the GitHub version using devtools that I show below.

> library(devtools)
> install_github("NathanSkene/EWCE")
...
ERROR: compilation failed for package ‘RCurl’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/RCurl’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/lme4’
ERROR: dependency ‘RCurl’ is not available for package ‘GenomeInfoDb’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/GenomeInfoDb’
ERROR: dependency ‘RCurl’ is not available for package ‘gprofiler2’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/gprofiler2’
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/pbkrtest’
ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘GenomicRanges’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/GenomicRanges’
ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘Biostrings’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/Biostrings’
ERROR: dependencies ‘pbkrtest’, ‘lme4’ are not available for package ‘car’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/car’
ERROR: dependency ‘Biostrings’ is not available for package ‘KEGGREST’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/KEGGREST’
ERROR: dependencies ‘GenomicRanges’, ‘GenomeInfoDb’ are not available for package ‘SummarizedExperiment’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/SummarizedExperiment’
ERROR: dependency ‘car’ is not available for package ‘rstatix’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/rstatix’
ERROR: dependency ‘KEGGREST’ is not available for package ‘AnnotationDbi’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/AnnotationDbi’
ERROR: dependencies ‘SummarizedExperiment’, ‘GenomicRanges’ are not available for package ‘SingleCellExperiment’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/SingleCellExperiment’
ERROR: dependency ‘AnnotationDbi’ is not available for package ‘AnnotationHub’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/AnnotationHub’
ERROR: dependency ‘rstatix’ is not available for package ‘ggpubr’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/ggpubr’
ERROR: dependency ‘AnnotationHub’ is not available for package ‘ExperimentHub’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/ExperimentHub’
ERROR: dependencies ‘gprofiler2’, ‘ggpubr’ are not available for package ‘orthogene’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/orthogene’
ERROR: dependency ‘ExperimentHub’ is not available for package ‘ewceData’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/ewceData’

The downloaded source packages are in
    ‘/tmp/Rtmp8hkBRL/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
✔  checking for file ‘/tmp/Rtmp8hkBRL/remotes246341022b0e1/NathanSkene-EWCE-4eeee28/DESCRIPTION’ ...
─  preparing ‘EWCE’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘EWCE/inst/extdata’
─  building ‘EWCE_1.5.3.tar.gz’

ERROR: dependencies ‘ewceData’, ‘SingleCellExperiment’, ‘SummarizedExperiment’, ‘orthogene’ are not available for package ‘EWCE’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/EWCE’
There were 20 warnings (use warnings() to see them)

> warnings()
Warning messages:
1: In i.p(...) : installation of package ‘nloptr’ had non-zero exit status
2: In i.p(...) : installation of package ‘RCurl’ had non-zero exit status
3: In i.p(...) : installation of package ‘lme4’ had non-zero exit status
4: In i.p(...) : installation of package ‘GenomeInfoDb’ had non-zero exit status
5: In i.p(...) : installation of package ‘gprofiler2’ had non-zero exit status
6: In i.p(...) : installation of package ‘pbkrtest’ had non-zero exit status
7: In i.p(...) : installation of package ‘GenomicRanges’ had non-zero exit status
8: In i.p(...) : installation of package ‘Biostrings’ had non-zero exit status
9: In i.p(...) : installation of package ‘car’ had non-zero exit status
10: In i.p(...) : installation of package ‘KEGGREST’ had non-zero exit status
11: In i.p(...) :
  installation of package ‘SummarizedExperiment’ had non-zero exit status
12: In i.p(...) : installation of package ‘rstatix’ had non-zero exit status
13: In i.p(...) :
  installation of package ‘AnnotationDbi’ had non-zero exit status
14: In i.p(...) :
  installation of package ‘SingleCellExperiment’ had non-zero exit status
15: In i.p(...) :
  installation of package ‘AnnotationHub’ had non-zero exit status
16: In i.p(...) : installation of package ‘ggpubr’ had non-zero exit status
17: In i.p(...) :
  installation of package ‘ExperimentHub’ had non-zero exit status
18: In i.p(...) : installation of package ‘orthogene’ had non-zero exit status
19: In i.p(...) : installation of package ‘ewceData’ had non-zero exit status
20: In i.p(...) :
  installation of package ‘/tmp/Rtmp8hkBRL/file246346487dedd/EWCE_1.5.3.tar.gz’ had non-zero exit status

Originally posted by @iscastanho in https://github.com/NathanSkene/EWCE/issues/44#issuecomment-1172591634

Al-Murphy commented 2 years ago

Hey,

The q-values are available in 1.4.0 which is released in the bioconductor current branch so try installing with

BiocManager::install("EWCE")

rather than from github. This is available for R 4.1 so should work with your set-up and not installing from github may reduce issues. If this doesn't work I think something else is the issue with your set-up which isn't specific to the package (EWCE installs cleanly on windows mac and linux, this is checked by bioconductor). Have a look at your error message to try and solve this like:

ERROR: dependency ‘nloptr’ is not available for package ‘lme4’

So try and install nloptr prior to installing EWCE. Do this for all dependencies that failed.

The other option is to use a docker image with EWCE installed which we have available here: https://hub.docker.com/r/neurogenomicslab/ewce/tags, The different tags align with the package version.

bschilder commented 2 years ago

@iscastanho Conda doesn't have R4.2 yet (it's rather behind), so if you want to use an env I would use the Docker container: https://nathanskene.github.io/EWCE/articles/EWCE.html#docker

As a side note, please use the Issues template when submitting Issues.

iscastanho commented 2 years ago

Thank you @Al-Murphy for the patience and replies. I solved it by downloading manually from Bioconductor and installing manually using install.packages() in R.

Thank you @bschilder for the suggestion but unfortunately Docker is not an option in the server I am using. I apologize for missing the template, but I initially posted this as a reply to a closed issue and then realized that I should post it as a new issue, and when I used the option "Reference in new issue" no template was shown. I will keep it in mind for future reference. Thank you for pointing this out.

bschilder commented 2 years ago

@iscastanho If your server doesn't allow Docker, the same vignette shows how to create a Singularity container (which doesn't have the same security concerns as Docker).