ericckim03 commited on
Commit
27992d2
·
1 Parent(s): c650039

Get rid of on target ID and rename guide

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -79,9 +79,14 @@ else:
79
  if src_seq and all([True if nt.upper() in NUCLEOTIDE_TOKENS.keys() else False for nt in src_seq]):
80
  on_target, off_target = tiger_exhibit(pd.DataFrame(dict(id=['ManualEntry'], seq=[src_seq])),
81
  status_bar, status_text, option)
 
 
 
 
82
  st.write('On-target predictions: ', on_target)
83
  st.download_button(label='Download', data=convert_df(on_target), file_name='on_target.csv', mime='text/csv')
84
  if len(off_target) > 0:
 
85
  st.write('Off-target predictions: ', off_target)
86
  st.download_button(label='Download', data=convert_df(off_target), file_name='off_target.csv', mime='text/csv')
87
  else:
 
79
  if src_seq and all([True if nt.upper() in NUCLEOTIDE_TOKENS.keys() else False for nt in src_seq]):
80
  on_target, off_target = tiger_exhibit(pd.DataFrame(dict(id=['ManualEntry'], seq=[src_seq])),
81
  status_bar, status_text, option)
82
+ on_target.rename(columns={"Guide":"23 nt guide sequence"}, inplace=True)
83
+ if len(on_target)>0:
84
+ if on_target.iloc[0]["On-target ID"] == 0:
85
+ on_target.drop(["On-target ID"], axis=1, inplace=True)
86
  st.write('On-target predictions: ', on_target)
87
  st.download_button(label='Download', data=convert_df(on_target), file_name='on_target.csv', mime='text/csv')
88
  if len(off_target) > 0:
89
+ off_target.rename(columns={"Guide":"23 nt guide sequence"}, inplace=True)
90
  st.write('Off-target predictions: ', off_target)
91
  st.download_button(label='Download', data=convert_df(off_target), file_name='off_target.csv', mime='text/csv')
92
  else: