High-precision machine learning identifies a reproducible functional connectivity signature of autism spectrum diagnosis in a subset of individuals

Workflow Type: R markdown

Code for the high risk autism phenotype paper

MIT license

This repository implements a fully reproducible pipeline for the autism signature project. It uses invoke tasks and a Docker container for consistent, cross-platform execution.

The entire workflow—data fetching, processing, and figure generation—can be reproduced in a few commands. Much of the code in this repo originated from ASD High Risk Endophenotype Code Supplement and was written by Sebastian Urchs and Hien Nguyen. All data to reproduce the analysis can be downloaded from DOI

  • The study uses data from ABIDE 1 and 2 datasets. Participants were matched using propensity score matching as part of another project, matching scripts can be found here ASD Subtype Code Supplement.
  • Resting state functional connectivity data was preprocessed using NIAK, described in the paper. This study uses the seed maps.
  • Using the following scripts the full analysis can be reproduced. Alternatively, to skip the data analysis part and recreate the figures, download only the results and atlas data from Zenodo.

🚀 Quick Start

1⃣ Install invoke

First, install invoke:

pip install invoke

You must also have either Docker or Apptainer installed to use container-based execution.

4⃣ Clean Everything

To remove all generated data:

invoke clean-all

📁 Folder Structure

Folder Description
source_data/ Raw data: Atlases & fMRI data.
output_data/ All generated outputs: Discovery results, figures, etc.
code/figures/ Jupyter notebooks used to generate all figures.
output_data/Figures/ Output folders for each figure notebook.
tasks.py / tasks_utils.py The heart of the pipeline: all invoke tasks live here.

Building the environment

Installing dependencies

To set up everything, ensure functional Python and R environments and run:

invoke setup-all

This:

  • sets up Python & R environments (if running locally);
  • prepares the folder structure.

Note: This task assumes an Ubuntu-like OS. You still need to install R, Python, etc. See the Dockerfile for complete setup info.

Note 2: You can skip this if using the Docker container and running docker-run directly.

Create a Docker image

To build a Docker image:

invoke docker-build

To generate a compressed archive:

invoke docker-archive

Create an Apptainer image

After building the Docker image, run:

invoke apptainer-archive

This builds the .sif image from the Docker daemon.

Version History

main @ 4b6e6b9 (latest) Created 11th Jun 2025 at 10:53 by Natasha Clarke

Update project title


Frozen main 4b6e6b9

main @ 4b6e6b9 Created 10th Jun 2025 at 10:33 by Natasha Clarke

Update zenodo assets


Frozen main 4b6e6b9

main @ d423b33 (earliest) Created 11th Apr 2025 at 22:49 by Natasha Clarke

Update README.md

Added links


Frozen main d423b33
help Creators and Submitter
License
Activity

Views: 477   Downloads: 109

Created: 11th Apr 2025 at 22:49

Last updated: 11th Jun 2025 at 10:53

help Tags

This item has not yet been tagged.

help Attributions

None

Total size: 1.68 MB
Powered by
(v.1.17.0-main)
Copyright © 2008 - 2025 The University of Manchester and HITS gGmbH