Open mscheltienne opened 2 years ago
Also, for now, it writes the loaded montage for each file, but as I said today, it might actually be a template montage and it might be the same for all files. To be checked.
Sounds good.
I would just use what is in the Original dataset Right?
Or do you have a special dropbox folder where some preprocessing was done?
Just the original dataset shared on the private repo.
This will write both a sidecar JSON explaining the columns, as well as a *channels.tsv
for the ICA components.
I will try to get to it today before I leave. Sorry swamped.
Just released v0.2 tho!
@adam2392 How to run the conversion:
improve_icalabel/mnestudy/ica_to_bids
. from mara import convert
directory_in = r"path/to/fasor"
directory_out = r"path/to/where/you/want"
Where fasor
is a folder in the MARA zip/tar/(whatever the compression was) file shared by Alexandre Gramfort.
IIRC, you'll see that those lines https://github.com/adam2392/improve_icalabel/blob/2b91b34b9e59baa05cca16170fccc5aad0bfcb5c/mnestudy/ica_to_bids/mara.py#L49-L54 are failing.
Hey @adam2392,
The conversion script is almost complete. Can you please run it and fix the last BIDS-related issue? You'll figure it out quicker than me.. From the
ica_to_bids
current directory (to load the functionloader
frommara_loader.py
with the line below). https://github.com/adam2392/improve_icalabel/blob/f87e381b4fe23cf40294937455bbca9f4c3c9e97/mnestudy/ica_to_bids/mara.py#L10Run the function
convert
withdirectory_in
set as thefasor
folder of the dataset (folder which contains all the.mat
files). https://github.com/adam2392/improve_icalabel/blob/f87e381b4fe23cf40294937455bbca9f4c3c9e97/mnestudy/ica_to_bids/mara.py#L13-L22The ICA, sources, and montage are correctly written (feel free to change the bids-path elements, I've used the key
processing
to differentiate, but it does not matter). The label of the components are not getting written and raises an error: https://github.com/adam2392/improve_icalabel/blob/f87e381b4fe23cf40294937455bbca9f4c3c9e97/mnestudy/ica_to_bids/mara.py#L49-L54It's getting late, and I'm getting confused by the
write_components_tsv
function https://github.com/mne-tools/mne-icalabel/blob/ab090dd1ae0c8279f94594bdf634c69ac8bc09fb/mne_icalabel/annotation/bids.py#L10-L74Does it write .tsv or .json?