<jupyter_start><jupyter_text>Exploration of GABA Receptors<jupyter_code>import NotebookImport
from metaPCNA import *<jupyter_output><empty_output><jupyter_text>Prepare data for CYBERSORT input file format<jupyter_code>f = pd.read_table('/cellar/users/agross/Downloads_Old/LM22.txt',
                 index_col=0)
df = matched_tn
df = df.ix[f.index]
df = df.dropna()
df = 2 ** df
df.columns = ['-'.join(c) for c in df.columns]
df.shape
df.to_csv('/cellar/users/agross/Desktop/TCGA_for_CIBERSORT.tab', sep='\t')
cs = pd.read_csv('/cellar/users/agross/Data/DiffExp/CIBERSORT/CIBERSORT.Output_matched_tn_subread.csv', 
                 index_col=0)
cs = FH.fix_barcode_columns(cs.T).T
cs.shape
cs.head(6).T
v = cs[[c for c in cs.columns if c.startswith('T cells')]].sum(1)
v = v[:, '01'] - v[:, '11']
dd = cs.ix[ti(cs['Pearson Correlation'] > .1)].T
dd = dd.xs('01',1,1) - dd.xs('11',1,1)
dd = dd.ix[:-3]
dd.shape
r1 = screen_feature(df_s3.ix['GABRD'][:,'11'].ix[dd.columns], pearson_pandas, 
               cs.T.ix[:-3].xs('11',1,1), align=False)
r2 = screen_feature(df_s3.ix['GABRD'][:,'01'].ix[dd.columns], pearson_pandas, 
               cs.T.ix[:-3].xs('01',1,1), align=False)
series_scatter(r1.rho, r2.rho)
screen_feature(dx.ix['GABRD'], spearman_pandas, dd, align=False).head()
series_scatter(dx.ix['GABRD'], dd.ix['Plasma cells'])
b = (cs['T cells regulatory (Tregs)'] > 0).astype(int).unstack().T.diff().ix['11']
violin_plot_series(cs['T cells regulatory (Tregs)'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20066666666666666, 'fraction_numerical': 0.029333333333333333, 'mean_word_length': 4.773076923076923, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '251207', 'license': 'MIT', 'n_tokens_mistral': 659, 'n_tokens_neox': 629, 'n_words': 95, 'path': 'Notebooks/Preperation_for_Cybersort.ipynb', 'repo_name': 'theandygross/TCGA_differential_expression', 'size': '1500'}