Skip to content

Commit

Permalink
Address style issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed May 10, 2024
1 parent 797031f commit b403212
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/fmripost_aroma/interfaces/aroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AROMAClassifier(SimpleInterface):
def _run_interface(self, runtime):
TR = self.inputs.TR
motion_params = utils.load_motpars(self.inputs.motpars, source='fmriprep')
motion_params = motion_params[self.inputs.skip_vols:, :]
motion_params = motion_params[self.inputs.skip_vols :, :]
mixing = np.loadtxt(self.inputs.mixing) # T x C
component_maps = nb.load(self.inputs.component_maps) # X x Y x Z x C

Check warning on line 46 in src/fmripost_aroma/interfaces/aroma.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/interfaces/aroma.py#L42-L46

Added lines #L42 - L46 were not covered by tests
if mixing.shape[1] != component_maps.shape[3]:
Expand Down Expand Up @@ -81,11 +81,9 @@ def _run_interface(self, runtime):
metric_metadata.update(clf_metadata)

Check warning on line 81 in src/fmripost_aroma/interfaces/aroma.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/interfaces/aroma.py#L78-L81

Added lines #L78 - L81 were not covered by tests

# Add MELODIC component statistics to the AROMA features
component_stats = pd.read_csv(
self.inputs.component_stats,
header=None,
sep=' ',
)[[0, 1]] / 100
component_stats = (

Check warning on line 84 in src/fmripost_aroma/interfaces/aroma.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/interfaces/aroma.py#L84

Added line #L84 was not covered by tests
pd.read_csv(self.inputs.component_stats, header=None, sep=' ')[[0, 1]] / 100
)
component_stats.columns = ['model_variance_explained', 'total_variance_explained']
features_df = pd.concat([features_df, component_stats], axis=1)
metric_metadata.update(

Check warning on line 89 in src/fmripost_aroma/interfaces/aroma.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/interfaces/aroma.py#L87-L89

Added lines #L87 - L89 were not covered by tests
Expand Down

0 comments on commit b403212

Please sign in to comment.