Skip to content

Commit

Permalink
fully implemented annealing oligos
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-youngblut committed May 23, 2024
1 parent 5adcb07 commit 3e3d3ed
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BridgeRNADesigner-ShinyApp-main/
*.pyc
.DS_Store
DEPLOY.md
DEPLOY.md
tmp/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ BridgeRNA_tgt_ATCGGGCCTACGCA_dnr_ACAGTATCTTGTAT AGTGCAGAGAAAATCGGCCAGTTTTCTC
### Run locally

```bash
streamlit run app.py
streamlit run app.py --server.address=0.0.0.0
```
39 changes: 25 additions & 14 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ def get_image_as_base64(path):
},
index=['Target', 'Donor']
)
#st.dataframe(df)
st.table(df)
with stylable_container('btn-calc', css_styles='button { margin-left: 35px; width: 50%; }'):
with stylable_container('btn-calc', css_styles='button { margin-left: 45px; width: 55%; }'):
st.session_state['calc_button'] = st.button('Design Bridge RNA')


def create_stockholm_table():
DF = pd.DataFrame({
'Key': ['#=GC', 'L', 'R', 'H', 'C', 'l', 'r', 'h', 'c'],
Expand All @@ -121,7 +119,6 @@ def create_stockholm_table():
with st.spinner('Calculating...'):
# Calculate bridge RNA
st.markdown('#### Bridge RNA')
brna = None
try:
st.session_state['brna'] = design_bridge_rna(target, donor)
except Exception as e:
Expand Down Expand Up @@ -150,8 +147,30 @@ def create_stockholm_table():
st.write(create_stockholm_table())
with tab2:
# fasta tab
fasta = st.session_state['brna'].format_fasta()
st.markdown('##### FASTA')
# annealing oligos
include_an_oligos = st.checkbox('Include annealing oligos?', value=False)
if include_an_oligos:
col1a,col2a = st.columns([0.5, 0.5])
with col1a:
lh_overhang = st.text_input(
'5\' overhang for annealing oligos.',
value='TAGC'
)
with col2a:
rh_overhang = st.text_input(
'3\' overhang for annealing oligos',
value='GGCC'
)
else:
lh_overhang = None
rh_overhang = None
# fasta generation
fasta = st.session_state['brna'].format_fasta(
include_annealing_oligos=include_an_oligos,
lh_overhang=lh_overhang,
rh_overhang=rh_overhang
)
st.markdown(f"```\n{fasta}\n```")
## download link
col1,col2 = st.columns([0.3, 0.7])
Expand All @@ -163,15 +182,7 @@ def create_stockholm_table():
file_name='bridge-rna.fasta',
mime='text/plain',
)
with col2:
# annealing oligos
include_an_oligo = st.checkbox('Include annealing oligos?', value=True)
if include_an_oligo:
col1a,col2a = st.columns([0.5, 0.5])
with col1a:
lh_overhang = st.text_input('5\' overhang for annealing oligos.', value='TAGC')
with col2a:
rh_overhang = st.text_input('3\' overhang for annealing oligos', value='GGCC')


st.divider()
st.markdown("""
Expand Down

0 comments on commit 3e3d3ed

Please sign in to comment.