import nipype.interfaces.io as nio # Data i/o import nipype.interfaces.utility as util # utility import os.path as op import nipype.interfaces.cmtk as cmtk import nipype.pipeline.engine as pe # pypeline engine from nipype.workflows.rsfmri.coma.fmri_graphs import create_fmri_graphs, create_fmri_graph_grouping_workflow from coma.datasets import sample data_path = sample.data_path() subjects_dir = op.join(data_path,"subjects_normalized") output_dir = op.abspath('fmrigraphs') info = dict(functional_images=[['subject_id', '*swvmsrf*']], fmri_ICA_timecourse=[['subject_id','*timecourses*']], fmri_ICA_maps=[['subject_id','*component_ica*']], ica_mask_image=[['subject_id','*icaAnaMask*']]) subject_list = ['Bend1'] infosource = pe.Node(interface=util.IdentityInterface(fields=['subject_id']), name="infosource") infosource.iterables = ('subject_id', subject_list) datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'], outfields=info.keys()), name = 'datasource') datasource.inputs.template = "%s/%s" datasource.inputs.base_directory = data_path datasource.inputs.field_template = dict(functional_images='data/%s/restMotionProcessed/%s.img', fmri_ICA_timecourse='data/%s/restICA/components/%s.img', fmri_ICA_maps='data/%s/restICA/components/%s.img',
import os.path as op import nipype.interfaces.io as nio # Data i/o import nipype.interfaces.utility as util # utility import nipype.pipeline.engine as pe # pypeline engine import nipype.interfaces.fsl as fsl fsl.FSLCommand.set_default_output_type('NIFTI_GZ') from coma.workflows.dmnwf import create_reg_and_label_wf from coma.datasets import sample data_path = sample.data_path() name = 'example_reg_label' subjects_dir = op.join(data_path, "subjects") info = dict(aparc_aseg=[['subject_id', 'subject_id', 'aparc+aseg']], fa=[['subject_id', 'subject_id', 'fa']], wm_mask=[['subject_id', 'subject_id', 'wm_seed_mask']], term_mask=[['subject_id', 'subject_id', 'term_mask']]) subject_list = ['Bend1'] infosource = pe.Node( interface=util.IdentityInterface(fields=['subject_id', 'subjects_dir']), name="infosource") infosource.iterables = ('subject_id', subject_list) infosource.inputs.subjects_dir = subjects_dir