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

NWB to trials_table, and events table #1

Closed
4 tasks
alexpiet opened this issue Feb 10, 2024 · 5 comments · Fixed by #26
Closed
4 tasks

NWB to trials_table, and events table #1

alexpiet opened this issue Feb 10, 2024 · 5 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@alexpiet
Copy link
Collaborator

alexpiet commented Feb 10, 2024

Is your feature request related to a problem? Please describe.
NWB files will be generated for each session. We would like a standard way to extract two pandas dataframes

Describe the solution you'd like

  • trials table, each row is a trial
  • events table, each row is a behavioral event
  • Unit tests to ensure stability
  • Evaluation of time it takes to load/extract dataframes for each solution. Does this warrant saving the processed dataframes as a separate data asset?
@irisstone
Copy link
Collaborator

@hanhou is your nwb_to_df function a good place to start for getting a trials table? Does this match up with the trials table info you added in the planning document? Does it include all of the things that @ZhixiaoSu has listed in the bullet points of what the columns of her trial table includes, or are there other things that either of you think would be good to include?

Hoping to port something to this repo soon that includes all of the columns in a trial table that we need, and it seems like the easiest way might be easiest to modify that nwb_to_df function (if it needs modification).

@hanhou
Copy link
Collaborator

hanhou commented Feb 16, 2024

Does this match up with the trials table info you added in the planning document? Does it include all of the things that @ZhixiaoSu has listed in the bullet points of what the columns of her trial table includes, or are there other things that either of you think would be good to include?

Not really. My nwb_to_df function only extract session-level stats, not the trial table. To extract the trial table from nwb, see df_trials in this notebook. To extract the event table, see Behavioral events section of the same notebook.

Also, my code is still incomplete even for the session table, see my comments here.

@hanhou
Copy link
Collaborator

hanhou commented Feb 16, 2024

And if you're talking about creating the standardized util functions to parse the nwb files, it may be better to start from a clean repo. The nwb_to_df function you mentioned is a part of my temporary behavioral pipeline. Eventually what should happen is my repo calls functions from your standardized utils to fill in the tables.

@irisstone
Copy link
Collaborator

irisstone commented Feb 16, 2024

Thanks @hanhou, that's helpful! @alexpiet is there an interest in having a sessions table as part of this repo, as well? I could imagine wanting both for my purposes, and it might be easier to start with that and I could write a new function (borrowing from Han's nwb_to_df function what I can) and then extending it to include the additional things mentioned in Han's comments. And after that work on one for trials. Ultimately then this repo would have e.g. a nwb_to_df.py module with functions that return df_trials, df_events, and df_sessions, etc.

@alexpiet
Copy link
Collaborator Author

I think that would be in the scope of this issue #6

@hanhou hanhou added the enhancement New feature or request label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants