YuLab-SMU / clusterProfiler

:bar_chart: A universal enrichment tool for interpreting omics data
https://yulab-smu.top/biomedical-knowledge-mining-book/
1k stars 253 forks source link

Unable to install clusterProfiler - ggraph and igraph errors #525

Open Adrian-Zet opened 1 year ago

Adrian-Zet commented 1 year ago

Dear clusterProfiler team,

I've been trying to install this package from both the BiocManager repository and the Github development version and I keep getting the same error:

ERROR: dependency ‘igraph’ is not available for package ‘tidygraph’
* removing ‘/export/home/math/saia/adrz/ratpack-bcbio/packrat/lib/x86_64-pc-linux-gnu/4.2.1/tidygraph’
ERROR: dependency ‘igraph’ is not available for package ‘graphlayouts’
* removing ‘/export/home/math/saia/adrz/ratpack-bcbio/packrat/lib/x86_64-pc-linux-gnu/4.2.1/graphlayouts’
ERROR: dependencies ‘igraph’, ‘tidygraph’, ‘graphlayouts’ are not available for package ‘ggraph’
* removing ‘/export/home/math/saia/adrz/ratpack-bcbio/packrat/lib/x86_64-pc-linux-gnu/4.2.1/ggraph’
ERROR: dependencies ‘ggraph’, ‘igraph’ are not available for package ‘enrichplot’
* removing ‘/export/home/math/saia/adrz/ratpack-bcbio/packrat/lib/x86_64-pc-linux-gnu/4.2.1/enrichplot’
ERROR: dependency ‘enrichplot’ is not available for package ‘clusterProfiler’
* removing ‘/export/home/math/saia/adrz/ratpack-bcbio/packrat/lib/x86_64-pc-linux-gnu/4.2.1/clusterProfiler’

The downloaded source packages are in
        ‘/tmp/user/1233/RtmpsRn7MY/downloaded_packages’
Warning messages:
1: In install.packages(...) :
  installation of package ‘igraph’ had non-zero exit status
2: In install.packages(...) :
  installation of package ‘tidygraph’ had non-zero exit status
3: In install.packages(...) :
  installation of package ‘graphlayouts’ had non-zero exit status
4: In install.packages(...) :
  installation of package ‘ggraph’ had non-zero exit status
5: In install.packages(...) :
  installation of package ‘enrichplot’ had non-zero exit status
6: In install.packages(...) :
  installation of package ‘clusterProfiler’ had non-zero exit status
guidohooiveld commented 1 year ago

In case you were not able to solve this yet, please post the code you used to install in the 'normal' R installation. Now we only have info on the error, but not on what you tried.

This should work: http://bioconductor.org/packages/release/bioc/html/clusterProfiler.html

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install( c("clusterProfiler") )
Adrian-Zet commented 1 year ago

Hello,

I managed to solve all the issues by following the following issue threads: https://github.com/igraph/rigraph/issues/275, https://github.com/igraph/rigraph/issues/477, and https://github.com/igraph/rigraph/issues/335.

Also I had to perform the installation using:

BiocManager::install("clusterProfiler", dependencies = TRUE, INSTALL_opts = '--no-lock')

guidohooiveld commented 1 year ago

Thanks for reporting back, and good to hear you were able to solve it.

Based on the threads you link to, it likely had to do with an installation of conda that 'overruled' the default paths of your Linux installation? If so, i think it is good to mention (for the archive) that in such cases it good to check that the conda environment has been deactivated before installing igraph. https://github.com/igraph/rigraph/issues/275#issuecomment-948494281