|
73 | 73 | st.session_state["selected-fasta-files"] = params.get("selected-fasta-files", []) |
74 | 74 |
|
75 | 75 | # make sure mzML example files in current session state |
76 | | -load_example_mzML_files() |
| 76 | +#load_example_mzML_files() |
77 | 77 |
|
78 | 78 | # take mzML files from current session file |
79 | 79 | mzML_files_ = [f.name for f in Path(st.session_state.workspace, "mzML-files").iterdir()] |
80 | 80 |
|
81 | 81 | #delete_files(directory = Path(st.session_state.workspace, "mzML-files"), remove_files_end_with = '.raw.mzML') |
82 | 82 |
|
83 | 83 | # make sure fasta example files in current session state |
84 | | -load_example_fasta_files() |
| 84 | +#load_example_fasta_files() |
85 | 85 |
|
86 | 86 | # take fasta files from current session file |
87 | 87 | fasta_files = [f.name for f in Path(st.session_state.workspace,"fasta-files").iterdir()] |
|
91 | 91 | NuXL_config['enzyme']['restrictions'].remove('Trypsin/P') |
92 | 92 | NuXL_config['enzyme']['restrictions'].insert(0, 'Trypsin/P') |
93 | 93 |
|
| 94 | +mzML_file_path = None |
| 95 | +database_file_path = None |
| 96 | + |
94 | 97 | with st.form("fasta-upload", clear_on_submit=False): |
95 | 98 |
|
96 | 99 | # selected mzML file from mzML files list |
|
248 | 251 | # Invalid input: Display an error message |
249 | 252 | st.error(f"Invalid XL FDR format: {e} Please provide input in the format [0.01, 0.1, 1.0] or a single float between 0.00 and 1.00.") |
250 | 253 |
|
251 | | - submit_button = st.form_submit_button("Run-analysis", type="primary") |
| 254 | + submit_button = st.form_submit_button("Run-analysis", type="primary", disabled=mzML_file_path is None or database_file_path is None) |
252 | 255 |
|
253 | 256 | # out file path |
254 | 257 | result_dir: Path = Path(st.session_state.workspace, "result-files") |
255 | 258 |
|
256 | | -# create same output file path name as input file path |
257 | | -mzML_file_name = os.path.basename(mzML_file_path) |
258 | | -protocol_name = os.path.splitext(mzML_file_name)[0] |
259 | | -result_path = os.path.join(result_dir, protocol_name + ".idXML") |
260 | | - |
261 | 259 | ##################################### NuXL command (subprocess) ############################ |
262 | 260 |
|
263 | 261 | # result dictionary to capture output of subprocess |
@@ -288,6 +286,11 @@ def terminate_subprocess(): |
288 | 286 |
|
289 | 287 | # with st.spinner("Running analysis... Please wait until analysis done 😑"): #without status/ just spinner button |
290 | 288 | with st.status("Running analysis... Please wait until analysis done 😑"): |
| 289 | + |
| 290 | + # create same output file path name as input file path |
| 291 | + mzML_file_name = os.path.basename(mzML_file_path) |
| 292 | + protocol_name = os.path.splitext(mzML_file_name)[0] |
| 293 | + result_path = os.path.join(result_dir, protocol_name + ".idXML") |
291 | 294 |
|
292 | 295 | if mzML_file_path.endswith(".raw.mzML"): |
293 | 296 | st.warning(f"(.raw.mzML) not supported, please select (.raw) or (.mzML) format", icon="ℹ️") |
|
0 commit comments