Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions content/FLASHDeconv/FLASHDeconvLayoutManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
# "sequence view" and "internal fragment map" added when "input_sequence" is submitted
]

# page_setup() first: it initialises st.session_state['workspace'], which the
# cache access below needs when this page is opened by direct link.
params = page_setup()

# Setup cache access
file_manager = FileManager(
st.session_state["workspace"],
Expand Down Expand Up @@ -226,8 +230,6 @@ def setSequenceView():
COMPONENT_NAMES = COMPONENT_NAMES + ['sequence_view', 'internal_fragment_map']


# page initialization
params = page_setup()

# when sequence is submitted, add "Sequence View" as a component option
setSequenceView()
Expand Down
6 changes: 4 additions & 2 deletions content/FLASHTnT/FLASHTnTLayoutManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
'ms1_deconv_heat_map'
]

# page_setup() first: it initialises st.session_state['workspace'], which the
# cache access below needs when this page is opened by direct link.
params = page_setup()

# Setup cache access
file_manager = FileManager(
st.session_state["workspace"],
Expand Down Expand Up @@ -201,8 +205,6 @@ def handleSettingButtons():
for exp in uploaded_layout]
st.session_state.num_of_experiment_to_show = len(uploaded_layout)

# page initialization
params = page_setup()

# handles "onclick" of buttons
if st.session_state.get("edit_mode") is None:
Expand Down
9 changes: 5 additions & 4 deletions src/Workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
from src.parse.deconv import parseDeconv
from src.workflow.WorkflowManager import WorkflowManager

# Example inputs shipped with the default demo workspace.
EXAMPLE_DATA = [
'example-data/deconv/example_lc_ms.mzML',
'example-data/tnt/example_native_aqpz.mzML',
'example-data/tnt/example_native_antibody.mzML',
'example-data/workspaces/default/flashdeconv/input-files/mzML-files/example_fd.mzML',
'example-data/workspaces/default/flashtnt/input-files/mzML-files/example_spectrum_aqpz.mzML',
'example-data/workspaces/default/flashtnt/input-files/mzML-files/example_spectrum_antibody.mzML',
]

class TagWorkflow(WorkflowManager):
Expand All @@ -33,7 +34,7 @@ def upload(self)-> None:
self.ui.upload_widget(key="mzML-files", name="MS data", file_types="mzML", fallback=EXAMPLE_DATA)
with t[1]:
self.ui.upload_widget(key="fasta-file", name="Database", file_types="fasta",
fallback='example-data/tnt/example_database.fasta')
fallback='example-data/workspaces/default/flashtnt/input-files/fasta-file/example_database.fasta')


@st.fragment
Expand Down
2 changes: 1 addition & 1 deletion src/render/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def downsample_heatmap(data, max_datapoints=20000, rt_bins=400, mz_bins=50, logg
return data

# Count peaks
total_count = sorted_data.select(pl.count()).item()
total_count = sorted_data.select(pl.len()).item()

# Extract arrays for scipy
mass_array = sorted_data['mass'].to_numpy()
Expand Down
3 changes: 2 additions & 1 deletion src/workflow/StreamlitUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,8 @@ def export_parameters_markdown(self):
if len(tool_text) > 1:
tool_text = ", ".join(tool_text[:-1]) + " and " + tool_text[-1]
else:
tool_text = tool_text[0]
# No .ini files yet when the TOPP tools are not installed.
tool_text = tool_text[0] if tool_text else ""

result = subprocess.run(
"FileFilter --help", shell=True, text=True, capture_output=True
Expand Down
Loading