Styx and NiWrap: A Modern Interface Generator for Command-Line Neuroimaging Tools

Poster No:

1858 

Submission Type:

Abstract Submission 

Authors:

Florian Rupprecht1, Jason Kai1, Biraj Shrestha1, Connor Lane1, Steven Giavasis1, Tristan Glatard2, Michael Milham1, Gregory Kiar1

Institutions:

1Child Mind Institute, New York, NY, 2Krembil Centre for Neuroinformatics, Toronto, Ontario

First Author:

Florian Rupprecht  
Child Mind Institute
New York, NY

Co-Author(s):

Jason Kai  
Child Mind Institute
New York, NY
Biraj Shrestha  
Child Mind Institute
New York, NY
Connor Lane  
Child Mind Institute
New York, NY
Steven Giavasis  
Child Mind Institute
New York, NY
Tristan Glatard  
Krembil Centre for Neuroinformatics
Toronto, Ontario
Michael Milham  
Child Mind Institute
New York, NY
Gregory Kiar  
Child Mind Institute
New York, NY

Introduction:

Command-line tools remain essential in neuroimaging research but can be challenging to integrate into modern data science workflows. Integrating these tools typically requires complex shell scripting or manually written wrappers, creating barriers to reproducibility and efficient pipeline development. We present Styx, a compiler for generating language-native wrapper functions from static tool metadata, and NiWrap, a comprehensive collection of brain imaging tool descriptions that together enable seamless integration of neuroimaging tools within the data science ecosystem.

Methods:

Styx employs a three-phase compiler architecture: (1) A frontend that processes tool descriptions in formats such as Boutiques, (2) an intermediate representation for optimization, and (3) backends that generate native interfaces in Python, R, and TypeScript. We extended the Boutiques descriptor format to capture complex command-line patterns using concepts from formal language theory, including hierarchy, alternation, and repetition. For NiWrap, we developed two approaches for generating tool descriptions at scale: direct source code extraction for well-structured packages (e.g., MRTrix3, Workbench), and an LLM-assisted approach for packages with traditional documentation. The generated wrappers provide type safety, IDE integration with autocompletion, and seamless integration with container technologies for reproducible execution.
Supporting Image: Figure1.png
   ·Architectural overview of the Styx compiler. The compiler follows a three-phase design consisting of frontends, an intermediate representation (IR), and backends.
 

Results:

We achieved extensive coverage across major neuroimaging packages including AFNI, ANTs, Convert3D, FSL, FreeSurfer, MRTrix3, NiftyReg, and Workbench. The compiler-based approach ensures maintainability, as improvements propagate automatically to all wrapped tools across supported languages. Integration with container technologies (Docker/Singularity) ensures reproducible execution across computing environments. Unlike workflow engines that impose specific execution patterns, Styx wrappers can be used with any parallel processing solution or workflow framework.
Supporting Image: Figure2.png
 

Conclusions:

Styx and NiWrap bridge the gap between legacy command-line tools and modern scientific computing practices. By providing type-safe, documented interfaces across multiple programming languages, they significantly reduce the complexity of writing and maintaining neuroimaging pipelines. Our solution offers a sustainable path forward for modernizing access to crucial neuroimaging tools while preserving their battle-tested implementations.

Modeling and Analysis Methods:

Methods Development 2
Other Methods

Neuroinformatics and Data Sharing:

Workflows 1
Informatics Other

Keywords:

Computational Neuroscience
Computing
Data analysis
Data Organization
Development
Informatics
Open-Source Code
Open-Source Software
Workflows

1|2Indicates the priority used for review

Abstract Information

By submitting your proposal, you grant permission for the Organization for Human Brain Mapping (OHBM) to distribute your work in any format, including video, audio print and electronic text through OHBM OnDemand, social media channels, the OHBM website, or other electronic publications and media.

I accept

The Open Science Special Interest Group (OSSIG) is introducing a reproducibility challenge for OHBM 2025. This new initiative aims to enhance the reproducibility of scientific results and foster collaborations between labs. Teams will consist of a “source” party and a “reproducing” party, and will be evaluated on the success of their replication, the openness of the source work, and additional deliverables. Click here for more information. Propose your OHBM abstract(s) as source work for future OHBM meetings by selecting one of the following options:

I do not want to participate in the reproducibility challenge.

Please indicate below if your study was a "resting state" or "task-activation” study.

Other

Healthy subjects only or patients (note that patient studies may also involve healthy subjects):

Healthy subjects

Was this research conducted in the United States?

Yes

Are you Internal Review Board (IRB) certified? Please note: Failure to have IRB, if applicable will lead to automatic rejection of abstract.

Not applicable

Were any human subjects research approved by the relevant Institutional Review Board or ethics panel? NOTE: Any human subjects studies without IRB approval will be automatically rejected.

Not applicable

Were any animal research approved by the relevant IACUC or other animal research panel? NOTE: Any animal studies without IACUC approval will be automatically rejected.

Not applicable

Please indicate which methods were used in your research:

Other, Please specify  -   This is a pure software methods submissions

Which processing packages did you use for your study?

Other, Please list  -   N/A

Provide references using APA citation style.

Craddock, C., Sikka, S., Cheung, B., Khanuja, R., Ghosh, S. S., Yan, C., … Others. (2013). Towards automated analysis of connectomes: The configurable pipeline for the analysis of connectomes (c-pac). Front. Neuroinform., 42, 10–3389.

Köster, J., & Rahmann, S. (2018). Snakemake-a scalable bioinformatics workflow engine. Bioinformatics, 34(20), 3600.

Gorgolewski, K., Burns, C. D., Madison, C., Clark, D., Halchenko, Y. O., Waskom, M. L., & Ghosh, S. S. (2011). Nipype: a flexible, lightweight and extensible neuroimaging data processing framework in python. Front. Neuroinform., 5, 13.

Glatard, T., Kiar, G., Aumentado-Armstrong, T., Beck, N., Bellec, P., Bernard, R., … Evans, A. C. (2018). Boutiques: a flexible framework to integrate command-line applications in computing platforms. Gigascience, 7(5).

Hopcroft, J. E. (2001). Introduction to Automata Theory, Languages, and Computation. Addison-Wesley.

Chapman, B., Chilton, J., Heuer, M., Kartashov, A., Leehr, D., Ménager, H., … Stojanovic, L. (2016). Common Workflow Language, v1.0 (P. Amstutz, M. R. Crusoe, & N. Tijanić, Eds.). doi:10.6084/m9.figshare.3115156.v2

UNESCO Institute of Statistics and World Bank Waiver Form

I attest that I currently live, work, or study in a country on the UNESCO Institute of Statistics and World Bank List of Low and Middle Income Countries list provided.

No