The MRIQC Reports — mriqc 0.8 documentation

# The MRIQC Reports

## Structural images (sMRI)

After all processing has been completed, the designated output directory for the `mriqc` workflow will contain a set of pdf files that contain the relevant reports for the set of scans undergoing quality assessment. The set of output pdfs includes one pdf file per input scan in the scan directory, e.g.: `anatomical_sub-01.pdf`, which contains the T1 slice mosaic and IQMs for that scan. There will also be a group report pdf in the main output directory, e.g.: `anatomical_group.pdf`, that contains summary metrics for the entire set of scans.

### For the individual scan reports:

The T1 Anatomical Slice Mosaic: This plot in the report for the scan being assessed, e.g.:

is the rendering of the axial slices from the 3D stack created by the workflow.

This image can be used to eyeball the quality of the overall signal in the anatomical scan, as it will be obvious if there were any problem areas where there was signal dropout resulting from a bad shim or other sources of signal distortion.

Metrics: The IQMs displayed in the Summary Report, e.g.:

The stars in these plots denote where the score for the scans for this participant fall in the distribution of all scores for scans that were included as inputs to the anatomical-spatial workflow. If there are several runs per session for this individual, then the stars will be displayed adjacent to each other in the violin plot.

### For the group reports:

The violin plots included in the group report, e.g.: `anatomical_group.pdf`, are a graphical representation of the columnar values in the `aMRIQC.csv` file that was created in the main output directory for the workflow. The scores for each metric described above were aggregated to create the distributions that were plotted in both the individual and group reports. Hence, the violin plots in the individual scan reports and the group reports are identical, except that the group reports do not contain any stars denoting individual scans. These group reports are intended to provide the user a means of visually inspecting the overall quality of the spatial data for that group of anatomical scans.

## Functional images (fMRI)

After all processing has been completed, the designated output directory for the functional workflow will contain a set of pdf files that contain the relevant reports for the set of scans undergoing quality assessment. The set of output pdfs includes one pdf file per input scan, e.g.: `functional_sub-01.pdf`, which contains a mosaic plot of the mean EPI volume, a mosaic plot of the tSNR volume, an FD plot, and IQMs for that scan. The IQMs are split in two categories: spatial and temporal. There will also be a group report pdf in that main output directory, e.g.: `functional_group.pdf`, that contains the summary of IQMs for the entire set of scans.

The Mean EPI Slice Mosaic: This plot in the report for the scan being assessed, e.g. Mean EPI image (subject 1_session_1_scan_1) is the rendering of the axial slices from the 3D stack created by the workflow.

This mean EPI was created by averaging the BOLD signal intensity values in each voxel over time.

Hence, a 3-dimensional image was created from the 4-dimensional scan and was displayed as a slice mosaic.

This image can be used to eyeball the quality of the overall signal in the scan, as it will be obvious if there were any problem areas where there was signal dropout resulting from a bad shim or other sources of signal distortion (such as tattoos which contain metallic or ferromagnetic compounds, or permanent makeup).

The tSNR Slice Mosaic: The image showing the tSNR map for a particular scan, e.g.: tSNR volume, subject sub-01 (session_1_func_1) is the rendering of the temporal signal-to-noise ratio information from the scan.

The tSNR plot is similar to the mean EPI plot in that both metrics reduce the 4-dimensional scan to a representative 3-dimensional volume that is then split and displayed as a stack of axial (horizontal) slices. For this tSNR plot, the mean of each voxel’s timeseries is also computed and is then divided by the timeseries standard deviation. Hence, the tSNR plot shows the voxels in which one would expect to have SNR good enough for statistical analyses.

Differences in tSNR are particularly important for comparing the results from region of interest (ROI) analyses, since any observed functional differences might actually be attributable to systematic differences in SNR across the regions being compared. You can learn more about the utility of tSNR plots for fMRI analyses here.

The framewise displacement plot: The image showing the framewise displacement plot for the scan being assessed, e.g. FD, subject sub-01 (session_1_func_1) is the FD that occurred throughout the scan.

This is a temporal motion quality assurance metric and tracks head motions over time, making it easy to determine whether or not the data potentially suffered from significant corruption due to motion. For instance, it is possible to detect if the participant’s head was slowly sinking into the cushions in the head coil, or whether the participant was possibly restless or agitated, which would result in several postion changes or movement spikes. The framewise displacement is a frame-by-frame representation of the differences between the BOLD signal intensity value of the \(n\) and \(n+1\) timepoints, the \(n+1\) and \(n+2\) timepoints, and so on.

The report page for FD in the functional scan includes both this frame-by-frame plot, as well as a histogram that can be used to visually determine what proportion of timepoints exceeded some pre-set movement threshold (eg: 0.2 mm).

The violin plots included in the group report, e.g.: QC measures (session_1) are a graphical representation of the columnar values in the `fMRIQC.csv` file that was created in the main output directory for the workflow.

The scores for each metric described above were aggregated to create the distributions that were plotted in both the individual and group reports. Hence, the violin plots in the individual scan reports and the group reports are identical, except that the group reports do not contain any stars denoting individual scans. These group reports are intended to provide the user a means of visually inspecting the overall quality of the spatial and temporal data for that group of functional scans.

# mriqc.reports package

## Submodules

## mriqc.reports.generators module

Encapsulates report generation functions

class `mriqc.reports.generators.` `ConfigGen`(template_str)

  Bases: `object`

  Utility class for generating a config file from a jinja template. https://github.com/oesteban/endofday/blob/f2e79c625d648ef45b08cc1f11fd0bd84342d604/endofday/core/template.py

  `compile`(configs)
  `generate_conf`(configs, path)

`mriqc.reports.generators.` `concat_pdf`(in_files, out_file='concatenated.pdf')

  Concatenate PDF list (http://stackoverflow.com/a/3444735)

`mriqc.reports.generators.` `generate_csv`(data_type, settings)

`mriqc.reports.generators.` `report_anatomical`(dframe, subject=None, sc_split=False, condensed=True, out_file='anatomical.pdf')

  Calls the report generator on the functional measures

`mriqc.reports.generators.` `report_functional`(dframe, subject=None, sc_split=False, condensed=True, out_file='functional.pdf')

  Calls the report generator on the functional measures

`mriqc.reports.generators.` `summary_cover`(dframe, qctype, failed=None, sub_id=None, out_file=None)

  Generates a cover page with subject information

`mriqc.reports.generators.` `workflow_report`(qctype, settings=None)

  Creates the report

## mriqc.reports.utils module

Helpers in report generation

`mriqc.reports.utils.` `find_failed`(dframe, sub_list)

  Identify failed subjects

`mriqc.reports.utils.` `read_csv`(in_csv)

  Read csv file, sort and drop duplicates

## Module contents

Reports module