Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-val results for kiba and PDBbind #62

Merged
merged 34 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
54c1148
created ChemEsmDTA class
papiClafoutis Nov 3, 2023
d5f817c
results: davis-shannon CV
Nov 6, 2023
978c712
Merge branch 'ligand-dev' of https://github.com/jyaacoub/MutDTA into …
Nov 6, 2023
eccc103
added two more layers
papiClafoutis Nov 6, 2023
eb39728
Merge branch 'ligand-dev' of https://github.com/jyaacoub/MutDTA into …
papiClafoutis Nov 6, 2023
7874395
results: davis-shannon CV
Nov 6, 2023
2e27c34
added two more layers
papiClafoutis Nov 6, 2023
bf3e6ee
Merge branch 'ligand-dev' of https://github.com/jyaacoub/MutDTA into …
jyaacoub Nov 14, 2023
efc9390
Merge pull request #59 from jyaacoub/ligand-dev
jyaacoub Nov 14, 2023
4474257
feat: grouped cc #60
jyaacoub Nov 14, 2023
1d220cb
feat(training): balanced_kfold_split #60
jyaacoub Nov 15, 2023
873ef2f
fix: using new kfold fn in init_data #60
jyaacoub Nov 15, 2023
de40fa8
fix(PDBbind): af2 and aln dir path
jyaacoub Nov 15, 2023
8bcba45
feat: support for Narval cluster with A100 GPUs
jyaacoub Nov 15, 2023
10fe995
fix(figures): pearson and spearman is max
jyaacoub Nov 16, 2023
0e032d5
results: kiba af2 and anm0-3
jyaacoub Nov 16, 2023
c7d39ca
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 16, 2023
8e90c5d
results: PDBbind msa shannon cc
jyaacoub Nov 17, 2023
e8d0d99
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 17, 2023
4a1d3d6
results: PDBbind ESM cv
jyaacoub Nov 17, 2023
e53dc9d
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 17, 2023
e6a5083
results: PDBbind_nomsa & kiba_msa-shannon
jyaacoub Nov 17, 2023
675b667
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 17, 2023
c0215b0
results: kiba nomsa and simple crossval
jyaacoub Nov 21, 2023
5a4e473
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 21, 2023
048be8b
results: PDBbind anm and af2 crossval
jyaacoub Nov 21, 2023
6d8abeb
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 21, 2023
c25c464
results: PDBbind simple crossval
jyaacoub Nov 21, 2023
ddb4ec3
Merge branch 'development' of https://github.com/jyaacoub/MutDTA into…
jyaacoub Nov 21, 2023
4d2dba1
fix(figs): set add_stats default to True
jyaacoub Nov 21, 2023
ea2a7f0
fix(figures): add check for esm results
jyaacoub Nov 21, 2023
a48a980
feat(test): no_rename option
jyaacoub Nov 22, 2023
9ac53be
results: kiba EDI cross val
jyaacoub Nov 22, 2023
b46897f
fix(figures): resolves #61
jyaacoub Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,10 @@ log_test/
slurm_tests/
slurm_out_DDP/
slurm_out*/
*.swp
*.swo
/*.sh
results/model_checkpoints/ours/*.model*
results/model_checkpoints/ours/*.model_tmp
results/model_checkpoints/ours/*.model
*.swp
*.swo
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tabulate
ipykernel
plotly
requests
ray[tune]
#ray[tune]

submitit
ProDy
Expand Down
49 changes: 35 additions & 14 deletions playground.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
#%%
from src.data_analysis.stratify_protein import check_davis_names, kinbase_to_df

df = kinbase_to_df()
# %%
import json
prot_dict = json.load(open('/home/jyaacoub/projects/data/davis/proteins.txt', 'r'))
# %%
# returns a dictionary of davis protein names (keys) and a truple of the protein name, main family, and subgroup (values)
prots = check_davis_names(prot_dict, df)
from src.data_analysis.figures import fig2_pro_feat, fig3_edge_feat, prepare_df, fig4_pro_feat_violin, fig5_edge_feat_violin

df = prepare_df('results/model_media/model_stats.csv')
data = 'kiba'
verbose=False

# %% plot histogram of main families and their counts
import seaborn as sns
pdb_f = fig4_pro_feat_violin(df, sel_col='mse', sel_dataset='PDBbind', verbose=verbose)
kiba_e = fig5_edge_feat_violin(df, sel_col='mse', sel_dataset='kiba', verbose=verbose)

# %% simplified plot for debugging
from seaborn import violinplot
from matplotlib import pyplot as plt
import pandas as pd
from statannotations.Annotator import Annotator

new_df = pd.DataFrame({'binary': kiba_e[0], 'simple': kiba_e[1], 'anm': kiba_e[2], 'af2': kiba_e[3]})
new_df

main_families = [v[1] for v in prots.values()]
main_families = pd.Series(main_families)
sns.histplot(main_families)
#%%
ax = violinplot(data=kiba_e)
ax.set_xticklabels(['binary', 'simple', 'anm', 'a2'])

pairs = [(0,1), (0,2), (0,3), (1,2), (1,3), (2,3)]
annotator = Annotator(ax, pairs, data=kiba_e, verbose=verbose)
annotator.configure(test='Mann-Whitney', text_format='star', loc='inside',
hide_non_significant=not verbose)
annotator.apply_and_annotate()



# %%
fig4_pro_feat_violin(df, sel_col='cindex', sel_dataset=data, verbose=verbose)
fig4_pro_feat_violin(df, sel_col='mse', sel_dataset=data, verbose=verbose)

#%%
fig5_edge_feat_violin(df, sel_col='cindex', sel_dataset=data, verbose=verbose)
fig5_edge_feat_violin(df, sel_col='mse', sel_dataset=data, verbose=verbose)

# %%
fig2_pro_feat(df, sel_col='pearson')
fig3_edge_feat(df, exclude=['af2-anm'], sel_col='pearson')
Loading