Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing error on Mac #124

Open
Pedramto89 opened this issue Dec 13, 2021 · 10 comments
Open

Installing error on Mac #124

Pedramto89 opened this issue Dec 13, 2021 · 10 comments

Comments

@Pedramto89
Copy link

Hello. I have a problem to install the 'ensembldb' package on my R studio, based on my Mac M1. However, I get several errors.

Error:

"cram/cram_io.c:61:10: fatal error: 'lzma.h' file not found
#include <lzma.h>
^~~~~~~~
1 error generated.
make[1]: *** [cram/cram_io.o] Error 1
make: *** [htslib] Error 2
ERROR: compilation failed for package ‘Rhtslib’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rhtslib’
    ERROR: dependency ‘Rhtslib’ is not available for package ‘Rsamtools’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rsamtools’
    ERROR: dependency ‘Rsamtools’ is not available for package ‘GenomicAlignments’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/GenomicAlignments’
    ERROR: dependencies ‘Rsamtools’, ‘GenomicAlignments’ are not available for package ‘rtracklayer’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rtracklayer’
    ERROR: dependency ‘rtracklayer’ is not available for package ‘GenomicFeatures’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/GenomicFeatures’
    ERROR: dependencies ‘GenomicFeatures’, ‘rtracklayer’, ‘Rsamtools’ are not available for package ‘ensembldb’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/ensembldb’"

My R version:

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

@Pedramto89 Pedramto89 changed the title About installing on Mac Installing error on Mac Dec 13, 2021
@ccwang002
Copy link

This is due to the compilation error in the Rhtslib package. You can check out this issue for more details Bioconductor/Rhtslib#23 (comment) and a temporary solution until Bioconductor officially supports ARM M1 macs.

Before the official support for M1 arrives, it's probably easier to install the intel version of R and emulation by Rosetta 2.

@Pedramto89
Copy link
Author

Thank you @ccwang002 . I could finally solve it. It goes back to M1 macs. I installed the other version of R and then I successfully installed the ensembldb.
Now, I have another issue. I want to execute the following code but gives me an error:

annotations <- genes(x = edb, return.type = "data.frame")

Error:
Error in genes(x = edb, return.type = "data.frame") :
unused arguments (x = edb, return.type = "data.frame")

@jorainer
Copy link
Owner

Can you please ensure that edb is in fact an EnsDb database (i.e. that class(edb) returns EnsDb)? Also, make sure that you load the ensembldb package with library(ensembldb). There is also a genes function for TxDb databases/annotation resources from the GenomicFeatures package which does not have the argument return.type. So, if edb was something else than an EnsDb it could be that another genes method than the one from ensembldb is called.

@Pedramto89
Copy link
Author

Pedramto89 commented Dec 14, 2021

Thanks. This is what I got:

class(edb)
[1] "EnsDb"
attr(,"package")
[1] "ensembldb"

However, I still get the same error

@Pedramto89
Copy link
Author

Screen Shot 2021-12-13 at 23 48 57

@jorainer
Copy link
Owner

can you please post the output from sessionInfo()?

@Pedramto89
Copy link
Author

Pedramto89 commented Dec 14, 2021

Sorry If I may answer late because of the time zone.
Here is the sessionInfo():

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] MAST_1.20.0 SingleCellExperiment_1.16.0 SummarizedExperiment_1.24.0 MatrixGenerics_1.6.0
[5] matrixStats_0.61.0 limma_3.50.0 metap_1.6 multtest_2.50.0
[9] future_1.23.0 forcats_0.5.1 stringr_1.4.0 purrr_0.3.4
[13] readr_2.1.1 tidyr_1.1.4 tibble_3.1.6 ggplot2_3.3.5
[17] tidyverse_1.3.1 cowplot_1.1.1 Rgraphviz_2.38.0 topGO_2.46.0
[21] SparseM_1.81 GO.db_3.14.0 graph_1.72.0 ReactomeGSA_1.8.0
[25] dplyr_1.0.7.9000 sctransform_0.3.2 patchwork_1.1.1 here_1.0.1
[29] ensembldb_2.18.2 AnnotationFilter_1.18.0 GenomicFeatures_1.46.1 AnnotationDbi_1.56.2
[33] Biobase_2.54.0 GenomicRanges_1.46.1 GenomeInfoDb_1.30.0 IRanges_2.28.0
[37] S4Vectors_0.32.3 SeuratObject_4.0.4 Seurat_4.0.5 AnnotationHub_3.2.0
[41] BiocFileCache_2.2.0 dbplyr_2.1.1 BiocGenerics_0.40.0

loaded via a namespace (and not attached):
[1] utf8_1.2.2 reticulate_1.22 tidyselect_1.1.1
[4] RSQLite_2.2.9 htmlwidgets_1.5.4 BiocParallel_1.28.3
[7] Rtsne_0.15 munsell_0.5.0 mutoss_0.1-12
[10] codetools_0.2-18 ica_1.0-2 miniUI_0.1.1.1
[13] withr_2.4.3 colorspace_2.0-2 filelock_1.0.2
[16] knitr_1.36 rstudioapi_0.13 ROCR_1.0-11
[19] tensor_1.5 listenv_0.8.0 Rdpack_2.1.3
[22] GenomeInfoDbData_1.2.7 mnormt_2.0.2 polyclip_1.10-0
[25] bit64_4.0.5 rprojroot_2.0.2 TH.data_1.1-0
[28] parallelly_1.29.0 vctrs_0.3.8 generics_0.1.1
[31] xfun_0.28 R6_2.5.1 bitops_1.0-7
[34] spatstat.utils_2.3-0 cachem_1.0.6 DelayedArray_0.20.0
[37] assertthat_0.2.1 promises_1.2.0.1 BiocIO_1.4.0
[40] scales_1.1.1 multcomp_1.4-17 gtable_0.3.0
[43] globals_0.14.0 goftest_1.2-3 sandwich_3.0-1
[46] rlang_0.99.0.9001 splines_4.1.2 rtracklayer_1.54.0
[49] lazyeval_0.2.2 spatstat.geom_2.3-1 broom_0.7.10
[52] modelr_0.1.8 BiocManager_1.30.16 yaml_2.2.1
[55] reshape2_1.4.4 abind_1.4-5 backports_1.4.1
[58] httpuv_1.6.3 tools_4.1.2 ellipsis_0.3.2
[61] gplots_3.1.1 spatstat.core_2.3-2 RColorBrewer_1.1-2
[64] ggridges_0.5.3 TFisher_0.2.0 Rcpp_1.0.7
[67] plyr_1.8.6 progress_1.2.2 zlibbioc_1.40.0
[70] RCurl_1.98-1.5 prettyunits_1.1.1 rpart_4.1-15
[73] deldir_1.0-6 pbapply_1.5-0 zoo_1.8-9
[76] haven_2.4.3 ggrepel_0.9.1 cluster_2.1.2
[79] fs_1.5.2 magrittr_2.0.1 data.table_1.14.2
[82] scattermore_0.7 reprex_2.0.1 lmtest_0.9-39
[85] RANN_2.6.1 tmvnsim_1.0-2 mvtnorm_1.1-3
[88] ProtGenerics_1.26.0 fitdistrplus_1.1-6 hms_1.1.1
[91] mime_0.12 evaluate_0.14 xtable_1.8-4
[94] XML_3.99-0.8 readxl_1.3.1 gridExtra_2.3
[97] compiler_4.1.2 biomaRt_2.50.1 KernSmooth_2.23-20
[100] crayon_1.4.2 htmltools_0.5.2 tzdb_0.2.0
[103] mgcv_1.8-38 later_1.3.0 lubridate_1.8.0
[106] DBI_1.1.1 MASS_7.3-54 rappdirs_0.3.3
[109] Matrix_1.4-0 cli_3.1.0 rbibutils_2.2.7
[112] parallel_4.1.2 igraph_1.2.9 pkgconfig_2.0.3
[115] sn_2.0.1 GenomicAlignments_1.30.0 numDeriv_2016.8-1.1
[118] plotly_4.10.0 spatstat.sparse_2.0-0 xml2_1.3.3
[121] XVector_0.34.0 rvest_1.0.2 digest_0.6.29
[124] RcppAnnoy_0.0.19 spatstat.data_2.1-0 Biostrings_2.62.0
[127] cellranger_1.1.0 rmarkdown_2.11 leiden_0.3.9
[130] uwot_0.1.11 restfulr_0.0.13 curl_4.3.2
[133] shiny_1.7.1 Rsamtools_2.10.0 gtools_3.9.2
[136] rjson_0.2.20 lifecycle_1.0.1 nlme_3.1-153
[139] jsonlite_1.7.2 viridisLite_0.4.0 fansi_0.5.0
[142] pillar_1.6.4 lattice_0.20-45 plotrix_3.8-2
[145] KEGGREST_1.34.0 fastmap_1.1.0 httr_1.4.2
[148] survival_3.2-13 interactiveDisplayBase_1.32.0 glue_1.5.1
[151] png_0.1-7 BiocVersion_3.14.0 bit_4.0.4
[154] stringi_1.7.6 blob_1.2.2 caTools_1.18.2
[157] memoise_2.0.1 mathjaxr_1.4-0 irlba_2.3.5
[160] future.apply_1.8.1

@jorainer
Copy link
Owner

Hm, strange. When you type genes, get you the same than I do?

> genes
standardGeneric for "genes" defined from package "GenomicFeatures"

function (x, ...) 
standardGeneric("genes")
<bytecode: 0x557246c8d5c0>
<environment: 0x557246ca44e8>
Methods may be defined for arguments: x
Use  showMethods(genes)  for currently available ones.

Maybe some other package defines another genes function?

@Pedramto89
Copy link
Author

This is what I get:

standardGeneric for "genes" defined from package "GenomicFeatures"

function (x, ...)
standardGeneric("genes")
<bytecode: 0x7fc7337e9e38>
<environment: 0x7fc7338142e8>
Methods may be defined for arguments: x
Use showMethods(genes) for currently available ones.

@jorainer
Copy link
Owner

Very strange indeed. So it should work. Can you maybe try this minimal example (in a new R session, without loading any other R packages or data:

> library(ensembldb)
> library(EnsDb.Hsapiens.v86)
> edb <- EnsDb.Hsapiens.v86
> tmp <- genes(edb, return.type = "data.frame")
> head(tmp)
           gene_id gene_name                       gene_biotype gene_seq_start
1  ENSG00000223972   DDX11L1 transcribed_unprocessed_pseudogene          11869
5  ENSG00000227232    WASH7P             unprocessed_pseudogene          14404
6  ENSG00000278267 MIR6859-1                              miRNA          17369
7  ENSG00000243485 MIR1302-2                            lincRNA          29554
9  ENSG00000237613   FAM138A                            lincRNA          34554
12 ENSG00000268020    OR4G4P             unprocessed_pseudogene          52473
   gene_seq_end seq_name seq_strand seq_coord_system    symbol
1         14409        1          1       chromosome   DDX11L1
5         29570        1         -1       chromosome    WASH7P
6         17436        1         -1       chromosome MIR6859-1
7         31109        1          1       chromosome MIR1302-2
9         36081        1         -1       chromosome   FAM138A
12        53312        1          1       chromosome    OR4G4P
                              entrezid
1  100287596, 100287102, 727856, 84771
5                                   NA
6                            102466751
7                 105376912, 100302278
9               654835, 645520, 641702
12                                  NA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants