CellPhoneDB主要分成method、plot、query和database4个模块。
安装成功CellPhoneDB后,要先下载CellphoneDB database。下载的地方在cellphoneDB的github里。https://github.com/ventolab/CellphoneDB
练习运行:
在github上下载了test data文件:test_meta.txt,test_counts.txt
在linux命令行输入python3进入python程序,
from cellphonedb.src.core.methods import cpdb_analysis_method
means, deconvoluted = cpdb_analysis_method.call(cpdb_file_path = "/mnt/data/ref/cellphonedb/cellphonedb.zip", meta_file_path = "/mnt/data/ref/cellphonedb/test_meta.txt", counts_file_path = "/mnt/data/ref/cellphonedb/test_counts.txt", counts_data = 'ensembl',output_path = "/mnt/data/ref/a")
注意:
test_counts.txt格式,第一行为:Gene cell1 cell2...
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
counts_data选项,要根据test_counts.txt的基因名为哪种形式来选择ensembl,gene_name ,hgnc_symbol
运行成功后,在输出目录有simple_analysis_means_result_xxx.txt和simple_analysis_deconvoluted_result_xxx.txt文件产生
CellPhoneDB可视化参考:
https://zhuanlan.zhihu.com/p/552055550
网友评论