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

[Feature] Trial-aligned ROIResponseSeries #115

Closed
weiglszonja opened this issue Dec 7, 2023 · 12 comments
Closed

[Feature] Trial-aligned ROIResponseSeries #115

weiglszonja opened this issue Dec 7, 2023 · 12 comments

Comments

@weiglszonja
Copy link

weiglszonja commented Dec 7, 2023

For datasets that have behavioral trials, it would be good addition to have a trial-aligned view for ROIResponseSeries

@weiglszonja weiglszonja changed the title [Feature [Feature] Trial-aligned ROIResponseSeries Dec 7, 2023
@CodyCBakerPhD
Copy link
Contributor

@magland I have some good examples for this now

draft dandiset is https://dandiarchive.org/dandiset/000728/draft - reuploads are likely so links to assets may not be entirely persistent but I will try to keep links here up to date

Current example: https://flatironinstitute.github.io/neurosift/?p=/nwb&url=https://api.dandiarchive.org/api/assets/5fe35951-5480-4fd0-94f8-7b139c994c9e/download/&dandisetId=000728&dandisetVersion=draft

Lots of RoiResponseSeries with a TimeIntervals we'd like to align to. In the dandiset, file names have 'Stim' for easy indication of experiment type, types B/C have a single TimeIntervals currently located in 'acquisition' (but in the future this will change to be located in 'stimuli' but type A only has the natural/spontaneous stimuli (which I'll file in a separate issue)

Would be really great to visualize average roi traces relative to this. Structure should also I think generally apply to any TimeSeries not just RoiResponseSeries

See NWB Widgets examples and discussion for an existing reference of particulars: NeurodataWithoutBorders/nwbwidgets#232 (comment)

@magland
Copy link
Collaborator

magland commented Feb 8, 2024

Thanks. Maybe we should have a meeting about this?

@CodyCBakerPhD
Copy link
Contributor

Sure, just grab a time on my calendly

@magland
Copy link
Collaborator

magland commented Feb 10, 2024

@CodyCBakerPhD @weiglszonja Here's my crack at it
https://flatironinstitute.github.io/neurosift/?p=/nwb&url=https://api.dandiarchive.org/api/assets/5fe35951-5480-4fd0-94f8-7b139c994c9e/download/&dandisetId=000728&dandisetVersion=draft&tab=view:TrialAlignedSeries|/acquisition/static_gratings^/processing/ophys/DfOVerF/DfOverF

I don't see any interesting patterns in that particular dataset. I hope I am plotting it correctly. Would be nice to be able independently to compare this with plots prepared a different way. Is there a different dataset that we know has an interesting signal?

BTW, right now it only works for RoiResponseSeries/TimeIntervals pairs.

@CodyCBakerPhD
Copy link
Contributor

@magland The plugin should support the 'group by' behavior for all those categorical columns; the table in question has three conditions (orientation, spatial_frequency, phase)

Quite possible that a patterns might only emerge under some selection of those conditions

BTW, would it be possible to for this group by to allow shift+selection of more than one condition, and in that event spawn a num_conditions x num_conditions grid of alignment plots for each ROI (or empty cell in grid if no joint occurrence of certain conditions)? That's also something I've wanted for the PSTH for a while; feel free to raise as separate issue if beyond this scope

@CodyCBakerPhD
Copy link
Contributor

As far as past examples, I believe @h-mayorquin might have/know of some, but I forget if those files are public on DANDI yet (or still embargoed)?

@h-mayorquin
Copy link

The ones were I worked on this are not published yet. There were not that clear either if I remember well. As in, you needed to know what to group by so the patterns would emerge.

@CodyCBakerPhD
Copy link
Contributor

@magland
Copy link
Collaborator

magland commented Mar 26, 2024

@CodyCBakerPhD
Copy link
Contributor

The figure from part 4 of the notebook is not aligned to epochs, it's aligned to repeated stimulus times from one of the stimuli in the 'stimulus' section of the NWB file

Even for epochs, I also don't see the plugin button to get to this visualization - also, it might not just be DfOverF, as shown in part 4, it could be any RoiResponseSeries, such as an even further filtering from DfOverF

Group by would then also apply to various aspects of the stimulus - for the IndexSeries ones, one of the group by would be the 'index' (the data of that series) - for the other tables, it could be one of the one of the repeated parameters from the extra custom columns

@CodyCBakerPhD
Copy link
Contributor

Cool! Thanks

LGTM

@magland magland closed this as completed Sep 6, 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

No branches or pull requests

4 participants