Spaces:
Sleeping
Sleeping
add enzyme buttons
Browse files
app.py
CHANGED
@@ -4,15 +4,15 @@ import pandas as pd
|
|
4 |
import streamlit as st
|
5 |
from pathlib import Path
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
)
|
11 |
-
CRISPR_MODELS = ['Cas9', 'Cas12', 'Cas13d']
|
12 |
|
|
|
13 |
|
14 |
selected_model = st.selectbox('Select CRISPR model:', CRISPR_MODELS, key='selected_model')
|
15 |
|
|
|
16 |
# Check if the selected model is Cas9
|
17 |
if selected_model == 'Cas9':
|
18 |
# Boolean variables for each checkbox state
|
@@ -20,26 +20,27 @@ if selected_model == 'Cas9':
|
|
20 |
spcas9_t7 = st.checkbox('SPCas9_t7', key='spcas9_t7')
|
21 |
esp_cas9 = st.checkbox('eSPCas9', key='esp_cas9')
|
22 |
spcas9_hf1 = st.checkbox('SPCas9_HF1', key='spcas9_hf1')
|
23 |
-
|
24 |
-
|
|
|
25 |
st.session_state['spcas9_t7'] = False
|
26 |
st.session_state['esp_cas9'] = False
|
27 |
st.session_state['spcas9_hf1'] = False
|
28 |
pass
|
29 |
# Placeholder for action when SPCas9_U6 is clicked
|
30 |
-
elif
|
31 |
st.session_state['spcas9_u6'] = False
|
32 |
st.session_state['esp_cas9'] = False
|
33 |
st.session_state['spcas9_hf1'] = False
|
34 |
pass
|
35 |
# Placeholder for action when SPCas9_t7 is clicked
|
36 |
-
elif
|
37 |
st.session_state['spcas9_u6'] = False
|
38 |
st.session_state['spcas9_t7'] = False
|
39 |
st.session_state['spcas9_hf1'] = False
|
40 |
pass
|
41 |
# Placeholder for action when eSPCas9 is clicked
|
42 |
-
elif
|
43 |
st.session_state['spcas9_u6'] = False
|
44 |
st.session_state['spcas9_t7'] = False
|
45 |
st.session_state['esp_cas9'] = False
|
@@ -141,10 +142,6 @@ elif selected_model == 'Cas13d':
|
|
141 |
if 'off_target' not in st.session_state:
|
142 |
st.session_state.off_target = None
|
143 |
|
144 |
-
# title and documentation
|
145 |
-
st.markdown(Path('tiger.md').read_text(), unsafe_allow_html=True)
|
146 |
-
st.divider()
|
147 |
-
|
148 |
# mode selection
|
149 |
col1, col2 = st.columns([0.65, 0.35])
|
150 |
with col1:
|
|
|
4 |
import streamlit as st
|
5 |
from pathlib import Path
|
6 |
|
7 |
+
# title and documentation
|
8 |
+
st.markdown(Path('tiger.md').read_text(), unsafe_allow_html=True)
|
9 |
+
st.divider()
|
|
|
|
|
10 |
|
11 |
+
CRISPR_MODELS = ['Cas9', 'Cas12', 'Cas13d']
|
12 |
|
13 |
selected_model = st.selectbox('Select CRISPR model:', CRISPR_MODELS, key='selected_model')
|
14 |
|
15 |
+
# Check if the selected model is Cas9
|
16 |
# Check if the selected model is Cas9
|
17 |
if selected_model == 'Cas9':
|
18 |
# Boolean variables for each checkbox state
|
|
|
20 |
spcas9_t7 = st.checkbox('SPCas9_t7', key='spcas9_t7')
|
21 |
esp_cas9 = st.checkbox('eSPCas9', key='esp_cas9')
|
22 |
spcas9_hf1 = st.checkbox('SPCas9_HF1', key='spcas9_hf1')
|
23 |
+
|
24 |
+
# Update the state of checkboxes based on the selection
|
25 |
+
if spcas9_u6:
|
26 |
st.session_state['spcas9_t7'] = False
|
27 |
st.session_state['esp_cas9'] = False
|
28 |
st.session_state['spcas9_hf1'] = False
|
29 |
pass
|
30 |
# Placeholder for action when SPCas9_U6 is clicked
|
31 |
+
elif spcas9_t7:
|
32 |
st.session_state['spcas9_u6'] = False
|
33 |
st.session_state['esp_cas9'] = False
|
34 |
st.session_state['spcas9_hf1'] = False
|
35 |
pass
|
36 |
# Placeholder for action when SPCas9_t7 is clicked
|
37 |
+
elif esp_cas9:
|
38 |
st.session_state['spcas9_u6'] = False
|
39 |
st.session_state['spcas9_t7'] = False
|
40 |
st.session_state['spcas9_hf1'] = False
|
41 |
pass
|
42 |
# Placeholder for action when eSPCas9 is clicked
|
43 |
+
elif spcas9_hf1:
|
44 |
st.session_state['spcas9_u6'] = False
|
45 |
st.session_state['spcas9_t7'] = False
|
46 |
st.session_state['esp_cas9'] = False
|
|
|
142 |
if 'off_target' not in st.session_state:
|
143 |
st.session_state.off_target = None
|
144 |
|
|
|
|
|
|
|
|
|
145 |
# mode selection
|
146 |
col1, col2 = st.columns([0.65, 0.35])
|
147 |
with col1:
|