diff --git a/cubids/cubids.py b/cubids/cubids.py index f056f8fd2..44c57fdce 100644 --- a/cubids/cubids.py +++ b/cubids/cubids.py @@ -347,7 +347,9 @@ def apply_tsv_changes(self, summary_tsv, files_tsv, new_prefix, raise_on_error=T merge_commands = [] for source_id, dest_id in ok_merges: dest_files = files_df.loc[(files_df[["ParamGroup", "EntitySet"]] == dest_id).all(1)] - source_files = files_df.loc[(files_df[["ParamGroup", "EntitySet"]] == source_id).all(1)] + source_files = files_df.loc[ + (files_df[["ParamGroup", "EntitySet"]] == source_id).all(1) + ] # Get a source json file img_full_path = self.path + source_files.iloc[0].FilePath diff --git a/cubids/metadata_merge.py b/cubids/metadata_merge.py index 2087d009c..6562f35b7 100644 --- a/cubids/metadata_merge.py +++ b/cubids/metadata_merge.py @@ -302,7 +302,9 @@ def group_by_acquisition_sets(files_tsv, output_prefix, acq_group_level): acq_groups[acq_id].append((row.EntitySet, row.ParamGroup)) else: acq_id = (file_entities.get("subject"), None) - acq_groups[acq_id].append((row.EntitySet, row.ParamGroup, file_entities.get("session"))) + acq_groups[acq_id].append( + (row.EntitySet, row.ParamGroup, file_entities.get("session")) + ) # Map the contents to a list of subjects/sessions contents_to_subjects = defaultdict(list)