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 3 years have passed since last update.

DEsingleをBiocParallelで並列化すると高速でDifferentially Expressed Gene (DEG)検出できるか

Posted at

やったこと

RのscRNA-seq用発現変動遺伝子解析パッケージのDEsingleは並列化に対応しているらしいと言うことで試してみました。
DEsingleについては以下を参照してください。
Zhun Miao, Ke Deng, Xiaowo Wang, Xuegong Zhang (2018). DEsingle for detecting three types of differential expression in single-cell RNA-seq data. Bioinformatics, bty332. 10.1093/bioinformatics/bty332.

install

今回はWindows10、R-4.0.0で実行しました。Rを起動し、DEsingleとBiocParallelをインストールします。

BiocManager::install("DEsingle")
BiocManager::install("BiocParallel")
library(DEsingle)
library(BiocParallel)

これで準備完了。

データセット

GEOデータベースのGSE143214のデータセットを使いました。老年と若年者ドナーから採取したT細胞のscRNA-seqデータです。老年725サンプル、若年者716サンプルで計1441サンプルになります。老年サンプルと若年サンプルで発現変動している遺伝子を抽出します。それぞれ別々のファイルに遺伝子発現量が記載されています。ファイルをデータベースからダウンロードして解凍して使用します。

DEG検出

# データの読み込み
old <- read.table("GSE143214_TPM_sc_old.txt", header = T, sep = "\t")
young <- read.table("GSE143214_TPM_sc_young.txt", header = T, sep = "\t")
# データのマージ
all_samples <- merge(old, young, by = "X")
rownames(all_samples) <- all_samples$X
# parallelパラメータの設定
param <- SnowParam(workers = 6, type = "SOCK", progressbar = TRUE)
register(param)
# DEG検出
counts <- all_samples[,2:ncol(all_samples)]
group <- factor(c(rep("O", ncol(old) -1), rep("Y", ncol(young) -1)))
before <- proc.time();results <- DEsingle(counts = counts, group = group, parallel = TRUE, BPPARM = param);after <- proc.time()
after - before

開始時
終了時

結果

第8世代のIntel(R)Core(TM)i7-8750H 6コアで1323.66秒かかりました。並列化なしと比較しようと思いましたが、時間かかりそうなのでパス。正常に動作していることが確認出来たので良しとしましょう。DEG検出の時間短縮に使えるでしょう。

参考

  1. DEsingleについて
    Zhun Miao, Ke Deng, Xiaowo Wang, Xuegong Zhang (2018). DEsingle for detecting three types of differential expression in single-cell RNA-seq data. Bioinformatics, bty332. 10.1093/bioinformatics/bty332.
  2. データセット
    Kared H, Tan SW, Lau MC, Chevrier M et al. Immunological history governs human stem cell memory CD4 heterogeneity via the Wnt signaling pathway. Nat Commun 2020 Feb 10;11(1):821. PMID: 32041953
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?