4830

New neuroimaging technologies in SPM: BIDS, docker, boutique, and quality control
Tanguy Duval1 and Vincent Lubrano1,2

1UMR 1214 Toulouse Neuroimaging Center, INSERM, Toulouse, France, 2Department of Neurosurgery, University Hospital of Toulouse, Toulouse, France

Synopsis

Today, sharing pipelines across the community is still a complex issue. New technologies and standards, however, change our methods for better collaboration. Here we propose to integrate them seamlessly into the stable and popular SPM pipeline manager. The graphical user interface gives enough flexibility for understanding, modifying, creating and sharing the standard pipelines that are not available today. These pipelines can finally be run with a simple BIDS-app command on any computer.

Purpose

Neuroimaging is undergoing a methodological mutation with new standards for data organization (Brain Imaging Data Structure, or BIDS) [1] or command line description (Boutiques) [2], and with the popularization of software containers technologies such as docker or singularity for easy software distribution. Using these solutions, fully automatic processing pipelines can be shared and reused easily with standard commands and without any installation of software. BIDS apps (https://github.com/BIDS-Apps), for instance, propose a list of analysis pipelines, installed on a Docker container, that can be reused easily by any other group on a BIDS compatible dataset. One major limitation of BIDS app or similar solution is the lack of flexibility and transparency: understanding, adapting, modifying and creating new pipelines requires advanced skills that hinder the use of these solutions.

Here, we propose to use the very popular and stable SPM batch system to build flexible and transparent pipelines (figure 1) that can (1) call any neuroimaging tool on any docker container, (2) parse a BIDS directory to perform individual or group analysis and (3) integrates a flexible quality control system. Note that the user still benefits from all the preexisting modules of SPM for building the pipeline (folder creation, reports, unarchiving files, statistical or preprocessing tools, custom Octave/Matlab function, advanced mathematical operations, etc...). Also note that the same strategy could be integrated into another pipeline manager such as PSOM [3], Nipype [4],

For this aim, new SPM modules have been developed. This open-source solution can be used for free on any platform (Windows, Mac or Linux), using the executables provided at the following link: https://github.com/tanguyduval/spm12.

Software description

System call to neuroimaging tools (e.g. FSL, ANTs, MRtrix, python scripts). Neuroimaging tools can be run locally or on a docker container using the generic module “System Call” (Figure 2) or by using the pre-filled module in the menu bar (Figure 3). For more flexibility, instead of installing all the dependencies of the entire pipeline on a single container, each step of the pipeline is instantiated on-the-fly on a user-specified Docker container. Figure 2 shows an example of a typical system call for fslmaths. Inputs (variables, options or files) are described in the general command line using the standard proposed in Boutiques [2]. Folders containing the inputs and outputs are automatically mounted on docker. Outputs are defined by the user and used for the dependency tree. Pre-filled modules can be saved to the menu bar, as shown in figure 3, and easily shared as a Boutiques descriptor.

BIDS parser. SPM includes a bids parser that reads and list imaging modalities, acquisition parameters, and details about the sessions, the subjects, and the dataset. Virtual outputs are automatically generated and are used in a dependency tree for the next modules (figure 4). Default virtual outputs are generated from a template proposed by the BIDS community (https://github.com/bids-standard/bids-starter-kit/tree/master/templates).

Report and quality control. A module has been integrated to generate a light HTML report for quality control. This module is based on the template proposed by the spinal cord toolbox team [5]. This module accepts the following features: 3D or multiple 3D volumes, 4D volumes, overlays. 3D data are converted into an image of 6 slices. 4D volumes are displayed as looping movies of 1s. Overlays are displayed as blinking semi-transparent images.

When ready for distribution, pipelines can be run on a large scale on clusters using the SPM docker container.

Conclusion

In this work, we propose a unique solution for creating flexible, transparent, and advanced processing pipelines that can be run on-the-fly. Pipelines can be shared easily using compact and intelligible text files, that can be read in the graphical user interface for more clarity and documentation. The solution relies on the popular and stable SPM batch system, and on the container technology Docker to get rid of software installation and dependencies. It conforms to recently growing standards such as BIDS and Boutiques. The software, with documentation and examples of pipelines, can be found on Github: https://github.com/tanguyduval/spm12.

Acknowledgements

We would like to thank Benjamin Lemasson, Clément Brossard, Guillaume Flandin, and the network for multicentric study (REMI) for their fruitful discussions on these issues.

Financed by the HTE program.

References

[1] K.J. Gorgolewski et al., Scientific data, 2016, 3, 160044.

[2] T. Glatard et al., arXiv [cs.SE], 2017.

[3] P. Bellec et al., Frontiers in neuroinformatics, 2012, 6, 7.

[4] K. Gorgolewski et al., Frontiers in neuroinformatics, 2011, 5, 13.

[5] B. De Leener et al., NeuroImage, 2017, 145, 24.

Figures

Figure 1. Sharing neuroimaging pipelines across the community is a complex problem. Solutions exist, but a trade-off is usually made between the flexibility and the capability to distribute the pipeline. The extended SPM12 solution proposed here is willing to address these discrepancies by allowing to run any command on a Docker container and by conforming with recent standards.

Figure 1. Example of a call for fslmaths using the new “Call System command” module

Figure 2. Pre-filled modules can be saved in the menu bar for future re-use. Complex commands can be saved into different modules with different default options (e.g. fslmaths can be saved for time-averaging or smoothing).

Figure 3. A BIDS directory can be parsed in order to access data and parameters in the dependency tree. This way, generic pipelines can be written for all BIDS datasets.

Proc. Intl. Soc. Mag. Reson. Med. 27 (2019)
4830