Skip to content

Commit

Permalink
minor changes for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mdavid-m committed Mar 21, 2024
1 parent 0f2034b commit dcd964b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 3 additions & 2 deletions pages/FileUpload.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def showUploadedFilesTable():

# error message if files not exist
if len(deconv_files) == 0 and len(anno_files) == 0:
st.info('No mzML added yet!', icon="ℹ️")
#st.info('No mzML added yet!', icon="ℹ️")
return
elif len(deconv_files) == 0:
st.error("FLASHDeconv deconvolved mzML file is not added yet!")
elif len(anno_files) == 0:
Expand Down Expand Up @@ -108,7 +109,7 @@ def parseUploadedFiles(reparse=False):
if len(new_deconv_files)==0 and len(new_anno_files)==0 and len(new_tag_files)==0 and len(new_protein_files)==0: # if no newly uploaded files, move on
return
elif np.any(np.array([len(new_deconv_files), len(new_anno_files), len(new_protein_files)]) != len(new_tag_files)): # if newly uploaded files doesn't match, write message
st.error('Added files are not in pair, so not parsed. \n Here are uploaded ones, but not parsed ones:')
st.error('Added files are not in pair, so not parsed. \n Here are added ones, but not parsed ones:')
# not_parsed = [f.name for f in new_deconv_files] + [f.name for f in new_anno_files]
not_parsed = new_deconv_files + new_anno_files + new_tag_files + new_protein_files
for i in not_parsed:
Expand Down
12 changes: 5 additions & 7 deletions src/Workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ def execution(self) -> None:
# Can be done without file manager, however, it ensures everything is correct.
in_mzMLs = self.file_manager.get_files(self.params["mzML-files"])
database = self.file_manager.get_files(self.params["fasta-file"])
temp_path = self.file_manager._create_results_sub_dir()
#temp_path = self.file_manager._create_results_sub_dir()

# TODO: Dont like
base_path = join('..', 'workspaces-streamlit-template', 'default')
base_path = dirname(self.workflow_dir)

if not exists(join(base_path, 'db-fasta')):
Expand All @@ -198,10 +196,10 @@ def execution(self) -> None:
makedirs(join(base_path, 'proteins-tsv'))

# # Log any messages.
self.logger.log(f"Number of input mzML files: {in_mzMLs}")
self.logger.log(f"Number of input mzML files: {database}")
#self.logger.log(f"Number of input mzML files: {in_mzMLs}")
#self.logger.log(f"Number of input mzML files: {database}")

self.logger.log(self.file_manager.workflow_dir)
#self.logger.log(self.file_manager.workflow_dir)


uploaded_files = []
Expand Down Expand Up @@ -245,7 +243,7 @@ def execution(self) -> None:
'FLASHTagger',
input_output={
'in' : [out_deconv],
'fasta' : [database[0]],
'fasta' : [out_db],
'out_tag' : [out_tag],
'out_protein' : [out_protein]
},
Expand Down

0 comments on commit dcd964b

Please sign in to comment.