PascalNotin commited on
Commit
b66f09d
1 Parent(s): fdb9371

Debugging heatmap ticklabels in HF spaces

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +3 -2
app.py CHANGED
@@ -62,7 +62,8 @@ def create_scoring_matrix_visual(scores,sequence,AA_vocab=AA_vocab,mutation_rang
62
  heat = sns.heatmap(piv,cmap='RdYlGn',linewidths=0.30,ax=ax,vmin=np.percentile(scores.avg_score,2),vmax=np.percentile(scores.avg_score,98),\
63
  cbar_kws={'label': 'Log likelihood ratio (mutant / starting sequence)'},annot_kws={"size": fontsize})
64
  heat.figure.axes[-1].yaxis.label.set_size(fontsize=int(fontsize*1.5))
65
- #heat.figure.axes[-1].yaxis.set_ticklabels(heat.figure.axes[-1].yaxis.get_ticklabels(), fontsize=fontsize)
 
66
  heat.set_title("Higher predicted scores (green) imply higher protein fitness",fontsize=fontsize*2, pad=40)
67
  heat.set_ylabel("Sequence position", fontsize = fontsize*2)
68
  heat.set_xlabel("Amino Acid mutation", fontsize = fontsize*2)
62
  heat = sns.heatmap(piv,cmap='RdYlGn',linewidths=0.30,ax=ax,vmin=np.percentile(scores.avg_score,2),vmax=np.percentile(scores.avg_score,98),\
63
  cbar_kws={'label': 'Log likelihood ratio (mutant / starting sequence)'},annot_kws={"size": fontsize})
64
  heat.figure.axes[-1].yaxis.label.set_size(fontsize=int(fontsize*1.5))
65
+ heat.figure.axes[-1].yaxis.set_ticklabels(heat.figure.axes[-1].yaxis.get_ticklabels(), fontsize=fontsize)
66
+ #heat.figure.axes[-1].yaxis.set_ticklabels(fontsize=fontsize)
67
  heat.set_title("Higher predicted scores (green) imply higher protein fitness",fontsize=fontsize*2, pad=40)
68
  heat.set_ylabel("Sequence position", fontsize = fontsize*2)
69
  heat.set_xlabel("Amino Acid mutation", fontsize = fontsize*2)
requirements.txt CHANGED
@@ -1,6 +1,7 @@
1
  gradio
 
2
  transformers==4.17
3
  datasets==1.18.3
4
  biopython==1.78
5
- torch
6
- seaborn
1
  gradio
2
+ torch
3
  transformers==4.17
4
  datasets==1.18.3
5
  biopython==1.78
6
+ matplotlib==3.2.2
7
+ seaborn==0.11.2