Skip to content

Conversation

@sumiya-kuroda
Copy link
Collaborator

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Photon-mosaic supports datasets that don’t follow the NeuroBlueprint format by assigning new session IDs to the sessions. However, this will overwrite the original custom IDs.

What does this PR do?
This PR updates DatasetDiscoverer._infer_metadata_keys_from_folder_names() to include the original session IDs as metadata. The corresponding metadata key is renamed to id-.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@lauraporta
Copy link
Member

Hi @sumiya-kuroda, isn't this already the default behaviour?
E.g. this folder structure:

raw_data/
└── hippocampusA42
    └── novelEnv07
        └── recording.tif

will become:

derivatives/
├── photon-mosaic
│   ├── configs
│   │   └── config_20251113_193902.yaml
│   └── logs
│       └── snakemake_20251113_193902.log
└── sub-001_id-hippocampusA42
    └── ses-001_id-novelEnv07
        └── funcimg
            ├── recording.tif
            └── suite2p
                └── plane0
                    ├── F.npy
                    ├── Fneu.npy
                    ├── data.bin
                    ├── iscell.npy
                    ├── ops.npy
                    ├── spks.npy
                    └── stat.npy

NB: hippocampusA42 becomes sub-001_id-hippocampusA42

@sumiya-kuroda
Copy link
Collaborator Author

Hi @lauraporta,

What I implemented is to add a little more flexibility on that. For example, with this PR, ses-novelEnv07_date-20250101, which is following a custom format, becomes ses-001_id-novelEnv07_date-20250101.

@lauraporta
Copy link
Member

Alright, I'll give this a look, tests fail as well so it's going to take a longer time

@sumiya-kuroda sumiya-kuroda mentioned this pull request Nov 17, 2025
7 tasks
@lauraporta lauraporta moved this to Todo in photon-mosaic Nov 18, 2025
@lauraporta lauraporta moved this from Todo to In Progress in photon-mosaic Nov 18, 2025
@lauraporta lauraporta added this to the v0.3.0 milestone Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants