datajoint-company / DJ-NWB-Li-Daie-2015-2016

DataJoint-NWB conversion project for Li et al., 2015 and Li, Daie, et al., 2016 paper
MIT License
0 stars 5 forks source link

NWB Export: Store structured virus information using an NWB extension #7

Open rly opened 4 years ago

rly commented 4 years ago

The virus information is being converted from structured key-value pairs into JSON and then being stored as a string in NWBFile.virus.

https://github.com/vathes/DJ-NWB-Li-Daie-2015-2016/blob/ae69335a23e6a3c0c3809a54de5480baf8848712/pipeline/export/datajoint_to_nwb.py#L73-L74

For one file, this value is:

[{"injection_id": "1",
 "virus": "Addgene41015",
 "injection_date": "2013-05-23",
 "injection_volume": "30.0",
 "brain_location_name": "left_m2",
 "ml_location": "2500.0",
 "ap_location": "-1500.0",
 "dv_location": "500.0",
 "virus_source": "Janelia core",
 "virus_lot_number": "",
 "virus_titer": "None"},
 {"injection_id": "2",
 "virus": "Addgene41015",
 "injection_date": "2013-05-23",
 "injection_volume": "30.0",
 "brain_location_name": "left_m2",
 "ml_location": "2500.0",
 "ap_location": "-1500.0",
 "dv_location": "850.0",
 "virus_source": "Janelia core",
 "virus_lot_number": "",
 "virus_titer": "None"}]

I recommend making an extension to NWB that introduces a new data type called "Injections" that extends the DynamicTable type, and has "virus", "injection_date", "injection_volume", etc. as columns. Extensions to NWB for such structured information are useful for making the data machine-readable and encouraging a full description of the metadata. I can see this new data type being generally useful for storing virus data for many different datasets, so it would be good to create a single standard and use it across datasets. If the extension is popular or useful enough, then it would be considered for integration into the core NWB schema.

I would be happy to help you get started with creating and using an extension for virus injection metadata if you are interested in doing this.

rly commented 4 years ago

An extension also has the benefit of allowing you to specify the units or other attributes of the values. e.g., injection_volume = 30. but 30 what?