hello,今天我们分享一个简单的,将最近流行的细胞通讯分析软件整合在一起,分析我们的单细胞数据,直接看看代码部分
注意一个名词, cell-cell communication (CCC),细胞通讯的软件方法很多了,these methods and resources are usually in a fixed combination of a tool and its corresponding resource, but in principle any resource could be combined with any method.(随意结合)。
图片.png
加载包
require(liana)
require(tibble)
require(purrr)
首先看看数据库来源
# Resource currently included in OmniPathR (and hence `liana`) include:
get_resources()
#> [1] "Reshuffled" "Default" "CellChatDB" "CellPhoneDB"
#> [5] "Ramilowski2015" "Baccin2019" "LRdb" "Kirouac2010"
#> [9] "ICELLNET" "iTALK" "EMBRACE" "HPMR"
#> [13] "Guide2Pharma" "connectomeDB2020" "talklr" "CellTalkDB"
#> [17] "OmniPath"
# A list of resources can be obtained using the `select_resource()` function:
# See `?select_resource()` documentation for further information.
# select_resource(c('OmniPath')) %>% glimpse()
来源是真地多。
CCC Methods
- CellPhoneDB algorithm (via Squidpy)
- CellChat
- NATMI
- Connectome
- SingleCellSignalR (SCA)
- iTALK
目前就支持这么多方法,但是后续本人会再往上添加分析方法。
调用包装函数 liana
liana_path <- system.file(package = "liana")
testdata <-
readRDS(file.path(liana_path , "testdata", "input", "testdata.rds"))
testdata %>% glimpse()
#> Formal class 'Seurat' [package "Seurat"] with 13 slots
#> ..@ assays :List of 1
#> .. ..$ RNA:Formal class 'Assay' [package "Seurat"] with 8 slots
#> ..@ meta.data :'data.frame': 90 obs. of 4 variables:
#> .. ..$ orig.ident : Factor w/ 1 level "pbmc3k": 1 1 1 1 1 1 1 1 1 1 ...
#> .. ..$ nCount_RNA : num [1:90] 4903 3914 4973 3281 2641 ...
#> .. ..$ nFeature_RNA : int [1:90] 1352 1112 1445 1015 928 937 899 1713 960 888 ...
#> .. ..$ seurat_annotations: Factor w/ 3 levels "B","CD8 T","NK": 1 1 1 1 3 3 1 1 1 1 ...
#> ..@ active.assay: chr "RNA"
#> ..@ active.ident: Factor w/ 3 levels "