0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Seurat in Linux (インストール)

Posted at

概要

SeuratをLinuxで動かそうとしたら、インストールに結構苦戦してしまったのでメモ
OS : Linux mint 19.3 Tricia

やる

チュート通り、install.packages("Seurat")してみるが、依存関係パッケージのインストールができない。
ちょっと調べてみると、どうもsudo apt install r-baseでインストールできるRのバージョンは3.4と古く、対応してないパッケージがあるみたい。新しいバージョンを入れるにはレポジトリと公開鍵を追加する必要がある。

# 一旦、Rをアンインストールする
$ sudo apt purge r-base* r-recommended r-cran-*
$ sudo apt autoremove
$ sudo apt update

# 公開鍵とレポジトリを追加する
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
$ sudo add-apt-repository https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

これで追加すると追加したhttps://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/が何故かhttps://cloud.r-project.org/bin/linux/ubuntu mainとなってしまっているので、[システム設定]→[ソフトウェアソース]から正しいものに変更する。

そして、再びRをインストール

$ sudo apt update
$ sudo apt install r-base

これでR 3.6のインストールができた。

これで再度install.packages("Seurat")すると、またひっかかる。ldコマンドのオプションがないそう。
ターミナルからこれを入れる。Opensslも入ってなかったので一緒に入れる。

$ sudo apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev gfortran libssl-dev

これでも引っかかる。BioManagerからmulttestを入れる。

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

BiocManager::install("multtest")

これでinstall.packages("Seurat")するとSeuratをインストールできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?