Skip to content

Commit

Permalink
apply fix
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mdavid-m committed May 15, 2024
1 parent f353227 commit 03030f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pages/FileUpload.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def handleInputFiles(uploaded_files):
session_name = 'deconv-mzMLs'
elif file.name.endswith('_annotated.mzML'):
session_name = 'anno-mzMLs'

print(file.name)
print(st.session_state[session_name])
if file.name not in st.session_state[session_name]:
with open(
Path(st.session_state.workspace, session_name, file.name), "wb"
Expand Down
14 changes: 9 additions & 5 deletions src/Workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,18 @@ def pp(self) -> None:
current_base = splitext(basename(in_mzML))[0]
current_time = time.strftime("%Y%m%d-%H%M%S")

out_anno = join(base_path, 'anno-mzMLs', f'{current_base}_{current_time}_annotated.mzML')
out_deconv = join(base_path, 'deconv-mzMLs', f'{current_base}_{current_time}_deconv.mzML')
out_anno = Path(join(base_path, 'anno-mzMLs', f'{current_base}_{current_time}_annotated.mzML'))
out_deconv = Path(join(base_path, 'deconv-mzMLs', f'{current_base}_{current_time}_deconv.mzML'))

uploaded_files.append(out_anno)
uploaded_files.append(out_deconv)

st.session_state['deconv-mzMLs'].append(Path(out_deconv).name)
st.session_state['anno-mzMLs'].append(Path(out_anno).name)

if 'deconv-mzMLs' not in st.session_state:
st.session_state['deconv-mzMLs'] = []
if 'anno-mzMLs' not in st.session_state:
st.session_state['anno-mzMLs'] = []
st.session_state['deconv-mzMLs'].append(out_deconv.name)
st.session_state['anno-mzMLs'].append(out_anno.name)

# make directory to store deconv and anno mzML files & initialize data storage
postprocessingAfterUpload_FD(uploaded_files)
Expand Down

0 comments on commit 03030f7

Please sign in to comment.