-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplot.py
More file actions
33 lines (33 loc) · 1.47 KB
/
plot.py
File metadata and controls
33 lines (33 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Calculate spearmans correlation between the prediction and the original values"""
from basepair.utils import read_pkl
from basepair.imports import *
paper_config()
df_mpra = pd.read_csv('output_0604_top_layer/reconstruction/reconstructed_MPRA.csv')
from config import model_exps
model_exps_inf = {v:k for k,v in model_exps.items()}
df_mpra['model'] = df_mpra.exp.map(model_exps_inf)
with pd.option_context("display.max_colwidth", 100):
print(df_mpra.query('data=="genomic"')[['model', 'metrics/genomic/spearmanr']].
sort_values("metrics/genomic/spearmanr").
to_string())
with pd.option_context("display.max_colwidth", 100):
print(df_mpra.query('data=="synthetic"')[['model', 'metrics/synthetic/spearmanr']].
sort_values("metrics/synthetic/spearmanr").
to_string())
#df_act = pd.read_csv('../../../src/chipnexus/train/seqmodel/output/activity.csv')
#df_act = df_act[df_act.split == 'test']
#df_act[[
#'model_kwargs/bn',
#'model_kwargs/n_hidden/0',
#'model_kwargs/pool_size',
#'model_kwargs/pool_type']].drop_duplicates()
#with pd.option_context("display.max_colwidth", 100):
#print(df_act[['model',
#'model_kwargs/bn',
#'model_kwargs/pool_size',
#'model_kwargs/pool_type', 'metrics/H3K27ac/spearmanr', 'metrics/PolII/spearmanr']].
#sort_values("metrics/PolII/spearmanr").
#to_string())
#df_act['model'] = df_act.exp.map(model_exps_inf)
#print(df_act)
#print(df_act.head())