10X单细胞(10X空间转录组)细胞通讯分析之Inferring a spatial code of cell-cell interactions(cell2cell)

把核心放在第一句,Intercellular distance and interactions are negatively correlated.

hello,大家好,今天我们再来分享一个有关细胞通讯的内容,而且和细胞位置的空间相关联,文章在Inferring a spatial code of cell-cell interactions across a whole animal body,所以对细胞通讯的认识又更近了一层。我们也要与时俱进,跟上时代。

图片.png

Summary(提取一下关键信息)

1、compute the potential for intercellular interactions from the coexpression of ligand-receptor pairs.(看来对配受体的相对位置更加的看重了)。
2、a genetic algorithm we identify the ligand-receptor pairs most informative of the spatial organization of cells(配体-受体对最能提供细胞空间组织的信息 )。
3、The resulting intercellular distances are negatively correlated with the potential for cell-cell interaction(确实,细胞之间的距离和细胞通讯强度成反比)。
4、single-cell molecular measurements provide spatial information that may help elucidate organismal phenotypes and disease.(这才是终极目的)。

其中我认为最为重要的认知就是Intercellular distance and interactions are negatively correlated。

Introduction

1、CCIs relay signals between cells and trigger downstream signaling events that culminate in altered gene expression.(基础认知)。
2、通过这些和其他功能相互作用,CCI 形成相互作用的空间模式并调节集体细胞行为。
3、(划一下重点)CCIs often take the form of secreted or surface proteins produced by a sender cell (ligands) interacting with their cognate surface proteins in a receiver cell (receptors). Ligands can mediate CCIs across a range of distances and can encode positional information for cells within tissues, which is critical for cellular function and decision-making, and therefore organismal phenotypes。例如,一些配体形成梯度作为细胞迁移的线索。因此,研究 CCI 可以帮助阐明介导 CCI 的分子及其空间环境如何协调多细胞功能。
4、CCIs can define cell location and community spatial structure, enabling coordination of functions between interacting cells(这一点也很重要)。
5、As such, molecules mediating CCIs encode and pass a spatial code between cells.所以研究CCI可以帮助解码空间组织和功能。
Although spatial information is lost during tissue dissociation in conventional single-cell RNA-sequencing technologies (scRNA-seq), previous studies have proven that gene expression levels still encode spatial information that can be recovered by adding extra information such as protein-protein interactions and/or microscopy data(这个被空间转录组完美的解决了~~)。不过有一些软件是根据单细胞数据的通讯作用来推断细胞之间的相对距离,比如RNA-Magnet、ProximID等。
单细胞分析细胞通讯的问题,it remains unclear if one can find, in RNA, a spatial code of messages transmitted between cells that defines spatial organization and cellular functions across a whole animal body.

看一下结果,

1、Computing cell-cell interactions
最为核心的一句话,CCI score is based on the idea that proximal cells coordinate their gene expressions such that their total production of ligands and receptors is more complementary than with distant cells。
Intercellular communication allows cells to coordinate their gene expression and to form spatial patterns of molecule exchange,These events also allow cells to sense their spatial proximity。该 CCI 分数是根据配体和受体的 mRNA 表达计算得出的,以表示一对相互作用细胞的分子互补性。 与之前的 CCI 分数相比,权衡了一对细胞用于通过配对中每个细胞产生的配体和受体的总和进行交流的 LR 对的数量 。CCI 评分的主要假设是细胞间距离越小,一对细胞中配体和受体的产生就越互补(这个才是真正的细胞通讯)。
图片.png
图片.png

看来对于通讯来讲,一方面是强度,一方面是距离。而且关键在于定义长中短距离的通讯定义分析,我们来看一下示例代码(scRNA)。

代码

1、加载模块
import cell2cell as c2c
import scanpy as sc
import pandas as pd
2、读取数据(h5ad的数据结构大家应该都清楚吧)。
rnaseq = sc.read_h5ad('pbmc.h5ad')
3、读取先验的配受体对,这个大家找一个数据库的配受体对就可以了,比如cellphoneDB
lr_pairs = pd.read_csv('Human-2020-Jin-LR-pairs.csv')
图片.png
The names of genes/proteins have to match those in the rnaseq dataset.
So we will make all names to be all capital letters. We will also change the annotation of the complexes to easily integrate the data with cell2cell.
# Change complex annotations
lr_pairs['ligand2'] = lr_pairs.interaction_name_2.apply(lambda x: x.split(' - ')[0].upper())
lr_pairs['receptor2'] = lr_pairs.interaction_name_2.apply(lambda x: x.split(' - ')[1].upper() \
                                                       .replace('(', '').replace(')', '').replace('+', '&'))

lr_pairs['c2c_interaction'] = lr_pairs.apply(lambda row: row['ligand2'] + '^' + row['receptor2'], axis=1)
Metadata for the single cells
meta = rnaseq.obs.copy()
meta.head()
图片.png

Cell-cell Interactions and Communication Analysis

The pipeline integrates the RNA-seq and PPI datasets by using the analysis setups. It generates an interaction space containing an instance for each sample/cell type, containing the values assigned to each protein in the PPI list given the setups for computing the CCI and CCC scores.
interactions = c2c.analysis.SingleCellInteractions(rnaseq_data=rnaseq.to_df().T,
                                                   ppi_data=lr_pairs,
                                                   metadata=meta,
                                                   interaction_columns=('ligand2', 'receptor2'),
                                                   communication_score='expression_thresholding',
                                                   expression_threshold=0.1, # values after aggregation
                                                   cci_score='bray_curtis',
                                                   cci_type='undirected',
                                                   aggregation_method='nn_cell_fraction',
                                                   barcode_col='index',
                                                   celltype_col='cluster',
                                                   complex_sep='&',
                                                   verbose=False)
Compute communication scores for each PPI or LR pair
interactions.compute_pairwise_communication_scores()
Compute CCI scores for each pair of cells
It is computed according to the analysis setups. We computed an undirected Bray-Curtis-like score for each pair, meaning that score(C1, C2) = score(C2, C1). Notice that our score is undirected, so for C1 and C2 was not necessary to compute C2 and C1 as happened for the communication scores(这个是核心思想)
interactions.compute_pairwise_cci_scores()
Perform permutation analysis
cci_pvals = interactions.permute_cell_labels(evaluation='interactions', 
                                             permutations=10, 
                                             fdr_correction=False,
                                             verbose=True)
cci_pvals
图片.png
ccc_pvals = interactions.permute_cell_labels(evaluation='communication',
                                             permutations=10, 
                                             fdr_correction=False,
                                             verbose=True)
图片.png

可视化

group_meta = pd.DataFrame(columns=['Celltype', 'Group'])
group_meta['Celltype'] = meta['cluster'].unique().tolist()
group_meta['Group'] = ['Mono', 'DC', 'T', 'T', 'T', 'T', 'Mk', 'B', 'B', 'DC', 'Mono', 'NK', 'Eryth']
图片.png
颜色设置
colors = c2c.plotting.get_colors_from_labels(labels=group_meta['Group'].unique().tolist(),
                                             cmap='tab10'
                                            )
Visualize communication scores for each LR pair and each cell pair
interaction_clustermap = c2c.plotting.clustermap_ccc(interactions,
                                                     metric='jaccard',
                                                     method='complete',
                                                     metadata=group_meta,
                                                     sample_col='Celltype',
                                                     group_col='Group',
                                                     colors=colors,
                                                     row_fontsize=14,
                                                     title='Active ligand-receptor pairs for interacting cells',
                                                     filename=None,
                                                     cell_labels=('SENDER-CELLS', 'RECEIVER-CELLS'),
                                                     **{'figsize' : (10,9)}
                                                     )

# Add a legend to know the groups of the sender and receiver cells:
l1 = c2c.plotting.generate_legend(color_dict=colors,
                                  loc='center left',
                                  bbox_to_anchor=(20, -2), # Indicated where to include it
                                  ncol=1, fancybox=True,
                                  shadow=True,
                                  title='Groups',
                                  fontsize=14,
                                 )
图片.png

Circos plot

sender_cells = ['DC', 'pDC']
receiver_cells = ['CD8 T', 'CD4 Memory T', 'B activated']
ligands = ['TGFB1',
           'APP',
           'MIF',
           'CCL3'
          ]
receptors = ['TGFBR1&TGFBR2',
             'CD74&CD44',
             'CD74',
             'CCR1',
            ]

c2c.plotting.circos_plot(interaction_space=interactions,
                         sender_cells=sender_cells,
                         receiver_cells=receiver_cells,
                         ligands=ligands,
                         receptors=receptors,
                         excluded_score=0,
                         metadata=group_meta,
                         sample_col='Celltype',
                         group_col='Group',
                         colors=colors,
                         fontsize=15,
                        )
图片.png
c2c.plotting.circos_plot(interaction_space=interactions,
                         sender_cells=sender_cells,
                         receiver_cells=receiver_cells,
                         ligands=ligands,
                         receptors=receptors,
                         excluded_score=0,
                         fontsize=20,
                         ligand_label_color='orange',
                         receptor_label_color='brown',
                        )
图片.png

Dot plot for significance

fig = c2c.plotting.dot_plot(interactions,
                            evaluation='communication',
                            significance = 0.11,
                            figsize=(16, 9),
                            cmap='PuOr',
                            senders=sender_cells,
                            receivers=receiver_cells
                            )
图片.png

Visualize CCI scores

Since this case is undirected, a triangular heatmap is plotted instead of the complete one.
cm = c2c.plotting.clustermap_cci(interactions,
                                 method='complete',
                                 metadata=group_meta,
                                 sample_col="Celltype",
                                 group_col="Group",
                                 colors=colors,
                                 title='CCI scores for cell-types',
                                 cmap='Blues'
                                 )

# Add a legend to know the groups of the sender and receiver cells:
l1 = c2c.plotting.generate_legend(color_dict=colors,
                                  loc='center left',
                                  bbox_to_anchor=(20, -2), # Indicated where to include it
                                  ncol=1, fancybox=True,
                                  shadow=True,
                                  title='Groups',
                                  fontsize=14,
                                 )
图片.png

Dot plot for significance

fig = c2c.plotting.dot_plot(interactions,
                            evaluation='interactions',
                            significance = 0.11,
                            figsize=(16, 9),
                            cmap='Blues',
                            )
图片.png

Project samples/cells with PCoA into a Euclidean space

We can project the samples/cells given their CCI scores with other cells and see how close they are given their potential of interaction(这部分最好)
if interactions.analysis_setup['cci_type'] == 'undirected':
        
    pcoa = c2c.plotting.pcoa_3dplot(interactions,
                                    metadata=group_meta,
                                    sample_col="Celltype",
                                    group_col="Group",
                                    title='PCoA based on potential CCIs',
                                    colors=colors,
                                    )
图片.png
if interactions.analysis_setup['cci_type'] == 'undirected':
    celltype_colors = c2c.plotting.get_colors_from_labels(labels=meta['cluster'].unique().tolist(),
                                                          cmap='tab10'
                                                         )    
    pcoa = c2c.plotting.pcoa_3dplot(interactions,
                                    title='PCoA based on potential CCIs',
                                    colors=celltype_colors,
                                    )
图片.png

生活很好,有你更好

你可能感兴趣的:(10X单细胞(10X空间转录组)细胞通讯分析之Inferring a spatial code of cell-cell interactions(cell2cell))