Skip to content

Commit

Permalink
Merge pull request #1266 from nipreps/fix/dwi-group-reports
Browse files Browse the repository at this point in the history
FIX: Enable group reports for DWI
  • Loading branch information
oesteban committed Apr 12, 2024
2 parents 5672475 + db35832 commit 39be284
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mriqc/data/reports/embed_resources/boxplots.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ function makeDistroChart(settings) {
chart.data = chart.settings.data;

iqmName = chart.data[0][chart.settings.xName]
if (iqmName.lastIndexOf('_') > 0) {
iqmName = iqmName.substr(0, iqmName.lastIndexOf('_'))
if (iqmName.indexOf('_') > 0) {
iqmName = iqmName.substr(0, iqmName.indexOf('_'))
}
chart.settings.axisLabels.yAxis = iqmName.toUpperCase()
if (iqmName.toLowerCase().startsWith('fd') || iqmName.toLowerCase().startsWith('spikes')) {
Expand Down
49 changes: 48 additions & 1 deletion mriqc/reports/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,54 @@ def gen_html(csv_file, mod, csv_failed=None, out_file=None):
None,
),
],
'dwi': [],
'dwi': [
([
f'bdiffs_{sub}' for sub in ('max', 'mean', 'median', 'min')
], 'rad'),
(['fa_degenerate', 'fa_nans'], 'ppm'),
(['spikes_ppm_global', 'spikes_ppm_slice'], 'ppm'),
(['ndc'], None),
([f'sigma_{meth}' for meth in ('cc', 'pca', 'piesno')], None),
(['fd_mean'], 'mm'),
(['fd_num'], '# timepoints'),
(['fd_perc'], '% timepoints'),
(
[
'summary_bg_p05',
'summary_fg_p05',
'summary_wm_p05',
'summary_bg_mean',
'summary_fg_mean',
'summary_wm_mean',
'summary_bg_median',
'summary_fg_median',
'summary_wm_median',
'summary_bg_p95',
'summary_fg_p95',
'summary_wm_p95',
],
'a.u.',
),
(
[
'summary_bg_stdv',
'summary_fg_stdv',
'summary_wm_stdv',
'summary_bg_mad',
'summary_fg_mad',
'summary_wm_mad',
],
None,
),
(
[
'summary_bg_k',
'summary_fg_k',
'summary_wm_k',
],
None,
),
],
}

if csv_file.suffix == '.csv':
Expand Down

0 comments on commit 39be284

Please sign in to comment.