This notebook will visualize the phosphorylation data before and after normalization and processing.
from clustergrammer_widget import *
import pandas as pd
import numpy as np
net = Network()
filename = '../lung_cellline_3_1_16/lung_cl_all_ptm/precalc_processed/ptmCCLE_col-iqn.txt'
net.load_file(filename)
net.dat['mat'].shape
(8468, 37)
df = net.export_df()
df = df.transpose()
cols = df.columns.tolist()
keep_cols = []
for inst_col in cols:
if '_phospho_' in inst_col:
keep_cols.append(inst_col)
print(len(keep_cols))
5798
df_phos = df[keep_cols]
df_phos = df_phos.transpose()
df_phos.shape
(5798, 37)
df_phos.to_csv('../lung_cellline_3_1_16/lung_cl_all_ptm/precalc_processed/phosCCLE_col-iqn.txt', sep='\t')
net.load_file('../lung_cellline_3_1_16/lung_cl_all_ptm/precalc_processed/phosCCLE_col-iqn.txt')
net.dat['mat'].shape
(5798, 37)
# net.filter_N_top('row', 3000, rank_type='var')
net.dat['mat'].shape
(5798, 37)
net.swap_nan_for_zero()
net.make_clust()
clustergrammer_widget(network=net.widget())