Installing EnsDb.Hsapiens.v75 or other versions on Mac (M2)
1
0
Entering edit mode
Taeim • 0
@2e69c005
Last seen 2.3 years ago
United States

Hi, I have been trying to install EnsDb.Hsapiens.v75 or other versions of it including v.79, and I got some warning and error messages. I think it might be because I am using M2 Mac chip, and I was wondering if there's a way to install the package. I could install GenomeInfoDb through Bioconductor in R, but EnsDb.Hsapiens.v75 is the only thing I've known couldn't be installed on my Mac. Thank you!

Code should be placed in three backticks as shown below


# if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("EnsDb.Hsapiens.v75")

# 
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘GenomicAlignments’ ‘Rhtslib’ ‘rtracklayer’ ‘Rsamtools’

sessionInfo( )
EnsDb.Hsapiens.v86 EnsDb.Hsapiens.v79 EnsDb.Hsapiens.v75 • 1.6k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

I think there is a work-around for M2 Mac users, and hopefully a Mac user will show up to tell you how to proceed. But in this instance, you don't need to install that particular package, and given how old v75 is, maybe you want a newer version, all of which you can get from the 'AnnotationHub'.

> library(AnnotationHub)
> query(hub, c("Ensdb","Homo sapiens")) 
AnnotationHub with 22 records
# snapshotDate(): 2022-04-25
# $dataprovider: Ensembl
# $species: Homo sapiens
# $rdataclass: EnsDb
# additional mcols(): taxonomyid, genome, description,
#   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
#   rdatapath, sourceurl, sourcetype 
# retrieve records with, e.g., 'object[["AH53211"]]' 

             title                             
  AH53211  | Ensembl 87 EnsDb for Homo Sapiens 
  AH53715  | Ensembl 88 EnsDb for Homo Sapiens 
  AH56681  | Ensembl 89 EnsDb for Homo Sapiens 
  AH57757  | Ensembl 90 EnsDb for Homo Sapiens 
  AH60773  | Ensembl 91 EnsDb for Homo Sapiens 
  ...        ...                               
  AH89426  | Ensembl 103 EnsDb for Homo sapiens
  AH95744  | Ensembl 104 EnsDb for Homo sapiens
  AH98047  | Ensembl 105 EnsDb for Homo sapiens
  AH100643 | Ensembl 106 EnsDb for Homo sapiens
  AH104864 | Ensembl 107 EnsDb for Homo sapiens

## here, assuming you might want the most current version

> ensdb <- hub[["AH104864"]]
downloading 1 resources
retrieving 1 resource
  |======================================================================| 100%

loading from cache
require("ensembldb")
Warning message:
package 'GenomeInfoDb' was built under R version 4.2.1 
> ensdb
EnsDb for Ensembl:
|Backend: SQLite
|Db type: EnsDb
|Type of Gene ID: Ensembl Gene ID
|Supporting package: ensembldb
|Db created by: ensembldb package from Bioconductor
|script_version: 0.3.7
|Creation time: Thu Jul 21 21:24:29 2022
|ensembl_version: 107
|ensembl_host: localhost
|Organism: Homo sapiens
|taxonomy_id: 9606
|genome_build: GRCh38
|DBSCHEMAVERSION: 2.2
| No. of genes: 69648.
| No. of transcripts: 274542.
|Protein data available.

And then you can use this object in the same way you would use the installed package.

ADD COMMENT
0
Entering edit mode

Thank you so much for your reply! I tried the code, but I couldn't install AnnotationHub. I got a warning message that I would need to load required package named BioGenerics. Then I tried to install BioGenerics and got the same warning messages that I put in my post:

Warning: unable to access index for repository https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning message:
package ‘BioGenerics’ is not available for Bioconductor version '3.15'
ADD REPLY
0
Entering edit mode

You could try running in emulation mode by using the Intel build (the first one, R-4.2.1.pkg), instead of the M1 build.

ADD REPLY
0
Entering edit mode

Thank you so much! It worked!!

ADD REPLY

Login before adding your answer.

Traffic: 415 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6