File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -1397,33 +1397,5 @@ def main(): # noqa: max-complexity: 12
13971397 print ("QA report generation failed, but defacing completed successfully." )
13981398
13991399
1400- def collect_subject_files (file_list : list ) -> dict :
1401- """Collect files that share the same subject ID into a dictionary.
1402-
1403- Parameters
1404- ----------
1405- file_list : list
1406- List of file paths to process
1407-
1408- Returns
1409- -------
1410- dict
1411- Dictionary mapping subject IDs to lists of their files
1412- Format: {"sub-*": ["file1", "file2", ...]}
1413- """
1414- subject_files = {}
1415-
1416- for file_path in file_list :
1417- # Extract subject ID using regex - matches 'sub-' followed by alphanumeric chars until underscore
1418- match = re .search (r"sub-[a-zA-Z0-9]+(?=_)" , str (file_path ))
1419- if match :
1420- sub_id = match .group (0 )
1421- if sub_id not in subject_files :
1422- subject_files [sub_id ] = []
1423- subject_files [sub_id ].append (str (file_path ))
1424-
1425- return subject_files
1426-
1427-
14281400if __name__ == "__main__" :
14291401 main ()
You can’t perform that action at this time.
0 commit comments