Open chrisroat opened 2 years ago
happy to accept a pull request that implements this! currently the github version can accept NWB files, I've told someone at NWB about this but it hasn't been tested yet since I don't have any NWB files to test
OK, I can look into this. It will be little bit hacky, as there are pieces of both Suite2p and NWB that I generally work around (e.g., in Suite2p, I have to set a "data_path" while using NWB input).
See the following example I made, which creates some fake data from a 2p dataset and runs suite2p with NWB input and output. I'll work from this to get a PR put together. https://github.com/deisseroth-lab/data-sharing-examples/tree/master/dandi/ophys
Oh that's awesome! Haha nice data_path input, where does it error if you don't give it a data_path? I tried to take care of that here: https://github.com/MouseLand/suite2p/blob/9473e9ae0d587132308bb1e7b6c174f5af939844/suite2p/run_s2p.py#L363
cc @jmdelahanty Chris's code above might help you out
Thank you!
From https://github.com/NeurodataWithoutBorders/pynwb/issues/1416, it seems like the idea of having a separate NWB file for output will be problematic.
Would it be acceptable to write the Suite2p output back into the original NWB file when save_NWB is set? This would avoid the need to create ImagingPlane, OpticalChannel, etc.
Maybe all this metadata could be (somehow) added from the interface before running the analysis?
cc @rly
Currently, the NWB output by Suite2p has dummy information, which could be filled in with actual information from incoming data if it is also NWB format. The pieces that need to be addressed that I see, though there could be more: