# Code for the high risk autism phenotype paper [](https://lbesson.mit-license.org/) 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](https://github.com/surchs/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 [](https://doi.org/10.5281/zenodo.15517157) - 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](https://github.com/surchs/ASD_subtype_code_supplement/tree/master/scripts/pheno). - 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`: ```bash 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: ```bash 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: ```bash 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: ```bash invoke docker-build ``` To generate a compressed archive: ```bash invoke docker-archive ``` ### Create an Apptainer image After building the Docker image, run: ```bash invoke apptainer-archive ``` This builds the `.sif` image from the Docker daemon.