Skip to content

Instantly share code, notes, and snippets.

@satra
Created May 22, 2010 14:31
Show Gist options
  • Save satra/410112 to your computer and use it in GitHub Desktop.
Save satra/410112 to your computer and use it in GitHub Desktop.
grp1_subjects = ['s1','s2']
grp2_subjects = ['s3','s4']
def pickfiles(files, subjects):
outfiles = []
for s in subjects:
outfiles.extend([f for f in files if s in f])
return outfiles
"""
c. As before, we setup a pipeline to connect these two nodes
(l2source -> twosamplettest).
"""
l2Vbgpipeline = pe.Pipeline()
l2Vbgpipeline.config['workdir'] = os.path.join(base_dir,'l2output/social/BG/')
l2Vbgpipeline.connect([(l2Vbgsource,twosamplettest,[(('file_list',pickfiles,grp1_subjects),'images_group1'),
(('file_list',pickfiles,grp2_subjects),'images_group2')]),
l2Ppipeline = pe.Pipeline()
l2Ppipeline.config['workdir'] = os.path.abspath('./surface/l2output/novelfaces/patients/')
l2Ppipeline.config['use_parameterized_dirs'] = True
l2Ppipeline.connect([(l2Psource,l2Pconcat,[(('file_list',pickfiles, grp1_subjects),'volimages')]),
(l2Pregsource,l2Pconcat,[(('file_list',pickfiles, grp1_subjects),'volregs')]),
(l2Pconcat,onesamplettest,[('outfile','funcimage'),
(('outfile',gethemi),'hemi')]),
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment