GuangchuangYu/bitr

Cannot use bitr

Closed this issue · 8 comments

Hi - I am trying to use bitr and it fails... so I cannot use your code. I am using R 3.5.1.

I tried two ways of loading clusterProfiler:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("clusterProfiler", version = "3.8")

and also this:

source("https://bioconductor.org/biocLite.R")
biocLite("clusterProfiler")

And when I run:
data(geneList, package="DOSE")
gene <- names(geneList)[abs(geneList) > 2]
gene.df <- bitr(gene, fromType = "ENTREZID", toType = c("ENSEMBL", "SYMBOL"), OrgDb = org.Hs.eg.db)
head(gene.df)

I get this error:

Error in bitr(gene, fromType = "ENTREZID", toType = c("ENSEMBL", "SYMBOL"), : could not find function "bitr"
Traceback:

So then I tried to install bitr directly but I get this:

library(devtools)
install_github("GuangchuangYu/bitr")
Gives the following error:

Downloading GitHub repo GuangchuangYu/bitr@master
from URL https://api.github.com/repos/GuangchuangYu/bitr/zipball/master
Installing bitr
'/gpfs/main/home/aconard/anaconda/envs/mro_env/lib/R/bin/R' --no-site-file
--no-environ --no-save --no-restore --quiet CMD INSTALL
'/tmp/RtmpNaU90m/devtools1c981fc660aa/GuangchuangYu-bitr-246358c'
--library='/gpfs/main/home/aconard/anaconda/envs/mro_env/lib/R/library'
--install-tests

Installation failed: Command failed (1)

Help! Thank you!

did you really install clusterProfiler successfully and load the library to R?

“installation of package ‘clusterProfiler’ had non-zero exit status”Updating HTML index of packages in '.Library'

You did not install the pkg successfully.

I also tried importing enrichplot but without success. Your tools look great! I hope this can work!

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("enrichplot", version = "3.8")

Bioconductor version 3.8 (BiocManager 1.30.1), R 3.5.1 (2018-07-02)
Installing package(s) 'enrichplot'
also installing the dependencies ‘units’, ‘ggforce’, ‘ggraph’

Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘units’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘ggforce’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘ggraph’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘enrichplot’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Update old packages: 'backports', 'BH', 'BiocInstaller', 'BiocManager',
'broom', 'callr', 'carData', 'caret', 'checkpoint', 'class', 'cli', 'clipr',
'codetools', 'colorspace', 'cowplot', 'curl', 'data.table', 'dbplyr',
'ddalpha', 'dendextend', 'devtools', 'digest', 'dimRed', 'doParallel',
'dplyr', 'evaluate', 'fansi', 'foreign', 'gclus', 'ggplot2', 'ggpubr',
'git2r', 'haven', 'htmlwidgets', 'httpuv', 'httr', 'ipred', 'IRdisplay',
'IRkernel', 'jsonlite', 'kernlab', 'knitr', 'later', 'lattice', 'lava',
'magic', 'maptools', 'markdown', 'MASS', 'Matrix', 'mclust', 'mgcv', 'mime',
'ModelMetrics', 'nloptr', 'openssl', 'pillar', 'pkgconfig', 'pls',
'processx', 'quantreg', 'R6', 'Rcpp', 'RcppEigen', 'readr', 'readxl',
'recipes', 'repr', 'reprex', 'rio', 'rlang', 'rmarkdown', 'robustbase',
'rstudioapi', 'RUnit', 'scales', 'sfsmisc', 'shiny', 'survival', 'testthat',
'tibble', 'tidyr', 'tidyselect', 'tinytex', 'TTR', 'vegan', 'webshot',
'xfun', 'xtable', 'xts', 'zoo'

Here is my sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS: /gpfs/main/home/aconard/anaconda/envs/mro_env/lib/R/lib/libRblas.so
LAPACK: /gpfs/main/home/aconard/anaconda/envs/mro_env/lib/R/lib/libRlapack.so

locale:
[1] en_US.UTF-8

attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base

other attached packages:
[1] GOsummaries_2.18.0 Rcpp_0.12.18 GOplot_1.0.2
[4] gridExtra_2.3 topGO_2.34.0 SparseM_1.77
[7] GO.db_3.7.0 AnnotationDbi_1.44.0 IRanges_2.16.0
[10] S4Vectors_0.20.1 Biobase_2.42.0 graph_1.60.0
[13] BiocGenerics_0.28.0 fpc_2.1-11.1 gclus_1.3.1
[16] cluster_2.0.7-1 knitr_1.20 dplyr_0.7.6
[19] NbClust_3.0 vegan_2.5-2 lattice_0.20-35
[22] permute_0.9-4 RColorBrewer_1.1-2 heatmaply_0.15.2
[25] viridis_0.5.1 viridisLite_0.3.0 htmlwidgets_1.2
[28] devtools_1.13.6 plotly_4.8.0 gplots_3.0.1
[31] ggplot2_3.0.0 ggdendro_0.1-20 RevoUtils_11.0.1
[34] RevoUtilsMath_11.0.0

loaded via a namespace (and not attached):
[1] nlme_3.1-137 matrixStats_0.54.0 bitops_1.0-6
[4] bit64_0.9-7 webshot_0.5.0 httr_1.3.1
[7] prabclus_2.2-6 repr_0.15.0 tools_3.5.1
[10] R6_2.2.2 KernSmooth_2.23-15 DBI_1.0.0
[13] lazyeval_0.2.1 mgcv_1.8-24 colorspace_1.3-2
[16] trimcluster_0.1-2.1 nnet_7.3-12 withr_2.1.2
[19] tidyselect_0.2.4 gProfileR_0.6.7 bit_1.1-14
[22] compiler_3.5.1 TSP_1.1-6 labeling_0.3
[25] diptest_0.75-7 caTools_1.17.1.1 scales_0.5.0
[28] DEoptimR_1.0-8 mvtnorm_1.0-8 robustbase_0.93-2
[31] pbdZMQ_0.3-3 stringr_1.3.1 digest_0.6.15
[34] base64enc_0.1-3 pkgconfig_2.0.1 htmltools_0.3.6
[37] limma_3.38.3 rlang_0.2.1 RSQLite_2.1.1
[40] bindr_0.1.1 jsonlite_1.5 mclust_5.4.1
[43] gtools_3.8.1 dendextend_1.8.0 RCurl_1.95-4.11
[46] magrittr_1.5 modeltools_0.2-22 Matrix_1.2-14
[49] IRkernel_0.8.14.9000 munsell_0.5.0 stringi_1.2.4
[52] whisker_0.3-2 MASS_7.3-50 flexmix_2.3-14
[55] plyr_1.8.4 blob_1.1.1 grid_3.5.1
[58] gdata_2.18.0 crayon_1.3.4 IRdisplay_0.5.0
[61] pillar_1.3.0 uuid_0.1-2 reshape2_1.4.3
[64] codetools_0.2-15 glue_1.3.0 evaluate_0.11
[67] data.table_1.11.4 BiocManager_1.30.1 foreach_1.5.0
[70] gtable_0.2.0 purrr_0.2.5 tidyr_0.8.1
[73] kernlab_0.9-26 assertthat_0.2.0 class_7.3-14
[76] seriation_1.2-3 tibble_1.4.2 iterators_1.0.10
[79] registry_0.5 memoise_1.1.0 bindrcpp_0.2.2

Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘units’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘ggforce’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘ggraph’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, repos = repos, ...):
“installation of package ‘enrichplot’ had non-zero exit status”Updating HTML index of packages in '.Library'

Did you really read the error msg? enrichplot can not be installed was due to fail installation of its dependencies.

If you try install.packages("units") (one of its dependency), you are expected to get an error.

If you read the error msg carefully, you should know how to solve it. As you are debian user, I think you should know how to use apt install to install the library for units package to compile. If you don't know what I am talking about, google search the error msg.

You need to READ the error msg, and I can't do that for you.

Hello again Dr. Guangchuang, I figured out how to configure the clusterProfiler package to work so I thought I would post! I should also say, I am sorry that you interpreted me saying that I would have to stop using my time this way as wasting time, as that is not what I wrote. I just hoped to use your package and not have to try something else, hence my statement! Thankfully I got it working! Two other colleagues had the same problem as I did on their Macs, and my solution worked for them. I am sharing my insights here:

Once I had this, I was able to load the packages clusterProfiler, bitr, etc. with only a few other configurations.