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,
                        )
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

生活很好,有你更好

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
禁止轉載,如需轉載請通過簡信或評論聯系作者。

推薦閱讀更多精彩內容