catalystneuro / neuroconv

Create NWB files by converting and combining neural data in proprietary formats and adding essential metadata.
https://neuroconv.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 22 forks source link

[Feature]: Bruker multi-run #874

Open bendichter opened 3 months ago

bendichter commented 3 months ago

What would you like to see added to NeuroConv?

A request from Caroline Runyan:

I have been since trying to use it for raw Bruker files ... and I want to share the raw data. The guide demands that I have the xml file in the source directory for each session. However, there is a separate xml file for each acquisition within each session. These are saved in subfolders within each session, like this:

Mouse/Session/TSeries 1 Mouse/Session/TSeries 2 etc.

I can get it to take a single TSeries, but of course I want the entire session. Any suggestions?

To support this, we will need a Converter for Bruker that can aggregate data from multiple runs into a single session.

Is your feature request related to a problem?

No response

Do you have any interest in helping implement the feature?

No.

Code of Conduct

CodyCBakerPhD commented 3 months ago

I was thinking more about this, and this is the first case we've seen of multi-segment imaging/segmentation data

ecephys via SpikeInterface has supported multi-segment for quite a long time, where even a single interface (i.e., via the extractor) creates multiple ElectricalSeries for each segment

So what we actually need is multi-segment (in time, not channels or planes) support at the ROI Extractors level, followed by adjustments to the core ophys writing tools on neuroconv to handle a multi-segment extractor to create multiple photon series, roi response series, etc.

Then any current Bruker interface could support it in theory without needing new classes

cc @pauladkisson @alessandratrapani

h-mayorquin commented 3 months ago

Isn't the simplest solution to create something like what we do for the SpikeGLX?

Inherit from ConverterPipe and do the file allocation to get a single interface object?

https://github.com/catalystneuro/neuroconv/blob/717ef378bf952fe505d81dcceda8efe124adde41/src/neuroconv/datainterfaces/ecephys/spikeglx/spikeglxconverter.py#L12-L90

The problem is that all the Bruker interface point to folders and then disambiguate to streams. I guess the different series would need to be added as yet another stream...

CodyCBakerPhD commented 3 months ago

I think the core distinction from planes/channels is that you wouldn't want the ability to select or subset segments - you'd want to grab all of them transparently since they constitute a single data stream (though not contiguous) from that plane and that channel