软件开发公司 Cellphonedb_v5单细胞互作分析(视频教程)

你的位置:专业软件开发多少钱 > 联系我们 > 软件开发公司 Cellphonedb_v5单细胞互作分析(视频教程)
软件开发公司 Cellphonedb_v5单细胞互作分析(视频教程)
发布日期:2024-08-09 08:08    点击次数:134

1、《KS科研共享与劳动》公众号有QQ相通群,然而干预门槛是20元,请讨论明晰。群里有推文的精粹代码和示例数据,付费实质半价,还不错与大家相通。

2、需进群粗略打包代码的小伙伴请添加作家微信了解,请备注指标,除此除外请勿添加,谢谢!

3、付费著述麇集有打包价哦(公众号悉数付费实质)!购买打包代码的小伙伴可加入微信VIP群,福利更多,微信群帖子提前发布,可获取更多实质!

点击:→ 加入微信vip群:《KS科研共享与劳动》付费实质打包麇集

细目请联系作家:

Cellphonedb是常用的细胞通信分析器具:咱们之前先容过《CellPhoneDB单细胞互作分析(2):数据分析|东说念主鼠基因同源回荡|ERROR措置|详备精粹版代码》。这照旧一年前的实质,那时候是cellphonedb v3,那时我铭记困扰大家的问题王人是一些环境确立,软件装置之类的。然而近半年也曾莫得东说念主再问雷同的问题了,我念念应该大大批东说念主应该在这方面也曾很娴熟了,不会再有问题了!

然而照旧有小伙伴问说念一些问题,“我网上的过失生效装置了cellphonedb,然而怎么终局找不到command得嘞”?率先你莫得错,你软件也装置生效了,其次,cellphonedbv4之后,代码启动不再像v3相似终局的风物,而是仅复古python的启动风物。时间过得亦然很快,上个月小伙伴说cellphonedb王人到V5了,最近沸沸扬扬的各式更新,原本咱们就有更新cellphonedb教程的兴味了,那么此次刚好,就跳过cellphonedb4,告成看V5。不外在使用操作上死别倒是不大。

率先咱们望望cellphonedb V5有哪些新的实质。以下实质贴自cellphonedb官网,可自行搜检。此外,软件定制开发官网也提供了详备的示例教程。

app

Novel features in v5

https://github.com/ventolab/CellphoneDB

New python package that can be easily executed in Jupyter Notebook and Collabs.

A scoring methodology to rank interaction based on the expression specificity of the interacting partners.

A CellSign module to leverage interactions based on the activity of the transcription factor downstream the receptor. This module is accompanied by a collection of 211 well described receptor-transcription factor direct relationships.

上期开出前区012路比为1:2:2,近十期0路号码开出15次,1路开出16次,2路开出19次,本期关注012路比3:2:0。

A new method of querying of CellphoneDB results search_utils.search_analysis_results.

Improved computational efficiency of method 2 cpdb_statistical_analysis_method.

A new database (cellphonedb-data v5.0) with more manually curated interactions, making up to a total of ~3,000 interactions. This release of CellphoneDB database has three main changes:

Integrates new manually reviewed interactions with evidenced roles in cell-cell communication.

Includes non-protein molecules acting as ligands.

For interactions with a demonstrated signalling directionality, partners have been ordered according (ligand is partner A, receptor partner B).

Interactions have been classified within signaling pathways.

CellphoneDB no longer imports interactions from external resources. This is to avoid the inclusion of low-confidence interactions.

完好版实质已发布至微信VIP群,请自行查收!视频教程后续发布!咱们这里的演示是在jupyter中进行的,要是你用的是劳动器,如何使用jupyter不错搜检官网手册(有Rstudio、有jupyter、具有root权限的劳动器,你值得领有 (注册领取200优惠券)!)。率先装置cellphonedb V5。
#装置cellphonedb v5pip install cellphonedb -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
接下来等于整理cellphonedbV5分析需要的文献了,雷同于之前的V3。咱们的教程里演示了从seurat粗略h5ad得到input文献。主要有三个必须文献,matrix、metadata以及cellphonedb v5 database。cellphonedb v5 database不错自界说,按照官网条目即可。
from IPython.display import HTML, displayfrom cellphonedb.utils import db_releases_utilsdisplay(HTML(db_releases_utils.get_remote_database_versions_html()['db_releases_html_table']))#咱们这里用最新的,界说cpdb的版块为5.0. 并下载database。cpdb_version = 'v5.0.0'cpdb_target_dir = os.path.join('./', cpdb_version)from cellphonedb.utils import db_utilsdb_utils.download_database(cpdb_target_dir, cpdb_version)
接下来分析即可:一般过失咱们用statistical_analysis_method。
#一股脑的把能加载的王人加载了,虽然了,也王人是有效的import numpy as npimport pandas as pdimport seaborn as snsimport scanpy as scfrom glob import iglobimport anndataimport os#import sklearnfrom sklearn.linear_model import LogisticRegressionimport matplotlib as mplimport scipyimport matplotlib.pyplot as pltimport pickle
sc.settings.verbosity = 3  # verbosity: errors (0), warnings (1), info (2), hints (3)sc.logging.print_versions()sc.settings.set_figure_params(dpi=100)  # low dpi (dots per inch) yields small inline figures
cpdb_file_path = './v5.0.0/cellphonedb.zip'meta_file_path = './cellphonedb_meta.txt'counts_file_path = './Normalized_counts.txt'out_path = './test1'
#一般过失咱们用statistical_analysis_method。(平淡的互作分析,并推断互作分析权贵性)from cellphonedb.src.core.methods import cpdb_statistical_analysis_methodcpdb_results = cpdb_statistical_analysis_method.call(    cpdb_file_path = cpdb_file_path,                     meta_file_path = meta_file_path,                    counts_file_path = counts_file_path,                counts_data = 'hgnc_symbol',                        #active_tfs_file_path = active_tf_path,           #microenvs_file_path = microenvs_file_path,         score_interactions = True,                         iterations = 1000,                               threshold = 0.1,                                   threads = 5,                                    debug_seed = 42,                                    result_precision = 3,                               pvalue = 0.05,                                      separator = '|',                                   debug = False,                                     output_path = out_path                  )
cellphonedb V5的启动速率是大大普及,不错看一下启动日记。一个字:快!
Reading user files...The following user files were loaded successfully:./Normalized_counts.txt./cellphonedb_meta.txt[][CORE][21/12/23-16:58:42][INFO] [Cluster Statistical Analysis] Threshold:0.1 Iterations:1000 Debug-seed:42 Threads:5 Precision:3[][CORE][21/12/23-16:58:42][WARNING] Debug random seed enabled. Set to 42[][CORE][21/12/23-16:58:43][INFO] Running Real Analysis[][CORE][21/12/23-16:58:43][INFO] Running Statistical Analysis100%|██████████| 1000/1000 [03:23<00:00,  4.91it/s][ ][CORE][21/12/23-17:02:08][INFO] Building Pvalues result[ ][CORE][21/12/23-17:02:09][INFO] Building results[ ][CORE][21/12/23-17:02:09][INFO] Scoring interactions: Filtering genes per cell type..100%|██████████| 12/12 [00:00<00:00, 42.54it/s][ ][CORE][21/12/23-17:02:09][INFO] Scoring interactions: Calculating mean expression of each gene per group/cell type..100%|██████████| 12/12 [00:00<00:00, 173.78it/s][ ][CORE][21/12/23-17:02:10][INFO] Scoring interactions: Calculating scores for all interactions and cell types..100%|██████████| 144/144 [00:33<00:00,  4.27it/s]Saved deconvoluted to ./test1/statistical_analysis_deconvoluted_12_21_2023_170246.txtSaved deconvoluted_percents to ./test1/statistical_analysis_deconvoluted_percents_12_21_2023_170246.txtSaved means to ./test1/statistical_analysis_means_12_21_2023_170246.txtSaved pvalues to ./test1/statistical_analysis_pvalues_12_21_2023_170246.txtSaved significant_means to ./test1/statistical_analysis_significant_means_12_21_2023_170246.txtSaved interaction_scores to ./test1/statistical_analysis_interaction_scores_12_21_2023_170246.txt
临了咱们得到的文献如下:和V3相似,那么当然,可视化就不错集合咱们之前的!
list(cpdb_results.keys())#['deconvoluted',# 'deconvoluted_percents',# 'means',# 'pvalues',# 'significant_means',# 'CellSign_active_interactions',# 'CellSign_active_interactions_deconvoluted',# 'interaction_scores']

虽然了,ktplotspy包,也等于ktplot的python版,也出了特意针对V5的可视化。要是不在python中进行可视化,得到的文献在R中进行可视化亦然不错的。一些基本可视化如下:

图片软件开发公司

图片

但愿共享对你有启发,其他的可自行搜检官网,亦然有详备的教程!认为共享有效的,点个赞再走呗! 本站仅提供存储劳动,悉数实质均由用户发布,如发现存害或侵权实质,请点击举报。