Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order to upload the freesurfer output to brainlife:

bl data upload --output /network/lustre/iss01/home/saeed.zahran/mne_data/MNE-sample-data/subjects/sample --project 625d36f9cc8ab2b339ea4687 --datatype neuro/freesurfer --subject FRS --session 1

...

The functions in mne that deal with forward model takes the inputs as:

subject=subject, subjects_dir=subjects_dir,

subjects_dir is the subjects directory and subject is subject name

so the subjects_dir should be the parent directory where freesurfer output is staged and subject should be set to "output".

brainlife stores all freesurfer directory under "output

...

on brainlife parent of output is usually the object id

so, when brainlife givess a config like this

Code Block
{
    "parcellation": "aparc",
    "freesurfer": "../62bcba44fd504b9f17ad2be0/61164b436135cd2478c53c88/output",
}

we can take path specified by freesurfer and use the basename(output) as the subject name, and dirname(../62bcba44fd504b9f17ad2be0/61164b436135cd2478c53c88) as the subject_dir

This can be solved using the below code:

subject=os.path.basename(config["freesurfer"])

subjects_dir=os.path.dirname(config["freesurfer"])

Links to the App:

https://github.com/zahransa/app-forward

...