Spaces:
Sleeping
Sleeping
Commit
·
38ea622
1
Parent(s):
65d977a
Update ASCARIS.py
Browse files- ASCARIS.py +10 -6
ASCARIS.py
CHANGED
|
@@ -31,14 +31,18 @@ st.write('')
|
|
| 31 |
st.write('')
|
| 32 |
st.write('')
|
| 33 |
st.write('')
|
| 34 |
-
|
| 35 |
with st.form('mform', clear_on_submit=False):
|
| 36 |
#source = st.selectbox('Select the protein structure resource (1: PDB-SwissModel-Modbase, 2: AlphaFold)',[1,2])
|
| 37 |
-
|
| 38 |
impute = st.selectbox('Imputation',[True, False])
|
| 39 |
|
| 40 |
input_data = st.text_input('Enter SAV data points (Example: Q9Y4W6-N-432-T)')
|
|
|
|
|
|
|
|
|
|
| 41 |
parser = argparse.ArgumentParser(description='ASCARIS')
|
|
|
|
| 42 |
#parser.add_argument('-s', '--source_option',
|
| 43 |
# help='Selection of input structure data.\n 1: PDB Structures (default), 2: AlphaFold Structures',
|
| 44 |
# default=1)
|
|
@@ -49,9 +53,10 @@ with st.form('mform', clear_on_submit=False):
|
|
| 49 |
# help='Whether resulting feature vector should be imputed or not. Default True.')
|
| 50 |
|
| 51 |
#args = parser.parse_args()
|
|
|
|
| 52 |
input_set = input_data
|
|
|
|
| 53 |
impute = impute
|
| 54 |
-
|
| 55 |
submitted = st.form_submit_button(label="Submit", help=None, on_click=None, args=None, kwargs=None, type="secondary", disabled=False, use_container_width=False)
|
| 56 |
print('*****************************************')
|
| 57 |
print('Feature vector generation is in progress. \nPlease check log file for updates..')
|
|
@@ -62,7 +67,6 @@ with st.form('mform', clear_on_submit=False):
|
|
| 62 |
selected_df = pd.DataFrame()
|
| 63 |
st.write('The online tool may be slow, especially while processing multiple SAVs, please consider using the local programmatic version at https://github.com/HUBioDataLab/ASCARIS/')
|
| 64 |
if submitted:
|
| 65 |
-
st.write('submitted.')
|
| 66 |
with st.spinner('In progress...This may take a while...'):
|
| 67 |
try:
|
| 68 |
if mode == 1:
|
|
@@ -76,10 +80,10 @@ if submitted:
|
|
| 76 |
except:
|
| 77 |
selected_df = pd.DataFrame()
|
| 78 |
pass
|
| 79 |
-
|
| 80 |
-
st.write(selected_df)
|
| 81 |
if selected_df is None:
|
| 82 |
st.success('Feature vector failed. Check log file.')
|
|
|
|
| 83 |
|
| 84 |
else:
|
| 85 |
if len(selected_df) != 0 :
|
|
|
|
| 31 |
st.write('')
|
| 32 |
st.write('')
|
| 33 |
st.write('')
|
| 34 |
+
|
| 35 |
with st.form('mform', clear_on_submit=False):
|
| 36 |
#source = st.selectbox('Select the protein structure resource (1: PDB-SwissModel-Modbase, 2: AlphaFold)',[1,2])
|
| 37 |
+
source = 1
|
| 38 |
impute = st.selectbox('Imputation',[True, False])
|
| 39 |
|
| 40 |
input_data = st.text_input('Enter SAV data points (Example: Q9Y4W6-N-432-T)')
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
parser = argparse.ArgumentParser(description='ASCARIS')
|
| 45 |
+
|
| 46 |
#parser.add_argument('-s', '--source_option',
|
| 47 |
# help='Selection of input structure data.\n 1: PDB Structures (default), 2: AlphaFold Structures',
|
| 48 |
# default=1)
|
|
|
|
| 53 |
# help='Whether resulting feature vector should be imputed or not. Default True.')
|
| 54 |
|
| 55 |
#args = parser.parse_args()
|
| 56 |
+
|
| 57 |
input_set = input_data
|
| 58 |
+
mode = 1
|
| 59 |
impute = impute
|
|
|
|
| 60 |
submitted = st.form_submit_button(label="Submit", help=None, on_click=None, args=None, kwargs=None, type="secondary", disabled=False, use_container_width=False)
|
| 61 |
print('*****************************************')
|
| 62 |
print('Feature vector generation is in progress. \nPlease check log file for updates..')
|
|
|
|
| 67 |
selected_df = pd.DataFrame()
|
| 68 |
st.write('The online tool may be slow, especially while processing multiple SAVs, please consider using the local programmatic version at https://github.com/HUBioDataLab/ASCARIS/')
|
| 69 |
if submitted:
|
|
|
|
| 70 |
with st.spinner('In progress...This may take a while...'):
|
| 71 |
try:
|
| 72 |
if mode == 1:
|
|
|
|
| 80 |
except:
|
| 81 |
selected_df = pd.DataFrame()
|
| 82 |
pass
|
| 83 |
+
|
|
|
|
| 84 |
if selected_df is None:
|
| 85 |
st.success('Feature vector failed. Check log file.')
|
| 86 |
+
st.write('Failed here1')
|
| 87 |
|
| 88 |
else:
|
| 89 |
if len(selected_df) != 0 :
|