Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,39 +31,45 @@ def show_pdf(file_path):
|
|
| 31 |
#@st.cache_data(experimental_allow_widgets=True)
|
| 32 |
def showdl(file_to_lookat,to_dl_sbs,to_dl_indel,to_dl_dbs,to_dl_sbs_text,to_dl_indel_text,to_dl_dbs_text):
|
| 33 |
for j in np.arange(0,len(to_dl_sbs)):
|
| 34 |
-
|
|
|
|
| 35 |
{base64.b64encode(to_dl_sbs[j]).decode()}" download=" \
|
| 36 |
{file_to_lookat[j].name}SBS.pdf">Download {file_to_lookat[j].name} Single Base Substition pdf</a>'
|
| 37 |
-
|
|
|
|
| 38 |
{base64.b64encode(to_dl_sbs_text[j]).decode()}" download=" \
|
| 39 |
{file_to_lookat[j].name}SBS.txt">Download {file_to_lookat[j].name} Single Base Substition table</a>'
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
| 43 |
{base64.b64encode(to_dl_indel[j]).decode()}" download=" \
|
| 44 |
{file_to_lookat[j].name}Indel.pdf">Download {file_to_lookat[j].name} indel pdf</a>'
|
| 45 |
-
|
| 46 |
{base64.b64encode(to_dl_indel_text[j]).decode()}" download=" \
|
| 47 |
-
{file_to_lookat[j].name}Indel.txt">Download {file_to_lookat[j].name} indel table</a>'
|
|
|
|
|
|
|
|
|
|
| 48 |
for j in np.arange(0,len(to_dl_dbs)):
|
| 49 |
-
|
|
|
|
| 50 |
{base64.b64encode(to_dl_dbs[j]).decode()}" download=" \
|
| 51 |
{file_to_lookat[j].name}DBS.pdf">Download {file_to_lookat[j].name} Double Base Substitution pdf</a>'
|
| 52 |
-
|
| 53 |
{base64.b64encode(to_dl_dbs_text[j]).decode()}" download=" \
|
| 54 |
{file_to_lookat[j].name}DBS.txt">Download {file_to_lookat[j].name} Double Base Substitution table</a>'
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
st.markdown(download_link2, unsafe_allow_html=True)
|
| 59 |
|
| 60 |
-
#st.markdown(download_link3, unsafe_allow_html=True)
|
| 61 |
-
|
| 62 |
-
#st.markdown(download_link4, unsafe_allow_html=True)
|
| 63 |
|
| 64 |
-
#st.markdown(download_link5, unsafe_allow_html=True)
|
| 65 |
|
| 66 |
-
#st.markdown(download_link6, unsafe_allow_html=True)
|
| 67 |
#st.download_button(label="Download image with single base substitution profiles", key=j,
|
| 68 |
# data=to_dl_sbs[j],
|
| 69 |
# file_name="SBS.pdf",
|
|
|
|
| 31 |
#@st.cache_data(experimental_allow_widgets=True)
|
| 32 |
def showdl(file_to_lookat,to_dl_sbs,to_dl_indel,to_dl_dbs,to_dl_sbs_text,to_dl_indel_text,to_dl_dbs_text):
|
| 33 |
for j in np.arange(0,len(to_dl_sbs)):
|
| 34 |
+
if to_dl_sbs[j] != []:
|
| 35 |
+
download_link1 = f'<a href="data:application/octet-stream;base64, \
|
| 36 |
{base64.b64encode(to_dl_sbs[j]).decode()}" download=" \
|
| 37 |
{file_to_lookat[j].name}SBS.pdf">Download {file_to_lookat[j].name} Single Base Substition pdf</a>'
|
| 38 |
+
|
| 39 |
+
download_link2 = f'<a href="data:application/octet-stream;base64, \
|
| 40 |
{base64.b64encode(to_dl_sbs_text[j]).decode()}" download=" \
|
| 41 |
{file_to_lookat[j].name}SBS.txt">Download {file_to_lookat[j].name} Single Base Substition table</a>'
|
| 42 |
+
st.markdown(download_link1, unsafe_allow_html=True)
|
| 43 |
|
| 44 |
+
st.markdown(download_link2, unsafe_allow_html=True)
|
| 45 |
+
|
| 46 |
+
for j in np.arange(0,len(to_dl_indel)):
|
| 47 |
+
if to_dl_indel[j] != []:
|
| 48 |
+
download_link3 = f'<a href="data:application/octet-stream;base64, \
|
| 49 |
{base64.b64encode(to_dl_indel[j]).decode()}" download=" \
|
| 50 |
{file_to_lookat[j].name}Indel.pdf">Download {file_to_lookat[j].name} indel pdf</a>'
|
| 51 |
+
download_link4 = f'<a href="data:application/octet-stream;base64, \
|
| 52 |
{base64.b64encode(to_dl_indel_text[j]).decode()}" download=" \
|
| 53 |
+
{file_to_lookat[j].name}Indel.txt">Download {file_to_lookat[j].name} indel table</a>'
|
| 54 |
+
st.markdown(download_link3, unsafe_allow_html=True)
|
| 55 |
+
|
| 56 |
+
st.markdown(download_link4, unsafe_allow_html=True)
|
| 57 |
for j in np.arange(0,len(to_dl_dbs)):
|
| 58 |
+
if to_dl_dbs[j] !=[]:
|
| 59 |
+
download_link5 = f'<a href="data:application/octet-stream;base64, \
|
| 60 |
{base64.b64encode(to_dl_dbs[j]).decode()}" download=" \
|
| 61 |
{file_to_lookat[j].name}DBS.pdf">Download {file_to_lookat[j].name} Double Base Substitution pdf</a>'
|
| 62 |
+
download_link6 = f'<a href="data:application/octet-stream;base64, \
|
| 63 |
{base64.b64encode(to_dl_dbs_text[j]).decode()}" download=" \
|
| 64 |
{file_to_lookat[j].name}DBS.txt">Download {file_to_lookat[j].name} Double Base Substitution table</a>'
|
| 65 |
+
st.markdown(download_link5, unsafe_allow_html=True)
|
| 66 |
+
|
| 67 |
+
st.markdown(download_link6, unsafe_allow_html=True)
|
| 68 |
+
|
| 69 |
|
|
|
|
| 70 |
|
|
|
|
|
|
|
|
|
|
| 71 |
|
|
|
|
| 72 |
|
|
|
|
| 73 |
#st.download_button(label="Download image with single base substitution profiles", key=j,
|
| 74 |
# data=to_dl_sbs[j],
|
| 75 |
# file_name="SBS.pdf",
|