@@ -188,7 +188,14 @@ def collect_participants(bids_dir, participant_label=None, strict=False, bids_va
188188 return found_label
189189
190190
191- def collect_data (bids_dir , participant_label , session_id = None , filters = None , bids_validate = True ):
191+ def collect_data (
192+ bids_dir ,
193+ participant_label ,
194+ session_id = None ,
195+ filters = None ,
196+ bids_validate = True ,
197+ ignore = None ,
198+ ):
192199 """Use pybids to retrieve the input data for a given participant."""
193200 import yaml
194201
@@ -197,10 +204,11 @@ def collect_data(bids_dir, participant_label, session_id=None, filters=None, bid
197204 else :
198205 layout = BIDSLayout (str (bids_dir ), validate = bids_validate )
199206
207+ # Coerce to list
208+ ignore = ignore or []
209+
200210 queries = {
201211 'fmap' : {'datatype' : 'fmap' },
202- 'sbref' : {'datatype' : 'func' , 'suffix' : 'sbref' },
203- 'flair' : {'datatype' : 'anat' , 'suffix' : 'FLAIR' },
204212 't2w' : {'datatype' : 'anat' , 'suffix' : 'T2w' },
205213 't1w' : {'datatype' : 'anat' , 'suffix' : 'T1w' },
206214 'roi' : {'datatype' : 'anat' , 'suffix' : 'roi' },
@@ -229,6 +237,10 @@ def collect_data(bids_dir, participant_label, session_id=None, filters=None, bid
229237 )
230238 for dtype , query in queries .items ()
231239 }
240+ # Remove data types that are in the ignore list (this will catch t2w)
241+ for dtype in subj_data .keys ():
242+ if dtype in ignore :
243+ subj_data [dtype ] = []
232244
233245 config .loggers .workflow .log (
234246 25 ,
0 commit comments