PMA Treatment Effects on Cell Type Distribution and Phosphorylation

This notebook investigates the effects of PMA treatment on cell type distribution (see Generate_Cell_Types.ipynb), surface marker behavior, and phosphorylation behavior. First, we import the data and initialize some parameters.

In [1]:
import pandas as pd
from clustergrammer_widget import *
net = Network(clustergrammer_widget)

Load data and subsample equal sized (110,000 cells) subsets. PMA treated cells are referred to as 'PMA Treated' and untreated cells are referred to as 'Plasma Treated'.

In [2]:
# Plasma Treated
net.load_file('../cytof_data/Plasma_UCT.txt')
net.random_sample(axis='row', num_samples=110000, random_state=99)
df_plasma = net.export_df()

print(df_plasma.shape)

# PMA Treated
net.load_file('../cytof_data/PMA_UCT.txt')
net.random_sample(axis='row', num_samples=110000, random_state=99)
df_pma = net.export_df()

print(df_pma.shape)
(110000, 28)
(110000, 28)

Cell Line Breakdowns

Here we will examine how PMA treatment the populations of different cell-types. We see some small changes to several cell-type populations ...

[I'm working on making the cell-type bar graphs]

In [3]:
# net.load_df(df_plasma)
# net.random_sample(axis='row', num_samples=2000, random_state=99)
# df_plasma_sub = net.export_df()
# net.filter_cat('col', 1, 'Marker-type: surface marker')
# net.normalize(axis='col', norm_type='zscore', keep_orig=False)
# net.clip(-10, 10)
# net.cluster(views=[])
# net.widget()
In [4]:
# net.load_df(df_pma)
# net.random_sample(axis='row', num_samples=2000, random_state=99)
# df_pma_sub = net.export_df()
# net.filter_cat('col', 1, 'Marker-type: surface marker')
# net.normalize(axis='col', norm_type='zscore', keep_orig=False)
# net.clip(-10, 10)
# net.cluster(views=[])
# net.widget()

Here we manually set the colors for cell types and marker types for later visualizations.

In [5]:
# manually set treatment colors
net.set_cat_color('col', 1, 'Marker-type: phospho marker', 'red')
net.set_cat_color('col', 1, 'Marker-type: surface marker', 'blue')

# manually set row colors: subsample
net.set_cat_color('row', 2, 'B cells', '#22316C')
net.set_cat_color('row', 2, 'Basophils', '#000033')
net.set_cat_color('row', 2, 'CD14hi monocytes', 'yellow')
net.set_cat_color('row', 2, 'CD14low monocytes', '#93b8bf')
net.set_cat_color('row', 2, 'CD1c DCs', '#3636e2')
net.set_cat_color('row', 2, 'CD4 Tcells', 'blue')
net.set_cat_color('row', 2, 'CD4 Tcells_CD127hi', '#FF6347')
net.set_cat_color('row', 2, 'CD4 Tcells CD161hi', '#F87531')
net.set_cat_color('row', 2, 'CD4 Tcells_Tregs', '#8B4513')
net.set_cat_color('row', 2, 'CD4 Tcells+CD27hi', '#330303')
net.set_cat_color('row', 2, 'CD8 Tcells', '#ffb247')
net.set_cat_color('row', 2, 'Neutrophils', 'purple')
net.set_cat_color('row', 2, 'NK cells_CD16hi', 'red')
net.set_cat_color('row', 2, 'NK cells_CD16hi_CD57hi', 'orange')
net.set_cat_color('row', 2, 'NK cells_CD56hi', '#e052e5')
net.set_cat_color('row', 2, 'Undefined', 'gray')

# manually set treatment colors
net.set_cat_color('row', 1, 'Treatment: Plasma', 'blue')
net.set_cat_color('row', 1, 'Treatment: PMA', 'red')

PMA vs Plasma Treatment in Surface-Marker- and Phospho-Space

Here we will visualize PMA's effect on cells in surface-marker- and phospho-space. Since PMA is thought to effect phosphorylation signaling we expect it to have a large effect on cells in phospho-space but not necessarily surface-marker space.

First, we take two equal sized subsamples (2,000 cells) from Plasma- and PMA-Treated datasets and merge them into a single DataFrame called df_merge_sub.

In [6]:
net.load_df(df_plasma)
net.random_sample(axis='row', num_samples=2000, random_state=99)
df_plasma_sub = net.export_df()

net.load_df(df_pma)
net.random_sample(axis='row', num_samples=2000, random_state=99)
df_pma_sub = net.export_df()

df_merge_sub = pd.concat([df_plasma_sub, df_pma_sub])
print('df_merge_sub has 4000 cells and 28 markers')
print(df_merge_sub.shape)
df_merge_sub has 4000 cells and 28 markers
(4000, 28)

PMA vs Plasma Treatment in Surface-Marker-Space

Here we will visualize PMA's effect on cells in surface-marker-space by merging PMA- and Plasma-treated cells into a single heatmap. If PMA has a large effect on cells in surface-marker-space then we expect to see clustering of cells based on PMA treatment status.

In [7]:
net.load_df(df_merge_sub)
net.filter_cat('col', 1, 'Marker-type: surface marker')
# normalize surface marker distributions and clip values 
net.normalize(axis='col', norm_type='zscore', keep_orig=False)
net.clip(-10,10)
net.cluster(views=[])
net.widget()

Above we see that PMA treated cells (rows with red treatment category) largely do not cluster separately from Plasma-treated cells. We can conclude that PMA treatment does not have a large effect on surface marker behavior, as expected.

However, we do see a small cluster of PMA treated CD14hi monocytes (yellow Category 2, second row category). This implies that PMA treatment may effect the surface maker behaviof CD14hi monocytes.

We also see that cells cluster based on their cell-type (second row catetgory, Category 2), which is expected because cell-types were defined based on surface-marker behavior (see Generate_Cell_Types.ipynb).

PMA vs Plasma in Phospho-Space

Again we will visualize PMA's effect on cells, but this time in phospho-space. If PMA has a large effect on cells in phospho-marker space then expect to see clustering of cells based on PMT treatment status.

In [8]:
net.load_df(df_merge_sub)
net.filter_cat('col', 1, 'Marker-type: phospho marker')
# normalize surface marker distributions and clip values 
net.normalize(axis='col', norm_type='zscore', keep_orig=False)
net.clip(-10,10)
net.cluster(views=[])
net.widget()

Above we see that PMA treated cells (rows with red treatment category) cluster separately from Plasma-treated cells and we can conclude that PMA does have a large effect on phospho-marker behavior as expected.

We also see some clustering of cells based on cell types. One of the most prominent examples of this is the cluster of PMA treated CD14hi monocytes (yellow second row category) with high phosphorylation levels of pCREB, pMAPKAP2, pERK12, and pp38. This implies that CD14hi monocytes have a distinct response to PMA treatment.

CD14hi Monocytes

Above we observed that PMA treatment has its primary effect on phosphorylation and that the cell-type CD14hi monocytes has a distinct response to PMA treatment. In order to investigate this cell-type more closely we will generate a heatmap with only CD14hi monocyte cells and observe PMA's effects in surface-marker and phospho-marker space.

In [9]:
net.load_df(df_merge_sub)
# normalize surface-markers and phospho-markers across all cell-types
net.normalize(axis='col', norm_type='zscore', keep_orig=False)
# filter for only CD14hi monocyte cells
net.filter_cat('row', 2, 'CD14hi monocytes')
net.clip(-10,10)
net.cluster(views=[])
net.widget()

Above we see that CD14hi monocyte cells cluster based on PMA treatment (see row Treatment category). Here we see that PMA treatment of CD14hi monocytes clearly increases the levels of the phospho-markers: pCREB, pMAPKAP2, pERK12, pp38. We also observe that the surface marker CD14 is high regardless of PMA treatment. Finally, most surface markers do not appear to be effected by PMA treatment with the exception of CD38 which is decreased with PMA treatment. This implies that CD38 surface-marker levels in CD14hi monocytes may be sensitive to PMA treatment.

In [ ]: