<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Exploration of Tissue Specificity of GABA Receptors using the GTEX Dataset
Step1:  GABRD is highly expressed in many areas of the brain as well as in the testis. Interestingly it is the highest expressed subunit in the testis.
Step2:  Here I'm plotting the different GABA receptors expression distribution in Testes.
Step3:  There is a correlation of subunit expression in the testis with fraction upregulated in cancer across the GABA subunits.
Step4:  Looking at co-expression
In the testis
Step5:  In the cerebellum
Step6:  For TCGA differential expression
<ASSISTANT_TASK:>
Python Code:
import NotebookImport
from metaPCNA import *
import GTEX as GTEX
f_win.order().tail()
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)
GTEX.plot_tissues_across_gene('GABRD', log=True)
gtex = np.log2(GTEX.gtex)
meta = GTEX.meta
tissue_type = GTEX.tissue_type
Explanation: Exploration of Tissue Specificity of GABA Receptors using the GTEX Dataset
End of explanation
mm =  gtex.ix[gabr].dropna().T.groupby(meta['SMTSD']).median()
mm = mm.clip_lower(-10)
mm.rank(1, ascending=False)['GABRD'].order().head(10)
Explanation: GABRD is highly expressed in many areas of the brain as well as in the testis. Interestingly it is the highest expressed subunit in the testis.
End of explanation
fig, ax = subplots(figsize=(10,4))
o = ['GABRA1','GABRA2', 'GABRA3', 'GABRA4', 'GABRA5',
     'GABRB1', 'GABRB2', 'GABRB3',
     'GABRR1', 'GABRR2', 'GABRR3',
     'GABRD','GABRE','GABRP','GABRQ']
c = sns.color_palette('muted', n_colors=7, desat=.7)
dd = gtex.ix[o, ti(tissue_type == 'Testis')].dropna(1)
sns.violinplot(dd.clip_lower(-4.).T, order=o,
               names=[s[4:] for s in o],
               inner='points', alpha=.7,
               color=[c[0]]*5 + [c[1]]*3 + [c[2]]*3 + c[3:])
ax.set_xlabel('GABA subunit')
ax.set_ylabel('GTEX- Testis Expression (Log2)')
prettify_ax(ax)
fig.savefig(FIGDIR + 'Fig_S6.pdf')
Explanation: Here I'm plotting the different GABA receptors expression distribution in Testes.
End of explanation
series_scatter(dx_rna.frac.ix[gabr],
               gtex.ix[gabr].dropna().T.groupby(meta['SMTSD']).median().ix['Testis'])
Explanation: There is a correlation of subunit expression in the testis with fraction upregulated in cancer across the GABA subunits.
End of explanation
sns.clustermap(gtex.ix[gabr, ti(meta['SMTSD'] == 'Testis')].T.corr())
Explanation: Looking at co-expression
In the testis
End of explanation
bella = ti(meta['SMTSD'].dropna().str.contains('Cerebellum'))
sns.clustermap(gtex.ix[gabr, bella].T.corr())
Explanation: In the cerebellum
End of explanation
sns.clustermap(dx.ix[gabr].T.corr().clip(-.5,.5))
Explanation: For TCGA differential expression
End of explanation
<END_TASK>