<jupyter_start><jupyter_text>Broad - L200, all genes<jupyter_code>dir_in_Lx = '../out/20.0909 Lx/L200only_reg_rf_boruta_all/'
y_compr_tr = pickle.load(open(os.path.join(dir_in_Lx, 'anlyz', 'y_compr_tr.pkl'), 'rb'))
y_compr_te = pickle.load(open(os.path.join(dir_in_Lx, 'anlyz', 'y_compr_te.pkl'), 'rb'))
y_compr_tr['actual'].shape
plt.figure()
ax = sns.heatmap(y_compr_te['actual'], yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
plt.figure()
ax = sns.heatmap(y_compr_te['predicted'], yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
spearmanr(y_compr_te['actual'].values.flatten(), y_compr_te['predicted'].values.flatten())<jupyter_output><empty_output><jupyter_text>Sanger - gs16<jupyter_code>dir_in_Lx = '../out/20.0926 feat Sanger/reg_rf_boruta_gs16/'
y_compr_ext = pickle.load(open(os.path.join(dir_in_Lx, 'anlyz', 'y_compr_ext.pkl'), 'rb'))
plt.figure()
ax = sns.heatmap(y_compr_ext['actual'], yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
plt.figure()
ax = sns.heatmap(y_compr_ext['predicted'], yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
sns.set(font_scale = 1.5)
sns.set_style("white")
plt.figure()
plt.plot([-3,2], [-3,2], ls="--", c=".3", alpha=0.5)
ax = sns.scatterplot(y_compr_ext['actual'].values.flatten(), y_compr_ext['predicted'].values.flatten(),
                     s = 3, alpha=0.25, linewidth=0, color='steelblue')
ax.set(xlabel='Actual', ylabel='Predicted', title='Sanger\n(mitochondrial gene set 16)', xlim=[-2,1], ylim=[-2,1])
plt.tight_layout()
spearmanr(y_compr_ext['actual'].values.flatten(), y_compr_ext['predicted'].values.flatten())<jupyter_output><empty_output><jupyter_text>Sanger - L200, all genes<jupyter_code>dir_in_Lx = '../out/20.0926 feat Sanger/L200only_reg_rf_boruta_all/'
y_compr_ext = pickle.load(open(os.path.join(dir_in_Lx, 'anlyz', 'y_compr_ext.pkl'), 'rb'))
plt.figure()
ax = sns.heatmap(y_compr_ext['actual'], yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
plt.figure()
ax = sns.heatmap(y_compr_ext['predicted'], yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
plt.figure()
plt.plot([-3,2], [-3,2], ls="--", c=".3", alpha=0.5)
ax = sns.scatterplot(y_compr_ext['actual'].values.flatten(), y_compr_ext['predicted'].values.flatten(),
                     s = 1, alpha=0.05, linewidth=0, color='steelblue')
ax.set(xlabel='Actual', ylabel='Predicted', xlim=[-3,2], ylim=[-3,2])<jupyter_output><empty_output><jupyter_text>Sanger - L200, gs16<jupyter_code># get the list of gs16 genes
import re
with open('../out/20.0216 feat/reg_rf_boruta/network/gs.txt','r') as f:
    for lines in f:
        if lines.startswith('gene_set_16'):
            l = lines
            gs16 = re.findall(r'\w+', lines)[1:]
dir_in_Lx = '../out/20.0926 feat Sanger/L200only_reg_rf_boruta_all/'
y_compr_ext = pickle.load(open(os.path.join(dir_in_Lx, 'anlyz', 'y_compr_ext.pkl'), 'rb'))
actual_gs16 = y_compr_ext['actual'].loc[:,y_compr_ext['actual'].columns.isin(gs16)]
predicted_gs16 = y_compr_ext['predicted'].loc[:,y_compr_ext['actual'].columns.isin(gs16)]
plt.figure()
ax = sns.heatmap(actual_gs16, yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
plt.figure()
ax = sns.heatmap(predicted_gs16, yticklabels=False, xticklabels=False, vmin=-3, vmax=3, cmap='RdBu')
ax.set(xlabel='Genes', ylabel='Cell lines')
plt.tight_layout()
plt.figure()
plt.plot([-2,1], [-2,1], ls="--", c=".3", alpha=0.5)
ax = sns.scatterplot(actual_gs16.values.flatten(), predicted_gs16.values.flatten(),
                     s = 3, alpha=0.3, linewidth=0, color='steelblue')
ax.set(xlabel='Actual', ylabel='Predicted', xlim=[-2,1], ylim=[-2,1])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20394895256441126, 'fraction_numerical': 0.03467372983385505, 'mean_word_length': 6.636029411764706, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '462773', 'license': 'MIT', 'n_tokens_mistral': 1880, 'n_tokens_neox': 1775, 'n_words': 238, 'path': 'notebooks/12d-pred_actual.ipynb', 'repo_name': 'pritchardlabatpsu/cga', 'size': '4153'}