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
51 stars 22 forks source link

[New Format]: Axion .raw data format conversion #1007

Open ajcheng1 opened 2 months ago

ajcheng1 commented 2 months ago

What format would you like to see added to NeuroConv?

Axion Biosystem .Raw file from Maestro Pro MEA

Does the format have any documentation?

No response

Existing APIs for format

Axion has a matlab library for reading .raw files https://github.com/axionbio/AxionFileLoader

Do you have any example files you are willing to share?

Yes, however the size is ~8GB which is typical for .raw files. I can't reduce the file size. Compressing the file may make it ~7 GB. Is there another way to upload the file?

Do you have any interest in helping implement the feature?

Yes, but I would need guidance.

Code of Conduct

h-mayorquin commented 2 months ago

Hi, thanks for opening an issue. Do you know if there is any python API or at least a specification of the format? We can't really work with matlab here. Also, out of curiosity, which of the devices are you using? Do all the devices listed here handle neural data?

https://www.axionbiosystems.com/products/mea

A work around might be the convert the data to binary and then load it with spikeinterface and use the add_recording or add_electrical_series function in our tools:

https://spikeinterface.readthedocs.io/en/stable/how_to/load_matlab_data.html

https://neuroconv.readthedocs.io/en/main/api/tools.spikeinterface.html#neuroconv.tools.spikeinterface.spikeinterface.add_electrical_series

ajcheng1 commented 2 months ago

Unfortunately I didn't see any specification of the format. The file I have is using Maestro Edge that comes with MEA software. Not sure of the other devices, but I think they all take in neural data and spiking activity. Interesting solution. Do you know how to convert Axion .raw files into binary? I was looking into spikeinterface as well but did not know how to make the files compatible.

h-mayorquin commented 2 months ago

So the pipeline that I am proposing is: 1) You use the matlab API that you linked to load your data to matlab. 2) You use the code in the spikeinterface link that I shared to trasnform the data to binary 3) You use the function in the spikeinterface.tools that I pointed out to get the data into nwb

This will get you problem solved quickly altought in a cumbersome and manual intensive way (the part from 1 to 2).

Now, while I was writing this message I re-checked the repo that you shared and I think we might be able to automatize 1 to 2 if you are willing to work into it. The specification is actually fully coded there: https://github.com/axionbio/AxionFileLoader/blob/main/AxionFileLoader/AxisFile.m

So we could just translate the structure of the header and binary file to python.

If you are willing to give it a go send me an email to my user name with dot instead of slash in gmail. Or reach me in any of the slacks channels that we might share.