DESeq2/genefilter compatibility with R 4.2.2
1
0
Entering edit mode
Morgane ▴ 10
@310e9f05
Last seen 17 months ago
United States

Hello,

I have a new laptop and need to install a whole bunch of R packages. I thought it would be a breeze given the blank slate but the first package I'm trying to install and load, DESeq2, continuously fails. The problem seems to be the genefilter dependency. It seems to be incompatible with the latest version of R (4.2.2). Should I just install R 4.2.1? This is what I am getting:

> library(DESeq2)
Error: package or namespace load failed for ‘DESeq2’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/genefilter/libs/genefilter.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/genefilter/libs/genefilter.so, 0x0006): Library not loaded: '/opt/R/arm64/gfortran/lib/libgfortran.5.dylib'
  Referenced from: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/genefilter/libs/genefilter.so'
  Reason: tried: '/opt/R/arm64/gfortran/lib/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file)
> install.packages('genefilter', repos='http://cran.us.r-project.org')
Warning message:
package ‘genefilter’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
> BiocManager::install('genefilter')
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://ftp.osuosl.org/pub/cran

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31)
Installing package(s) 'genefilter'

  There is a binary version available but the source version is later:
           binary source needs_compilation
genefilter 1.79.0 1.80.0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘genefilter’

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/genefilter_1.80.0.tar.gz'
Content type 'application/x-gzip' length 715878 bytes (699 KB)
==================================================
downloaded 699 KB

clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c half_range_mode.cpp -o half_range_mode.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c nd.c -o nd.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c pAUC.c -o pAUC.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c rowPAUCs.c -o rowPAUCs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c rowttests.c -o rowttests.o
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c ttest.f -o ttest.o

The downloaded source packages are in
    ‘/private/var/folders/tq/ky8gx30x3c9fymcfk3wv65hh0000gp/T/RtmpfAFgBX/downloaded_packages’
Old packages: 'DESeq2', 'genefilter'
Update all/some/none? [a/s/n]: 
a

  There are binary versions available but the source versions are later:
           binary source needs_compilation
DESeq2     1.37.6 1.38.0              TRUE
genefilter 1.79.0 1.80.0              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
installing the source packages ‘DESeq2’, ‘genefilter’

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/DESeq2_1.38.0.tar.gz'
Content type 'application/x-gzip' length 2136372 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/genefilter_1.80.0.tar.gz'
Content type 'application/x-gzip' length 715878 bytes (699 KB)
==================================================
downloaded 699 KB

clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c half_range_mode.cpp -o half_range_mode.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c nd.c -o nd.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c pAUC.c -o pAUC.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c rowPAUCs.c -o rowPAUCs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c rowttests.c -o rowttests.o
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c ttest.f -o ttest.o
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c DESeq2.cpp -o DESeq2.o
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include   -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o DESeq2.so DESeq2.o RcppExports.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

The downloaded source packages are in
    ‘/private/var/folders/tq/ky8gx30x3c9fymcfk3wv65hh0000gp/T/RtmpfAFgBX/downloaded_packages’
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-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] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] SummarizedExperiment_1.28.0 Biobase_2.58.0              MatrixGenerics_1.10.0      
 [4] matrixStats_0.62.0          GenomicRanges_1.50.0        GenomeInfoDb_1.34.0        
 [7] IRanges_2.32.0              S4Vectors_0.36.0            BiocGenerics_0.44.0        
[10] BiocManager_1.30.19        

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9             compiler_4.2.2         XVector_0.38.0         bitops_1.0-7          
 [5] tools_4.2.2            zlibbioc_1.44.0        bit_4.0.4              memoise_2.0.1         
 [9] annotate_1.76.0        RSQLite_2.2.18         lattice_0.20-45        png_0.1-7             
[13] rlang_1.0.6            Matrix_1.5-1           DelayedArray_0.24.0    DBI_1.1.3             
[17] cli_3.4.1              parallel_4.2.2         fastmap_1.1.0          GenomeInfoDbData_1.2.9
[21] httr_1.4.4             Biostrings_2.66.0      vctrs_0.5.0            bit64_4.0.5           
[25] grid_4.2.2             R6_2.5.1               AnnotationDbi_1.60.0   survival_3.4-0        
[29] XML_3.99-0.12          BiocParallel_1.32.0    blob_1.2.3             splines_4.2.2         
[33] codetools_0.2-18       KEGGREST_1.38.0        xtable_1.8-4           RCurl_1.98-1.9        
[37] cachem_1.0.6           crayon_1.5.2
DESeq2 genefilter • 2.9k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

You can't use install.packages for Bioc packages. Follow these guidelines:

https://bioconductor.org/install

ADD COMMENT
0
Entering edit mode

I did - see above. Still getting

> library(DESeq2)
Error: package or namespace load failed for ‘DESeq2’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/genefilter/libs/genefilter.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/genefilter/libs/genefilter.so, 0x0006): Library not loaded: '/opt/R/arm64/gfortran/lib/libgfortran.5.dylib'
  Referenced from: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/genefilter/libs/genefilter.so'
  Reason: tried: '/opt/R/arm64/gfortran/lib/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file)
ADD REPLY
1
Entering edit mode

I found the issue. It occurs when using the latest versions of R for the arm64 architecture on Apple macbooks with M1 chip (see https://pat-s.me/transitioning-from-x86-to-arm64-on-macos-experiences-of-an-r-user/). There are two ways around the DESeq issue:

  1. Install R but the one for the Intel64 bit, not the arm64 one
  2. Install the experimental branch of GNU gfortran. Download the gfortran tarball on https://mac.r-project.org/tools/ and:
sudo tar fxz gfortran-12.0.1-20220312-is-darwin20-arm64.tar.xz -C /
export PATH=$PATH:/opt/R/arm64/gfortran/bin
sudo gfortran-update-sdk

Restart R, and now library(DESeq2) correctly loads.

ADD REPLY

Login before adding your answer.

Traffic: 840 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