External Files question (limits on type, & examples/meet-up?) #135
-
Dear DANDI/NWB support community.
I am writing from the SSPsyGene Data Wranglers team (group email wranglers@ucsc.edu) with a request about possibly scheduling a Zoom to discuss external file applications in NWB and DANDI. The ingest behind Behavioral Data with adjacent mp4 files is of particular interest, but also there is a case of lab wanting to include supplemental files as external_file that could help interpret the data. SSPsyGene expects to have some psychiatric gene knockout behavioral Zebrafish model data soon, and there is a wish to include the raw behavioral movies with the final processed tables and it appears this is possible with NWB with an external_file line in the time_series object. I have found this helpful resource and investigated it regarding using the organize dandi command-line feature: https://www.dandiarchive.org/2022/03/03/external-links-organize.html That blog post was very helpful. I believe that the tutorial section may be missing the mock initial data for download, that would have the files with other names and the pre-NWB with “image_series.external_files=[“../video_files/test1_0.avi”, “../video_files/test1_1.avi”]” although it is not perfectly clear if it is maybe just suggesting one set up that organization up first on one’s own. In looking around for existing Dandisets I found this one from the Discussions that mentions mp4 files: https://dandiarchive.org/dandiset/000409/draft If perhaps it might be possible to meet up to discuss how this Dandiset was created in terms of the initial metadata creation if those resources were available might really help contextualize our path when we receive our behavioral data in zebrafish. For instance, what might be helpful in both the blog tutorial or in learning about this specific 000409 Dandiset if the ingest elements used to create the initial NWB files could be shared -the python run to generate the NWB in the blogs or in this 000409 Dataset. Or if there is more documentation about behavioral data ingestion with external mp4 files that also would be helpful if a meet up wasn’t possible as well. All the best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'll take these a few items at a time
No, this is a very special case for MP4 and AVI files for natural behavior using an ImageSeries. See the Best Practice for external files: https://nwbinspector.readthedocs.io/en/dev/best_practices/image_series.html#use-external-mode-for-videos-of-animals
The repository for handling that conversion can be found here: https://github.com/catalystneuro/IBL-to-nwb In particular the main script (with automatic DANDI upload and some modification of external file names to make them more readable but still unique): https://github.com/catalystneuro/IBL-to-nwb/blob/main/ibl_to_nwb/brainwide_map/convert_brainwide_map.py This was a particularly challenging conversion, and is likely quite overkill for what you need. It is, however, based on the NeuroConv framework and library, which simplify the process quite a bit: https://neuroconv.readthedocs.io/en/main/ In particular, the VideoInterface there automatically handles these kinds of things for you quite easily: https://neuroconv.readthedocs.io/en/main/conversion_examples_gallery/behavior/video.html The
The raw behavioral movies would indeed be included as ImageSeries with external mode enabled. For the final processed tables, NWB files can hold a lot of metadata, and the generic table and series types are usually flexible enough to allow additional information to be contained within the file. Check out these tutorials in PyNWB: https://pynwb.readthedocs.io/en/stable/tutorials/general/plot_timeintervals.html#sphx-glr-tutorials-general-plot-timeintervals-py |
Beta Was this translation helpful? Give feedback.
Hi @ucscbrianlee
I'll take these a few items at a time
For Zoom related stuff, I'll defer to our community liason @bendichter - you can easily schedule a time to meet with them using the following calendly link
For external files on DANDI...
No, this is a very special case for MP4 and AVI files for natural behavior using an ImageSeries.
See the Best Practice for external files: https://nwbinspector.readthedocs.io/en/dev/best_practices/image_series.html#use-external-mode-for-videos-of-animals