/
App-forward

This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

App-forward

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

 

{ "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

https://brainlife.io/app/627a60e9d0697cf1eacb34d7

 

 

 

Related content

App-BEM
App-BEM
Read with this
How to run an App on Brainlife
How to run an App on Brainlife
More like this
App-inverse
App-inverse
Read with this
How to upload data on Brainlife
How to upload data on Brainlife
More like this
Source estimation
Source estimation
Read with this
Create a helper.py file
Create a helper.py file
More like this