SCENIC:Single Cell rEgulatory Network Inference and Clustering
目前支持分析的物种:人、鼠、果蝇
input的要求:scRNA seq的表达矩阵
列对应样本id,行名(rowname)对应基因名,基因名必须是gene-symbol格式;
表达量单位:优先考虑基因的总counts(可用或不可用UMI);也接受TPM、FPKM/RPKM等;建议避免使用归一化样本(如TPM)进行共表达分析,因为可能会引起人为的影响。但目前使用raw counts、normalized count 、TPM等的结果都尚且可靠。
剩余的steps不受表达量单位或者归一化影响,因为motif 的分析不需考虑表达量;AUCell包是基于细胞内排序(作为内在的归一方法)。
安装
1.主要有3个R包
GENIE3:推断共表达网络
RcisTarget:TF结合的motif分析
AUCell:鉴定具有激活基因集或者基因网络的细胞
利用biocLite安装上述3个R包和需要的dependencies等
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install(c("GENIE3", "AUCell", "RcisTarget"), version = "3.8")
# Also required:
install.packages('zoo')
# Recommended to run AUCell:
BiocManager::install(c("mixtools", "rbokeh"))
# To visualize the binary matrices and perform t-SNEs:
BiocManager::install(c("NMF", "pheatmap", "Rtsne", "R2HTML"))
# To support paralell execution (not available in Windows):
BiocManager::install(c("doMC", "doRNG"))
# To export/visualize in http://scope.aertslab.orgif (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")
devtools::install_github("aertslab/SCopeLoomR", build_vignettes = TRUE)
# Other dependencies for the examples (lower priority)
BiocManager::install(c("SingleCellExperiment"))
或者利用install_github安装
# Github:devtools::install_github("aertslab/AUCell")
devtools::install_github("aertslab/RcisTarget")
devtools::install_github("aertslab/GENIE3")# Bioconductorinstall.packages("https://bioconductor.org/packages/release/bioc/src/contrib/AUCell_1.4.1.tar.gz", repos=NULL)
install.packages("https://bioconductor.org/packages/release/bioc/src/contrib/RcisTarget_1.2.1.tar.gz", repos=NULL)
install.packages("https://bioconductor.org/packages/release/bioc/src/contrib/GENIE3_1.4.3.tar.gz", repos=NULL)
然后开始真正的重头戏:安装R包SCENIC
# install.packages("devtools")
devtools::install_github("aertslab/SCENIC", ref="v1.1.0")
packageVersion("SCENIC")
安装完R包之后,还要下载motif分析(R包RcisTarget)所需的物种特异的数据库:
motif数据库下载网页https://resources.aertslab.org/cistarget/
SCENIC包利用下载DB默认对基因启动子(TSS上游500bp)和TSS上下游10bp的区域的motif进行评分。
人:
dbFiles <- c("https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-500bp-upstream-7species.mc9nr.feather","https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg19/refseq_r45/mc9nr/gene_based/hg19-tss-centered-10kb-7species.mc9nr.feather")
鼠:
dbFiles <- c("https://resources.aertslab.org/cistarget/databases/mus_musculus/mm9/refseq_r45/mc9nr/gene_based/mm9-500bp-upstream-7species.mc9nr.feather","https://resources.aertslab.org/cistarget/databases/mus_musculus/mm9/refseq_r45/mc9nr/gene_based/mm9-tss-centered-10kb-7species.mc9nr.feather")
果蝇:
dbFiles <- c("https://resources.aertslab.org/cistarget/databases/drosophila_melanogaster/dm6/flybase_r6.02/mc8nr/gene_based/dm6-5kb-upstream-full-tx-11species.mc8nr.feather")
下载需要分析物种对应的.feather或者.descr文件。
为了避免下载问题(如网速过慢)导致下载文件不完整,官方建议使用zsync_curl下载;如一定要用R下载,可以按下面的代码执行
# dir.create("cisTarget_databases"); setwd("cisTarget_databases") # if needed
for(featherURL in dbFiles)
{
download.file(featherURL, destfile=basename(featherURL))
descrURL <- gsub(".feather$", ".descr", featherURL)
if(file.exists(descrURL)) download.file(descrURL, destfile=basename(descrURL))
}
最后通过sha256sum确定是否下载正确
https://resources.aertslab.org/cistarget/databases/sha256sum.txt
a95624e792200f2c53c4a184056660e3d29b5b59a7d6ba90ea0762d8cba960c7 dm3-regions-11species.mc9nr.feather
4944d8bd771ee0c039416e97a546836b4a96120eb4eb4c45b67943ca9f0e80c9 dm6-5kb-upstream-full-tx-11species.mc8nr.feather
2843a63e39149cded2319894430ef18529d9d7b3e7357450a6b6812096c73fef dm6-regions-11species.mc8nr.feather
43c1f004caf9e52ecebd9ba232e730d70ea802588b9b6b5fb73e8a95d2137d33 hg19-500bp-upstream-10species.mc8nr.feather
fd426e4fe1ac0de515ee791f53b02a9bd5cefbe559fb62f50864be1ec01638a0 hg19-500bp-upstream-10species.mc9nr.feather
1ffa58e97520cb4948a56a0dd391cec9c8542d9aa503901e3d4416b4f860d725 hg19-500bp-upstream-7species.mc8nr.feather
12576cfc5f19354610831a558ce4ec42780735b7d840e0a06259c080880bcc6e hg19-500bp-upstream-7species.mc9nr.feather
d43106ae9bc11ea610437175fe9b58693dd089246c8eab906760a6753574b792 hg19-regions-9species.all_regions.mc9nr.feather
4ca3d546e14ae9a840fdc2d5385beb2df9206eb86cf765279c542df0280652f5 hg19-regions-9species.all_regions.mc8nr.feather
a33b93e11d4869e8ee5d04534809b980f05d0542a176dababe4f3fb28d778797 hg19-tss-centered-10kb-10species.mc8nr.feather
9f804bef9ae9579f0a15e5adf5030a389c58d967f5eb7af3a7b89f7226a78933 hg19-tss-centered-10kb-10species.mc9nr.feather
df5054813bfc49cc45171f41ef76c9b99ee9e09c80c559ffadccd7382e52d57a hg19-tss-centered-10kb-7species.mc8nr.feather
20135a199f8883a456e5d0a4de66a3fc0ff33b2d8bd0f7b92dd80a8eaef9fee1 hg19-tss-centered-10kb-7species.mc9nr.feather
1d3287279d8b00e0d3d64c51449c4656a15f6e9a473fbea3d386fcd410fa4a93 hg19-tss-centered-5kb-10species.mc8nr.feather
66175ee01f83c888d5bd5fcad0242f651c1667548004e19f84d84b88bb677684 hg19-tss-centered-5kb-10species.mc9nr.feather
bc9155423690db464277212d7f5cea67439f4407b6cb24de0e49bf4e34e11353 hg19-tss-centered-5kb-7species.mc8nr.feather
5a923461c6abc5ef9f33fa37a4033fe456c5a61afa76e03898fe8d1257e3659b hg19-tss-centered-5kb-7species.mc9nr.feather
fea7f9159645392970ecb2c902fb0622681dd63b9a47b36363f50569c5989f62 hg38__refseq-r80__10kb_up_and_down_tss.mc9nr.feather
e7f980ec2f9ddedcfc563d9ab045ea6b769eba654d3348a1fc6140b1575f9428 hg38__refseq-r80__500bp_up_and_100bp_down_tss.mc9nr.feather
70a808fb5fab0a5e97c4ab3749bb7c4610437b4140ee3ebb331b500e2a10df3d mm10__refseq-r80__10kb_up_and_down_tss.mc9nr.feather
ffc5eecfad00f799704737e78522c389595210ad58f3ca64fe959d78284a2323 mm10__refseq-r80__500bp_up_and_100bp_down_tss.mc9nr.feather
351ba4d0d09b350f575f94dd43aeed72719c8277efa8d58d235e242c95837d81 mm9-500bp-upstream-10species.mc8nr.feather
283c14912ab895ddd221f225cbf6aad9e1119ecaeeac6dcdd839a7fd6dba62ba mm9-500bp-upstream-10species.mc9nr.feather
27925863c3cc95033e3f7f989a34ae3c8c1e4d2b8e4877f215d249dd23067863 mm9-500bp-upstream-7species.mc8nr.feather
bba21fb3b7e96ebfb97d31a59d661678973073b77b1c3e7a1bb2e49114a82425 mm9-500bp-upstream-7species.mc9nr.feather
76c069c92d22dae9f5ab50cf4289524c081442041bc0a98bb54ab118ae072715 mm9-tss-centered-10kb-10species.mc8nr.feather
337518ebc04205122a24c3385fa349d1a238a564d186f60b0e6bcb7eb2a65688 mm9-tss-centered-10kb-10species.mc9nr.feather
62137ad2d883d6dfb5be3375e203f51ae406963bebbbf3a8886d712e3234765b mm9-tss-centered-10kb-7species.mc8nr.feather
ad7ee54883f5964c0e699e5c5bab08589eb0626599297085197cb6f80c5e12fc mm9-tss-centered-10kb-7species.mc9nr.feather
18f41361f5eeec0963e426f42db66824d1dcd184a0c04a412e1b7ab146fdbac6 mm9-tss-centered-5kb-10species.mc8nr.feather
ce36176f30c8c8ea811403127ed9c1cdb83d9a3fdaa8573de4569ba99f1f4b28 mm9-tss-centered-5kb-10species.mc9nr.feather
3ce3a4653903b3c2cff41b382a5c7ce34bbaab8716b2cf5d3159b2b9542dee98 mm9-tss-centered-5kb-7species.mc8nr.feather
4675c2e86e40bb041a933f573e7564d738e866ea1b1b9c614155c9955d29fb70 mm9-tss-centered-5kb-7species.mc9nr.feather
286dd4e60d743a43e7ae19eb8eaa8589a5e2e8a74b6fce04dfeeb2cbb72b700d mm9-regions-9species.all_regions.mc9nr.feather