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
4 changes: 2 additions & 2 deletions src/murfey/client/contexts/clem.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def post_transfer(
)

# Create a unique name for the series
series_name = "--".join(
series_name = "/".join(
[
*destination_file.parent.parts[
-2:
Expand Down Expand Up @@ -167,7 +167,7 @@ def post_transfer(
# Create series name for XLIF file
# XLIF files don't have the "--ZXX--CXX" additions in the file name
# But they have "/Metadata/" as the immediate parent
series_name = "--".join(
series_name = "/".join(
[
*destination_file.parent.parent.parts[-2:],
destination_file.stem.replace(" ", "_"),
Expand Down
4 changes: 1 addition & 3 deletions src/murfey/workflows/clem/register_preprocessing_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ def _register_dcg_and_atlas(
visit_number = visit_name.split("-")[-1]

# Generate name/tag for data colleciton group based on series name
dcg_name = imaging_site.site_name.split("--")[0]
if imaging_site.site_name.split("--")[1].isdigit():
dcg_name += f"--{imaging_site.site_name.split('--')[1]}"
dcg_name = imaging_site.site_name.split("/")[0]

# Determine values for atlas
if is_atlas := imaging_site.data_type == "atlas":
Expand Down
4 changes: 2 additions & 2 deletions tests/workflows/clem/test_register_align_and_merge_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_run(
/ registered_position_name
/ "*.tiff"
)
registered_series_name = f"{project_name}--TileScan_1--{registered_position_name}"
registered_series_name = f"{project_name}/TileScan_1/{registered_position_name}"
site_name = registered_series_name.rstrip(registered_type)
get_or_create_db_entry(
murfey_db_session,
Expand All @@ -65,7 +65,7 @@ def test_run(

# Create the incoming message
incoming_position_name = "Position_1" + incoming_type
incoming_series_name = f"{project_name}--TileScan_1--{incoming_position_name}"
incoming_series_name = f"{project_name}/TileScan_1/{incoming_position_name}"
# The site names should match
assert site_name == incoming_series_name.rstrip(incoming_type)

Expand Down
6 changes: 1 addition & 5 deletions tests/workflows/clem/test_register_preprocessing_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@ def generate_preprocessing_messages(
messages: list[dict[str, Any]] = []
for series_path, is_stack, is_montage, shape, pixel_size, extent in datasets:
# Unpack items from list of dataset parameters
series_name = (
str(series_path.relative_to(processed_dir))
.replace("/", "--")
.replace(" ", "_")
)
series_name = str(series_path.relative_to(processed_dir)).replace(" ", "_")
metadata = series_path / "metadata" / f"{series_path.stem}.xml"
metadata.parent.mkdir(parents=True, exist_ok=True)
metadata.touch(exist_ok=True)
Expand Down
Loading