Template for children/scripting/organizing a database for children and adult

Hi,

I'd need help for organizing my database.

I have 2 groups: children and adult.
I don't have individual MRI, so I have to use two templates: 1 for adults (from brainstorm) and one for children.
For each subject I have 6 conditions (pca1, pca2, pca 3, pca4, pca5, pca6).
In each condition I have 3 1-sec recordings.
I am going to make a source analysis.
I want to average the source of the 3 1-sec recordings for each subject.
Than I want to: 1) look at the average signal for each condition in each group and 2) compare each condition between groups (adult vs children).
I'm scripting each step.
I created a loop for importing the EEG recordings.

Questions:
0. For the statistical analysis, would it be better to have the database organized as: patients> conditions> recordings or
conditions> patients> recordings? or
does it not matter at all?

  1. do you have a template for children? if yes of which age range?
    otherwise I grabbed one adequate to my age range (7.5 to 13 yo) from an open source template database for children.
    However this template has no fiducials or segmentation.
  2. I created a protocol selecting the option 'yes, use default anatomy'. But I have 2 default anatomies, 1 for children and 1 for adults. is there a way to avoid to import and segment the children anatomy for each subject? and to avoid also to repeat the issue of fiducials for each subject?

I know it's a bit chaotic, I hope it is understandable..

Thanks much for your time,
Annie

For the statistical analysis, would it be better to have the database organized as: patients> conditions> recordings or conditions> patients> recordings?

In the database: one patient = one subject, set the correct template for each subject.
Then import all the recordings belonging to each subject.
The display option that you see above the database explorer has no impact on the actual storage of the data.

do you have a template for children?

https://neuroimage.usc.edu/brainstorm/Tutorials/DefaultAnatomy#FreeSurfer_templates

But I have 2 default anatomies, 1 for children and 1 for adults. is there a way to avoid to import and segment the children anatomy for each subject?

  • Create one adult patient with the option "Default anatomy: NO"
  • Set the anatomy to the template you want with a right-click > Use template
  • Set the fiducials the way you want, if you're not satisfied with the default positions
  • Right-click > File > Duplicate subject: to create all the subjects you need. This could be scripted with function db_set_template.m.
  • Repeat for the children patients.

Thank you so much for your quick reply!

Regarding the template for children, I could find one only for newborns. My kids are 7-14 yo, so I think I will use one of the templates I found here:
http://www.bic.mni.mcgill.ca/ServicesAtlases/NIHPD-obj1
and segment it using cat12.
It would be great to have children templates for different age groups implemented!

Just a couple of questions more:

  1. I will have two groups (adults> default anatomy ICBM152, children> see above).
    As I have 2 different templates, should I compute the MNI normalization in order to make a group comparison (adult vs children?)

  2. for adult I am using these lines

for l = 1 : size(list,1)  
%% Create subject
SubjectName = NameSubjects{1};
[sSubject, iSubject] = db_add_subject(SubjectName);
%% Set anatomy
sTemplates = bst_get('AnatomyDefaults');
iTemplate = find(strcmpi('ICBM152_2019', {sTemplates.Name}));
db_set_template(iSubject, sTemplates(iTemplate), 0);
for pcaic = 1 : length(idx) 
list = eval(idx{pcaic});     
%% Create a folder
ConditionName = idx{pcaic};
iStudySim = db_add_condition(SubjectName, ConditionName);

however for children, after creating the first subject with its own template this way

%% Import MRI
KidsTemplate = {...
    'C:\scripts\MRI\mri templates neuroimage 2011\nihpd_asym_07.5-13.5_t1w.nii'};
sFiles = bst_process('CallProcess', 'process_import_mri', sFiles, [], ...
    'subjectname', SubjectNames{1}, ...
    'mrifile',     {RawFiles{1}, 'Nifti1'}, ...
    'nas',         [99.00, 216.00, 25.00], ...
    'lpa',         [174.00, 121.00, 28.00], ...
    'rpa',         [22.00, 122.00, 20.00], ...
    'ac',          [99.00, 137.00, 69.00], ...
    'pc',          [99.00, 109.00, 72.00], ...
    'ih',          [99.00, 109.00, 131.00]);

% Process: Segment MRI with CAT12
KidsTemplate = {...
    'C:\scripts\spm12\toolbox\cat12\templates_volumes\TPM_Age11.5.nii'}
sFiles = bst_process('CallProcess', 'process_segment_cat12', sFiles, [], ...
    'subjectname', SubjectNames{1}, ...
    'nvertices',   15000, ...
    'tpmnii',      {KidsTemplate{1}, 'Nifti1'}, ...
    'sphreg',      1, ...
    'vol',         1, ...
    'extramaps',   0, ...
    'cerebellum',  0);

it's not clear to me how to say to brainstorm, hey create a new subject but use the previous template
db_set_template(iSubject, sTemplates(how do I define this ?), 0);

Super thanks

Anna

It would be great to have children templates for different age groups implemented!

Indeed! We just need to find someone to work on processing/packaging/documenting them...
If you'd like to work on this, your contribution would be more than welcome!

As I have 2 different templates, should I compute the MNI normalization in order to make a group comparison (adult vs children?)

You need some for of normalization if you want to compare different anatomies, indeed.
If CAT12 runs correctly on all the subjects, you should have access to registered cortical maps for both adults and children:
https://neuroimage.usc.edu/brainstorm/Tutorials/CoregisterSubjects

The volume-based MNI normalization computed by CAT or SPM use adult tissue probability maps (TPM.nii). I don't know whether it makes sense to use this to normalize younger brains. This is a question you should ask to the SPM or CAT developers. There are maybe TPM.nii files available for different age ranges.

There is also the InfantFS available in the FreeSurfer environment:
infantFS - Free Surfer Wiki

sTemplates = bst_get('AnatomyDefaults');
iTemplate = find(strcmpi('ICBM152_2019', {sTemplates.Name}));
db_set_template(iSubject, sTemplates(iTemplate), 0);

This can be replaced with:

sTemplate = bst_get('AnatomyDefaults', 'ICBM152_2019');
db_set_template(iSubject, sTemplate, 0);

Or even simpler (after updating Brainstorm):

db_set_template(iSubject, 'ICBM152_2019', 0);

it's not clear to me how to say to brainstorm, hey create a new subject but use the previous template
db_set_template(iSubject, sTemplates(how do I define this ?), 0);

Either you duplicate the subject using the process "File > Duplicate files".

Or you create explicitly a template after running the segmentation, and then re-use it for other subjects.

  • Right-click on the subject anatomy folder > Use template > Create new template.
  • Equivalent call: export_default_anat(iSubject, TemplateName, 0);

Note that the new template is saved in the Brainstorm user folder $HOME/.brainstorm/defaults/anatomy/, and this stays permanently even between two protocols. If you call twice export_default_anat with the same TemplateName, it would fail.