David Prihoda commited on
Commit
9712727
·
1 Parent(s): 68bbda2

Rename PMB to average mutations

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -6
src/streamlit_app.py CHANGED
@@ -142,24 +142,24 @@ if st.button("Generate humanized mutants", type="primary"):
142
  with st.spinner("Generating point mutants..."):
143
  for candidate in db.suggest_point_mutant_candidates(seq, nearest_peptides=nearest)[:5]:
144
  mutations = " ".join(f"{aa}{pos}{bb}" for pos, (aa, bb) in enumerate(zip(seq, candidate), start=1) if aa != bb)
145
- pmb = db.compute_pmb(candidate)
146
- st.code(f">{mutations} PMB={pmb:.2f}\n{candidate}")
147
 
148
  st.write("### Double mutant candidates")
149
 
150
  with st.spinner("Generating double mutants..."):
151
  for candidate in db.suggest_double_mutant_candidates(seq, nearest_peptides=nearest)[:5]:
152
  mutations = " ".join(f"{aa}{pos}{bb}" for pos, (aa, bb) in enumerate(zip(seq, candidate), start=1) if aa != bb)
153
- pmb = db.compute_pmb(candidate)
154
- st.code(f">{mutations} PMB={pmb:.2f}\n{candidate}")
155
 
156
  st.write("### Triple mutant candidates")
157
 
158
  with st.spinner("Generating triple mutants..."):
159
  for candidate in db.suggest_triple_mutant_candidates(seq, nearest_peptides=nearest)[:5]:
160
  mutations = " ".join(f"{aa}{pos}{bb}" for pos, (aa, bb) in enumerate(zip(seq, candidate), start=1) if aa != bb)
161
- pmb = db.compute_pmb(candidate)
162
- st.code(f">{mutations} PMB={pmb:.2f}\n{candidate}")
163
 
164
  st.divider()
165
 
 
142
  with st.spinner("Generating point mutants..."):
143
  for candidate in db.suggest_point_mutant_candidates(seq, nearest_peptides=nearest)[:5]:
144
  mutations = " ".join(f"{aa}{pos}{bb}" for pos, (aa, bb) in enumerate(zip(seq, candidate), start=1) if aa != bb)
145
+ avg = db.compute_average_mutations(candidate)
146
+ st.code(f">{mutations} AvgMut={avg:.2f}\n{candidate}")
147
 
148
  st.write("### Double mutant candidates")
149
 
150
  with st.spinner("Generating double mutants..."):
151
  for candidate in db.suggest_double_mutant_candidates(seq, nearest_peptides=nearest)[:5]:
152
  mutations = " ".join(f"{aa}{pos}{bb}" for pos, (aa, bb) in enumerate(zip(seq, candidate), start=1) if aa != bb)
153
+ avg = db.compute_average_mutations(candidate)
154
+ st.code(f">{mutations} AvgMut={avg:.2f}\n{candidate}")
155
 
156
  st.write("### Triple mutant candidates")
157
 
158
  with st.spinner("Generating triple mutants..."):
159
  for candidate in db.suggest_triple_mutant_candidates(seq, nearest_peptides=nearest)[:5]:
160
  mutations = " ".join(f"{aa}{pos}{bb}" for pos, (aa, bb) in enumerate(zip(seq, candidate), start=1) if aa != bb)
161
+ avg = db.compute_average_mutations(candidate)
162
+ st.code(f">{mutations} AvgMut={avg:.2f}\n{candidate}")
163
 
164
  st.divider()
165