背景介紹
CellPhoneDB是公開提供的精選受體唾琼,配體及其相互作用的存儲庫走触。配體和受體均包含亞基結(jié)構(gòu),可準(zhǔn)確代表異聚復(fù)合物叭首。這是至關(guān)重要的习勤,因?yàn)榧?xì)胞之間的通信依賴于多亞基蛋白質(zhì)復(fù)合物,而這種復(fù)合物超出了大多數(shù)數(shù)據(jù)庫和研究中使用的二進(jìn)制表示形式焙格。
CellPhoneDB獲取的數(shù)據(jù)信息主要來自以下幾個(gè)數(shù)據(jù)庫:UniProt, Ensembl, PDB, the IMEx consortium, IUPHAR图毕。
使用CellPhoneDB
CellPhoneDB的官方網(wǎng):(https://www.cellphonedb.org/)
安裝CellPhoneDB
1. Create python > 3.5 virtual-env
python -m venv cpdb-venv
2.Activate virtual-env
source cpdb-venv/bin/activate
3. Install CellPhoneDB
pip install cellphonedb
CellPhoneDB分析方法
下載數(shù)據(jù)的方法:
curl https://raw.githubusercontent.com/Teichlab/cellphonedb/master/in/example_data/test_counts.txt --output test_counts.txt
curl https://raw.githubusercontent.com/Teichlab/cellphonedb/master/in/example_data/test_meta.txt --output test_meta.txt
1.running the statistical method
cellphonedb method statistical_analysis test_meta.txt test_counts.txt #順序不能改變
2.without using the statistical method
cellphonedb method analysis test_meta.txt test_counts.txt
兩個(gè)測試數(shù)據(jù)下載,我們看一這些數(shù)據(jù)眷唉。
cat test_meta.txt
Cell cell_type
d-pos_AAACCTGAGCAGGTCA NKcells_1
d-pos_AAACCTGGTACCGAGA NKcells_0
d-pos_AAACCTGTCGCCATAA NKcells_1
d-pos_AAACGGGTCAGTTGAC Tcells
d-pos_AAAGATGCATTGAGCT NKcells_0
d-pos_AAAGATGTCCAAAGTC NKcells_0
d-pos_AAAGCAAAGAGGACGG Myeloid
d-pos_AAAGCAACACATTCGA NKcells_1
d-pos_AAAGTAGAGAGCCCAA NKcells_0
d-pos_AAAGTAGCAAGCTGAG NKcells_0
#第一列是Barcode予颤,第二列是細(xì)胞類型
cat test_counts.txt
Gene d-pos_AAACCTGAGCAGGTCA d-pos_AAACCTGGTACCGAGA d-pos_AAACCTGTCGCCATAA d-pos_AAACGGGTCAGTTGAC d-pos_AAAGATGCATT
ENSG00000238009 0 0 0 0 0 0 0 0 0 0
ENSG00000279457 0 0 0 0 0.723769155614119 0 1.1269975757326 1.81828622356148 0
ENSG00000228463 0 0 0 0 0 0 0 0 0.737864655764131 1.40825228390187
ENSG00000237094 0 0 0 0 0 0 0 0 0 0
ENSG00000230021 0 0 0 0 0 0 0 0 0 0
ENSG00000237491 0 0 0 0 0 0 0 0 0 0
ENSG00000177757 0 0 0 0 0 0 0 0 0 0
ENSG00000225880 0 0 0 0 0 0 0 0 0 0
ENSG00000230368 0 0 1.06435707230216 0 0 0 0 0 0 0
#test_counts.txt這個(gè)文件是基因表達(dá)矩陣文件
#輸出結(jié)果
out/
└── celltest
├── deconvoluted.txt
├── means.txt
├── pvalues.txt
└── significant_means.txt
繪制統(tǒng)計(jì)
所以cellphonedb分析時(shí),我們先得到這兩個(gè)文件冬阳,進(jìn)行后續(xù)的分析蛤虐。
目前只能繪制兩種圖形:dot_plot & heatmap_plot
cellphonedb plot dot_plot
cellphonedb plot heatmap_plot yourmeta.txt #yourmeta.txt是barcode和cluster表格
#具體使用
dot_pot
cellphonedb plot dot_plot means.txt pvalues.txt
#其他參數(shù)
--means-path: The means output file [./out/means.txt]
--pvalues-path: The pvalues output file [./out/pvalues.txt]
--output-path: Output folder [./out] #輸出文件路徑
--output-name: Filename of the output plot [plot.pdf] #輸出文件名稱
--rows: File with a list of rows to plot, one per line [all available] #篩選一些特定的受配體對分析
--columns: File with a list of columns to plot, one per line [all available] #篩選特定的細(xì)胞與細(xì)胞
--verbose / --quiet: Print or hide CellPhoneDB logs [verbose]
heatmap_plot
cellphonedb plot heatmap_plot yourmeta.txt
#其他參數(shù)
--pvalues-path: The pvalues output file [./out/pvalues.txt]
--output-path: Output folder [./out]
--count-name: Filename of the output plot [heatmap_count.pdf] #輸出結(jié)果的命名
--log-name: Filename of the output plot using log-count of interactions [heatmap_log_count.pdf]
--count-network-name: Filename of the output netowrk file [count_network.txt] #輸出網(wǎng)絡(luò)文件
--interactions-count-name: Filename of the output interactions-count file [interactions_count.txt]
--pvalue: pvalue threshold to consider when plotting [0.05] #設(shè)置pvalue值,默認(rèn)0.05
--verbose / --quiet: Print or hide cellphonedb logs [verbose]
注意肝陪,cellphonedb只能分析人的數(shù)據(jù)集驳庭,小鼠的數(shù)據(jù)集需要進(jìn)行轉(zhuǎn)化,但是存在丟失部分基因的風(fēng)險(xiǎn)
點(diǎn)圖和熱圖
1.右邊的熱圖表示細(xì)胞類型兩兩之間的相互作用的數(shù)量,我們可以看到沿著對角線饲常,左右是對稱的蹲堂,也就是A-B與B-A的互作數(shù)目是一樣的。
2.左邊是具體受配體對贝淤,細(xì)胞對的互作氣泡圖柒竞,點(diǎn)的大小表示顯著水平,顏色則是The means of the average expression level of interacting molecule 1 in cluster 1 and interacting molecule 2 in cluster 2 注意到了嗎霹娄,說的是interacting molecule 1/2,而沒有說哪一個(gè)是受體哪一個(gè)是配體鲫骗。
原因都和CellPhoneDB內(nèi)置的gene-gene互作關(guān)系列表有關(guān)犬耻。CellPhoneDB區(qū)分不了受體還是配體,對于gene1-gene2执泰,可以是gene1配體gene2受體枕磁,也可以是gene1受體gene2配體。我個(gè)人覺得也是由于這個(gè)原因术吝,右邊那個(gè)熱圖為了說起來方便计济,才把不管做受體還是做配體的關(guān)系都算作是兩種細(xì)胞的互作關(guān)系,因此A-B和B-A在熱圖中的數(shù)值是一樣的(不然橫縱坐標(biāo)寫個(gè)interacting molecule排苍,看到的人自然會問沦寂,這個(gè)分子是受體還是配體呢,加一起就省事了——都包含)淘衙。