@@ -382,8 +382,8 @@ def init_pet_confs_wf(
382382 (acompcor_tfm , acompcor_bin , [('output_image' , 'in_file' )]),
383383 (acompcor_bin , merge_rois , [
384384 (('out_mask' , _last ), 'in3' ),
385- (('out_mask' , lambda masks : masks [ 0 ] ), 'in1' ),
386- (('out_mask' , lambda masks : masks [ 1 ] ), 'in2' ),
385+ (('out_mask' , _first ), 'in1' ),
386+ (('out_mask' , _second ), 'in2' ),
387387 ]),
388388 (merge_rois , signals , [('out' , 'label_files' )]),
389389
@@ -615,12 +615,23 @@ def _last(inlist):
615615 return inlist [- 1 ]
616616
617617
618+ def _first (inlist ):
619+ """Return the first element of a list."""
620+
621+ return inlist [0 ]
622+
623+
624+ def _second (inlist ):
625+ """Return the second element of a list."""
626+
627+ return inlist [1 ]
628+
618629def _select_cols (table ):
619630 """Return confound columns excluding a/tCompCor and std_dvars."""
620631 import pandas as pd
621632
622633 return [
623634 col
624635 for col in pd .read_table (table , nrows = 2 ).columns
625- if not col .startswith ((" a_comp_cor_" , " t_comp_cor_" , " std_dvars" ))
636+ if not col .startswith ((' a_comp_cor_' , ' t_comp_cor_' , ' std_dvars' ))
626637 ]
0 commit comments