Skip to content

Commit

Permalink
Update fmriprep/interfaces/confounds.py
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies authored Sep 27, 2022
1 parent 2052f3e commit fd941ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fmriprep/interfaces/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ def _run_interface(self, runtime):
a_orig = a_comp_cor["component"]
a_new = [f"a_comp_cor_{i:02d}" for i in range(len(a_orig))]

final_components = components.rename(columns=dict(zip(c_orig, c_new)))
final_components.rename(columns=dict(zip(w_orig, w_new)), inplace=True)
final_components.rename(columns=dict(zip(a_orig, a_new)), inplace=True)
final_components.to_csv(self._results["components_file"], sep='\t', index=False)
final_components = components.rename(columns=dict(zip(c_orig, c_new)))
final_components.rename(columns=dict(zip(w_orig, w_new)), inplace=True)
final_components.rename(columns=dict(zip(a_orig, a_new)), inplace=True)
final_components.to_csv(self._results["components_file"], sep='\t', index=False)

metadata.loc[c_comp_cor.index, "component"] = c_new
metadata.loc[w_comp_cor.index, "component"] = w_new
Expand Down

0 comments on commit fd941ff

Please sign in to comment.