Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cell registration #19

Merged
merged 6 commits into from
Nov 28, 2024
Merged

Add cell registration #19

merged 6 commits into from
Nov 28, 2024

Conversation

alessandratrapani
Copy link
Collaborator

@alessandratrapani alessandratrapani commented Nov 19, 2024

To be review after merging #18
Add cell registration as it is from CellReg output:

  • One table for each CellReg output (each offline session)
  • One offline session and all the conditioning sessions are registered together
  • Table headers are meant to be the session_id of the converted "sub-sessions"

Output in Neurosift:
image
Screenshot 2024-11-25 151744

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions and comments.

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

main_folder = data_dir_path / f"Ca_EEG_Calcium/{subject_id}/SpatialFootprints"
file_paths = []

for folder in main_folder.iterdir():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about throwing errors when the expected folder_paths and the file_paths are not found? right now they are skipped silently but if the point of this interface is that those things should be added maybe it is better to stop the process at the tracks and throw an informative error so the user is aware of this.

I am not sure, maybe you have a good reason to skip instead of stopping.

Copy link
Collaborator Author

@alessandratrapani alessandratrapani Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right! I added few lines to throw an error only when there is no file in the specific folder (matching the pattern) as expected. The folder.is_dir() "check" is just to select the folder paths among all the type Paths objects iterdir might iterate over (both folders and files), thus no need to throw an error if that object is not a directory.

@alessandratrapani alessandratrapani merged commit 40f93b9 into main Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants