Exemple #1
0
parcellations_dict['basc_197'] = {
    'nii_path':
    os.path.join(
        template_dir,
        'basc_multiscale_2015/template_cambridge_basc_multiscale_nii_sym/template_cambridge_basc_multiscale_sym_scale197.nii.gz'
    ),
    'is_probabilistic':
    False
}

use_n_procs = 5
# plugin_name = 'MultiProc'
plugin_name = 'CondorDAGMan'

for subject_id in subjects_list:
    working_dir = os.path.join(working_dir_base, subject_id)
    ds_dir = os.path.join(ds_dir_base, subject_id)

    print('\n\nsubmitting %s' % subject_id)
    calc_local_metrics(brain_mask=brain_mask,
                       preprocessed_data_dir=in_data_root_path,
                       subject_id=subject_id,
                       parcellations_dict=parcellations_dict,
                       bp_freq_list=bp_freq_list,
                       TR=TR,
                       selectfiles_templates=selectfiles_templates,
                       working_dir=working_dir,
                       ds_dir=ds_dir,
                       use_n_procs=use_n_procs,
                       plugin_name=plugin_name)
Exemple #2
0
parcellations_dict['basc_444'] = {
    'nii_path': os.path.join(template_dir,
                             'basc_multiscale_2015/template_cambridge_basc_multiscale_nii_sym/template_cambridge_basc_multiscale_sym_scale444.nii.gz'),
    'is_probabilistic': False}
parcellations_dict['basc_197'] = {
    'nii_path': os.path.join(template_dir,
                             'basc_multiscale_2015/template_cambridge_basc_multiscale_nii_sym/template_cambridge_basc_multiscale_sym_scale197.nii.gz'),
    'is_probabilistic': False}

use_n_procs = 5
# plugin_name = 'MultiProc'
plugin_name = 'CondorDAGMan'

for subject_id in subjects_list:
    working_dir = os.path.join(working_dir_base, subject_id)
    ds_dir = os.path.join(ds_dir_base, subject_id)

    print('\n\nsubmitting %s' % subject_id)
    calc_local_metrics(brain_mask=brain_mask,
                       preprocessed_data_dir=in_data_root_path,
                       subject_id=subject_id,
                       parcellations_dict=parcellations_dict,
                       bp_freq_list=bp_freq_list,
                       TR=TR,
                       selectfiles_templates=selectfiles_templates,
                       working_dir=working_dir,
                       ds_dir=ds_dir,
                       use_n_procs=use_n_procs,
                       plugin_name=plugin_name)
for subject_id in subjects_list:
    subject_working_dir = os.path.join(working_dir, subject_id)
    subject_ds_dir = os.path.join(ds_dir, subject_id, 'metrics')

    # INPUT PARAMETERS for pipeline
    cfg = {}

    cfg['subject_id'] = subject_id

    cfg['dicom_dir'] = dicom_dir
    cfg['preprocessed_data_dir'] = preprocessed_data_dir

    cfg['working_dir'] = subject_working_dir
    cfg['freesurfer_dir'] = freesurfer_dir
    cfg['template_dir'] = template_dir
    cfg['script_dir'] = script_dir
    cfg['ds_dir'] = subject_ds_dir

    cfg['TR_list'] = TR_list

    cfg['vols_to_drop'] = vols_to_drop
    cfg['rois_list'] = rois_list
    cfg['lp_cutoff_freq'] = lp_cutoff_freq
    cfg['hp_cutoff_freq'] = hp_cutoff_freq
    cfg['use_fs_brainmask'] = use_fs_brainmask

    cfg['use_n_procs'] = use_n_procs
    cfg['plugin_name'] = plugin_name

    calc_metrics.calc_local_metrics(cfg)