From 2b99ed3c70b894971a46a116626c2f041ada22db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Sat, 23 Mar 2024 12:52:00 +0100 Subject: [PATCH] update workspace --- .gitignore | 2 +- README.md | 2 +- clean-up-workspaces.py | 2 +- .../6_\360\237\223\226_TOPP-Workflow_Docs.py" | 28 +++++++++---------- src/Workflow.py | 2 +- src/common.py | 4 +-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 4e08fb5..6484ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -workspaces-streamlit-template +workspaces-flashtaggerviewer build dist myenv diff --git a/README.md b/README.md index 74e8bbc..45d0e58 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ save_params() - in `src/common.py` update the name of your app and the repository name - in `clean-up-workspaces.py` update the name of the workspaces directory to `/workspaces-` - - e.g. for the streamlit template it's "/workspaces-streamlit-template" + - e.g. for the streamlit template it's "/workspaces-flashtaggerviewer" - chose one of the Dockerfiles depending on your use case: - `Dockerfile` build OpenMS including TOPP tools - `Dockerfile_simple` uses pyOpenMS only diff --git a/clean-up-workspaces.py b/clean-up-workspaces.py index a780dbe..011be08 100644 --- a/clean-up-workspaces.py +++ b/clean-up-workspaces.py @@ -6,7 +6,7 @@ from datetime import datetime # Define the workspaces directory -workspaces_directory = Path("/workspaces-streamlit-template") +workspaces_directory = Path("/workspaces-flashtaggerviewer") # Get the current time in seconds current_time = time.time() diff --git "a/pages/6_\360\237\223\226_TOPP-Workflow_Docs.py" "b/pages/6_\360\237\223\226_TOPP-Workflow_Docs.py" index e3405f2..046599c 100644 --- "a/pages/6_\360\237\223\226_TOPP-Workflow_Docs.py" +++ "b/pages/6_\360\237\223\226_TOPP-Workflow_Docs.py" @@ -170,19 +170,19 @@ """ # Get all file paths as strings from self.param entry. mzML_files = self.file_manager.get_files(self.params["mzML-files]) -# mzML_files = ['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML'] +# mzML_files = ['../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML'] # Creating output files for a TOPP tool, setting a new file type and result subdirectory name. feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="feature-detection") -# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML'] +# feature_detection_out = ['../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Treatment.featureXML'] # Setting a name for the output directory automatically (useful if you never plan to access these files in the results section). feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="auto") -# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Treatment.featureXML'] +# feature_detection_out = ['../workspaces-flashtaggerviewer/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-flashtaggerviewer/default/topp-workflow/results/6DUd/Treatment.featureXML'] # Combining all mzML files to be passed to a TOPP tool in a single run. Using "collected" files as argument for self.file_manager.get_files will "un-collect" them. mzML_files = self.file_manager.get_files(mzML_files, collect=True) -# mzML_files = [['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML']] +# mzML_files = [['../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML']] """ ) @@ -277,15 +277,15 @@ Running 2 commands in parallel... Running command: -FeatureFinderMetabo -in ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML -out ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 +FeatureFinderMetabo -in ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML -out ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Treatment.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 Waiting for command to finish... Running command: -FeatureFinderMetabo -in ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML -out ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 +FeatureFinderMetabo -in ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML -out ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Control.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 Waiting for command to finish... Process finished: -FeatureFinderMetabo -in ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML -out ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 +FeatureFinderMetabo -in ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML -out ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Treatment.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 Total time to run command: 0.55 seconds Progress of 'loading mzML': @@ -315,7 +315,7 @@ Process finished: -FeatureFinderMetabo -in ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML -out ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 +FeatureFinderMetabo -in ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML -out ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Control.featureXML -algorithm:common:chrom_peak_snr 4.0 -algorithm:common:noise_threshold_int 1000.0 Total time to run command: 0.60 seconds Progress of 'loading mzML': @@ -347,19 +347,19 @@ Total time to run 2 commands: 0.60 seconds Running command: -python src/python-tools/example.py ../workspaces-streamlit-template/default/topp-workflow/example.json +python src/python-tools/example.py ../workspaces-flashtaggerviewer/default/topp-workflow/example.json Waiting for command to finish... Process finished: -python src/python-tools/example.py ../workspaces-streamlit-template/default/topp-workflow/example.json +python src/python-tools/example.py ../workspaces-flashtaggerviewer/default/topp-workflow/example.json Total time to run command: 0.04 seconds Writing stdout which will get logged... Parameters for this example Python tool: { "in": [ - "../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML", - "../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML" + "../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML", + "../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML" ], "out": [], "number-slider": 6, @@ -370,11 +370,11 @@ Running command: -SiriusExport -in ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML -in_featureinfo ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML -out ../workspaces-streamlit-template/default/topp-workflow/results/sirius-export/sirius.ms +SiriusExport -in ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML -in_featureinfo ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Control.featureXML ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Treatment.featureXML -out ../workspaces-flashtaggerviewer/default/topp-workflow/results/sirius-export/sirius.ms Waiting for command to finish... Process finished: -SiriusExport -in ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML ../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML -in_featureinfo ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML ../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML -out ../workspaces-streamlit-template/default/topp-workflow/results/sirius-export/sirius.ms +SiriusExport -in ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Control.mzML ../workspaces-flashtaggerviewer/default/topp-workflow/input-files/mzML-files/Treatment.mzML -in_featureinfo ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Control.featureXML ../workspaces-flashtaggerviewer/default/topp-workflow/results/feature-detection/Treatment.featureXML -out ../workspaces-flashtaggerviewer/default/topp-workflow/results/sirius-export/sirius.ms Total time to run command: 0.65 seconds Number of features to be processed: 0 diff --git a/src/Workflow.py b/src/Workflow.py index 2b5b350..fd15632 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -146,7 +146,7 @@ def pp(self) -> None: st.error('Please select at least one mzML file.') return - base_path = join('..', 'workspaces-streamlit-template', 'default') + base_path = join('..', 'workspaces-flashtaggerviewer', 'default') uploaded_files = [] for in_mzML in in_mzMLs: diff --git a/src/common.py b/src/common.py index 2ffa2f8..2d9bc9f 100644 --- a/src/common.py +++ b/src/common.py @@ -11,7 +11,7 @@ # set these variables according to your project APP_NAME = "OpenMS Streamlit App" -REPOSITORY_NAME = "streamlit-template" +REPOSITORY_NAME = "flashtaggerviewer" def load_params(default: bool = False) -> dict[str, Any]: @@ -111,7 +111,7 @@ def page_setup(page: str = "") -> dict[str, Any]: st.session_state.location = "online" # if we run the packaged windows version, we start within the Python directory -> need to change working directory to ..\streamlit-template if "windows" in sys.argv: - os.chdir("../streamlit-template") + os.chdir("../flashtaggerviewer") # Define the directory where all workspaces will be stored workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) if st.session_state.location == "online":