Ошибка при установке пакета R: scran с использованием Anaconda - PullRequest
0 голосов
/ 06 апреля 2020

Я использую anaconda для загрузки пакета R под названием scran . Несмотря на то, что я скачал его в путь к библиотеке R, я получил ошибку. Когда я пытаюсь загрузить свой пакет в моей среде R, он также не работает. Я на MacOS Catalina (10.15.4). Я тоже пробовал BiocManager::install(scran), но тоже не получилось.

scran (https://bioconductor.org/packages/release/bioc/html/scran.html)

Может кто-нибудь помочь мне? Очень ценится! Пожалуйста, смотрите подробности ниже.

# Я загружаю scran используя conda install -c Bioconda bioconductor-scran

(scrnaseq) yaochung41@x86_64-apple-darwin13 library % conda install -c bioconda bioconductor-scran
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/yaochung41/anaconda3/envs/scrnaseq

  added / updated specs:
    - bioconductor-scran


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.4.5.1 |       hecc5488_0         146 KB  conda-forge
    certifi-2020.4.5.1         |   py38h32f6830_0         151 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         297 KB

The following packages will be UPDATED:

  bioconductor-scran bioconda/label/cf201901::bioconductor~ --> bioconda::bioconductor-scran-1.14.1-r36h6de7cb9_0
  ca-certificates                     2019.11.28-hecc5488_0 --> 2020.4.5.1-hecc5488_0
  certifi                         2019.11.28-py38h32f6830_1 --> 2020.4.5.1-py38h32f6830_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
ca-certificates-2020 | 146 KB    | ##################################### | 100% 
certifi-2020.4.5.1   | 151 KB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
INFO: deactivate-gfortran_osx-64.sh made the following environmental changes:
-DEBUG_FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments
-DEBUG_FORTRANFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments
-F77=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-F90=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-F95=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-FC=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
-FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include
-FORTRANFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/yaochung41/anaconda3/envs/scrnaseq/include
-GFORTRAN=/Users/yaochung41/anaconda3/envs/scrnaseq/bin/x86_64-apple-darwin13.4.0-gfortran
(scrnaseq) yaochung41@x86_64-apple-darwin13 library % R

# Затем я пытаюсь загрузить пакет из R 3.6. 3 с использованием library(scran), и я также получил ошибку

Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(scran)
Loading required package: SingleCellExperiment
Loading required package: SummarizedExperiment
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: DelayedArray
Loading required package: matrixStats

Attaching package: ‘matrixStats’

The following objects are masked from ‘package:Biobase’:

    anyMissing, rowMedians

Loading required package: BiocParallel

Attaching package: ‘DelayedArray’

The following objects are masked from ‘package:matrixStats’:

    colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following objects are masked from ‘package:base’:

    aperm, apply, rowsum

Error: package or namespace load failed for ‘scran’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/yaochung41/anaconda3/envs/scrnaseq/lib/R/library/scran/libs/scran.dylib':
  dlopen(/Users/yaochung41/anaconda3/envs/scrnaseq/lib/R/library/scran/libs/scran.dylib, 6): Library not loaded: @rpath/libopenblasp-r0.3.7.dylib
  Referenced from: /Users/yaochung41/anaconda3/envs/scrnaseq/lib/R/library/scran/libs/scran.dylib
  Reason: image not found```


1 Ответ

1 голос
/ 06 апреля 2020

У меня была ваша точная вторая ошибка, с которой вы столкнулись сегодня, и, кажется, я нашел исправление.

После некоторого копания я обнаружил, что моя проблема была с openblas, а не SCRAN. Мое исправление заключалось в следующем:

$ conda install openblas=0.3.7

найдите в своих файлах «libopenbl asp -r0.3.7» и скопируйте его в папку lib используемой вами среды anaconda3, т.е. / Users / yaochung41 / anaconda3 / envs / scrnaseq / lib /:

$ find /home/username/ -name libopenblasp-r0.3.7
$ mv [PATH to libopenblasp-r0.3.7] /Users/yaochung41/anaconda3/envs/scrnaseq/lib/
...