<jupyter_start><jupyter_text>Exploration of GABA Receptors<jupyter_code>cd ..
import NotebookImport
from metaPCNA import *
switch_plot('FOXM1')<jupyter_output><empty_output><jupyter_text>GABRD is the top hit for tumor-associated, proliferation independent genes. * Kidney cancer associated with hypertension [link](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3188386/) * GABA could have anti-hypertensive effects [link](https://kar.kent.ac.uk/46569/1/__gort_PYR_spk21_My%20Files_Reprints_JNURV2N2A5-Wildman-OA.pdf)<jupyter_code>f_win.order().tail()
switch_plot('GABRD')
gabra = [g for g in rna_df.index if g.startswith('GABRA')]
gab_s = rna_df.ix[gabra].sum()
cc = codes[codes.isin(ti(codes.value_counts() > 50))]
series_scatter(rna_df.ix['GABRD'][:,'11'].groupby(cc).mean(), 
                gab_s[:,'11'].groupby(cc).mean())
series_scatter(rna_df.ix['GABRD'][:,'01'].groupby(cc).mean(), 
                gab_s[:,'01'].groupby(cc).mean())
gabr = [g for g in rna_df.index if g.startswith('GABR')]
f = dx_rna.ix[gabr].dropna()
f.join(f_win).sort(f_win.name)
paired_boxplot_tumor_normal(matched_rna.ix[gabr].clip(-9,10).T, 
                            order=list(f.frac.order().index))
prettify_ax(plt.gca())
paired_boxplot_tumor_normal(matched_rna.ix[gabr, ti(codes.str.startswith('KIRC'))].clip(-9,10).T, 
                            order=list(f.frac.order().index), sig=False)
prettify_ax(plt.gca())
o = ['GABRA1','GABRA2', 'GABRA3', 'GABRA4', 'GABRA5',
     'GABRB1', 'GABRB2', 'GABRB3',
     'GABRR1', 'GABRR2', 'GABRR3',
     'GABRD','GABRE','GABRP','GABRQ']
fig = plt.figure(figsize=(15, 7.5))
ax1 = plt.subplot2grid((5, 7), (0, 0), colspan=2, rowspan=3)
ax2 = plt.subplot2grid((5, 7), (0, 2), colspan=5, rowspan=3)
ax3 = plt.subplot2grid((5, 7), (3, 0), colspan=7, rowspan=2)

ax = ax1
cc = pd.Series(matched_tn.columns.get_level_values(1), 
               matched_tn.columns).map({'01': colors[0],
                                        '11': colors[1]})
series_scatter(meta_pcna_all, matched_tn.ix['GABRD'], zorder=1,
               ax=ax, ann=None, s=20, edgecolor='grey', linewidths=1,
               alpha=.6, color=cc)

line_args = {'lw':5, 'solid_capstyle':'round'}
l1, l2 = process_line_args(line_args)
x,y = meta_pcna_all[:,'01'], matched_tn.ix['GABRD'][:,'01']
reg = linear_regression(x,y)
line_me(reg['slope'], reg['intercept'], start=x.min(), end=x.max(),
            ax=ax, **l1)

x,y = meta_pcna_all[:,'11'], matched_tn.ix['GABRD'][:,'11']
reg = linear_regression(x,y)
line_me(reg['slope'], reg['intercept'], start=x.min(), end=x.max(),
            ax=ax, **l1)

ax1.legend(['Tumor','Normal'], loc='upper left', scatterpoints=1, markerscale=1.5,
          fancybox=True)
ax1.set_xlabel('Proliferation Score')
prettify_ax(ax1)

paired_bp_tn_split(matched_rna.ix['GABRD'], codes, ax=ax2)
ax2.set_ylabel('')
ax1.set_ylabel('GABRD mRNA Expression')

paired_boxplot_tumor_normal(matched_rna.ix[gabr, ti(codes.str.startswith('KIRC'))].clip(-9,10).T, 
                            order=o, sig=False, ax=ax3)
prettify_ax(ax3)
ax3.get_legend().set_visible(False)
ax3.set_ylabel('mRNA Expression')
fig.tight_layout()
fig.savefig(FIGDIR + 'GABA_F4.pdf')
fig = plt.figure(figsize=(15, 7.5))
ax1 = plt.subplot2grid((5, 7), (0, 0), colspan=2, rowspan=3)
ax2 = plt.subplot2grid((5, 7), (0, 2), colspan=5, rowspan=3)
ax3 = plt.subplot2grid((5, 7), (3, 0), colspan=7, rowspan=2)

series_scatter(meta_pcna_all[:,'01'], matched_tn.ix['GABRD'][:,'01'], ax=ax1,
               ann=None, s=20, edgecolor='grey', linewidths=1, 
               alpha=.8, color=colors[0])
series_scatter(meta_pcna_all[:,'11'], matched_tn.ix['GABRD'][:,'11'], 
               ax=ax1, ann=None, s=20, edgecolor='grey', linewidths=1,
               alpha=.8, color=colors[1])
ax1.legend(['Tumor','Normal'], loc='upper left', scatterpoints=1, markerscale=1.5,
          fancybox=True)
ax1.set_xlabel('Proliferation Score')
prettify_ax(ax1)

paired_bp_tn_split(matched_rna.ix['GABRD'], codes, ax=ax2)
ax2.set_ylabel('')
ax1.set_ylabel('GABRD mRNA Expression')

paired_boxplot_tumor_normal(matched_rna.ix[gabr, ti(codes.str.startswith('KIRC'))].clip(-9,10).T, 
                            order=o, sig=False, ax=ax3)
prettify_ax(ax3)
ax3.get_legend().set_visible(False)
ax3.set_ylabel('mRNA Expression')
fig.tight_layout()
fig.savefig(FIGDIR + 'GABA_F4.pdf')
cc = codes.ix[matched_tn.columns.get_level_values(0)].value_counts()
cc
fig, axs = subplots(7,1, figsize=(12,15), sharex=True)
letters = list(map(chr, range(97, 123)))
for i,c in enumerate(ti(cc > 99)):
    paired_boxplot_tumor_normal(matched_rna.ix[gabr, ti(codes == c)].clip(-9,10).T, 
                                order=o, sig=False, ax=axs[i])
    axs[i].set_ylabel(c + '\nmRNA expression')
for ax in axs:
    prettify_ax(ax)
    ax.get_legend().set_visible(False)
    prettify_ax(ax)
fig.tight_layout()
fig.savefig(FIGDIR + 'S5_Fig.pdf')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19132029339853301, 'fraction_numerical': 0.041157294213528935, 'mean_word_length': 4.540632054176072, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '210693', 'license': 'MIT', 'n_tokens_mistral': 2161, 'n_tokens_neox': 2020, 'n_words': 284, 'path': 'Notebooks/Figures/GABA_Figure.ipynb', 'repo_name': 'theandygross/TCGA_differential_expression', 'size': '4908'}