Skip to content

Commit

Permalink
update workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mdavid-m committed Mar 23, 2024
1 parent fb33f1c commit 2b99ed3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
workspaces-streamlit-template
workspaces-flashtaggerviewer
build
dist
myenv
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<your-repository-name>`
- 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
Expand Down
2 changes: 1 addition & 1 deletion clean-up-workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
28 changes: 14 additions & 14 deletions pages/6_📖_TOPP-Workflow_Docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']]
"""
)

Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 2b99ed3

Please sign in to comment.