# ramp-kits/autism architecture

> Architecture diagram of the GitHub repository ramp-kits/autism, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ramp-kits/autism
- Repository: https://github.com/ramp-kits/autism

## Overview

This repository is an IMaging-PsychiAtry Challenge starting kit for classifying autism spectrum disorder from participant, anatomical MRI, and functional MRI data. The intended workflow is to assemble train/test features and labels, extract functional connectivity and/or anatomical features, fit a classifier, and produce predictions. It also includes utilities for downloading precomputed fMRI time series and preparing fCON data. The submission workflow’s runtime wiring is not shown in the excerpts, so links from the challenge definition to the example submission components are marked unverified.

Main entry points: [`problem.py`](https://github.com/ramp-kits/autism/blob/master/problem.py) (Problem definition), [`data`](https://github.com/ramp-kits/autism/tree/master/data) (Challenge metadata), [`download_data.py`](https://github.com/ramp-kits/autism/blob/master/download_data.py) (Time-series downloader), [`submissions/starting_kit_functional/feature_extractor.py`](https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_functional/feature_extractor.py) (Functional features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_challenge["Challenge workflow"]
  node_problem["Problem definition<br/>[problem.py]"]
end

subgraph group_preprocessing["MRI preprocessing"]
  node_time_series["Time-series extraction"]
  node_fcon_prep["fCON preparation<br/>[prepare_fcon.py]"]
end

subgraph group_submissions["Submission models"]
  node_functional_features["Functional features"]
  node_functional_classifier["Functional classifier<br/>[classifier.py]"]
  node_anatomy_features["Anatomical features"]
  node_anatomy_classifier["Anatomical classifier<br/>[classifier.py]"]
  node_combined_features["Combined features"]
  node_combined_classifier["Combined classifier<br/>[classifier.py]"]
end

subgraph group_data["Data assets"]
  node_challenge_data[("Challenge metadata")]
  node_data_download["Time-series downloader<br/>[download_data.py]"]
end

node_user(("Challenge user"))
node_remote_archive[("Zenodo atlas archives")]

node_user -.->|"runs challenge"| node_problem
node_problem -->|"loads metadata"| node_challenge_data
node_problem -.->|"configures workflow"| node_functional_features
node_problem -.->|"configures workflow"| node_anatomy_features
node_problem -.->|"configures workflow"| node_combined_features
node_functional_features -.->|"provides features"| node_functional_classifier
node_anatomy_features -.->|"provides features"| node_anatomy_classifier
node_combined_features -.->|"provides features"| node_combined_classifier
node_time_series -->|"writes time series"| node_challenge_data
node_data_download -->|"downloads archives"| node_remote_archive
node_data_download -->|"stores atlas data"| node_challenge_data

click node_problem "https://github.com/ramp-kits/autism/blob/master/problem.py"
click node_challenge_data "https://github.com/ramp-kits/autism/tree/master/data"
click node_time_series "https://github.com/ramp-kits/autism/blob/master/preprocessing/extract_time_series.py"
click node_fcon_prep "https://github.com/ramp-kits/autism/blob/master/preprocessing/prepare_fcon.py"
click node_data_download "https://github.com/ramp-kits/autism/blob/master/download_data.py"
click node_functional_features "https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_functional/feature_extractor.py"
click node_functional_classifier "https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_functional/classifier.py"
click node_anatomy_features "https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_anatomy/feature_extractor.py"
click node_anatomy_classifier "https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_anatomy/classifier.py"
click node_combined_features "https://github.com/ramp-kits/autism/blob/master/submissions/combine_anatomy_functional/feature_extractor.py"
click node_combined_classifier "https://github.com/ramp-kits/autism/blob/master/submissions/combine_anatomy_functional/classifier.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_problem,node_user toneBlue
class node_time_series,node_fcon_prep,node_remote_archive toneAmber
class node_functional_features,node_functional_classifier,node_anatomy_features,node_anatomy_classifier,node_combined_features,node_combined_classifier toneMint
class node_challenge_data,node_data_download toneRose
```

## Components

### Challenge workflow

- [Problem definition](https://github.com/ramp-kits/autism/blob/master/problem.py): `problem.py`

### MRI preprocessing

- [Time-series extraction](https://github.com/ramp-kits/autism/blob/master/preprocessing/extract_time_series.py): `preprocessing/extract_time_series.py`
- [fCON preparation](https://github.com/ramp-kits/autism/blob/master/preprocessing/prepare_fcon.py): `preprocessing/prepare_fcon.py`

### Submission models

- [Functional features](https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_functional/feature_extractor.py): `submissions/starting_kit_functional/feature_extractor.py`
- [Functional classifier](https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_functional/classifier.py): `submissions/starting_kit_functional/classifier.py`
- [Anatomical features](https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_anatomy/feature_extractor.py): `submissions/starting_kit_anatomy/feature_extractor.py`
- [Anatomical classifier](https://github.com/ramp-kits/autism/blob/master/submissions/starting_kit_anatomy/classifier.py): `submissions/starting_kit_anatomy/classifier.py`
- [Combined features](https://github.com/ramp-kits/autism/blob/master/submissions/combine_anatomy_functional/feature_extractor.py): `submissions/combine_anatomy_functional/feature_extractor.py`
- [Combined classifier](https://github.com/ramp-kits/autism/blob/master/submissions/combine_anatomy_functional/classifier.py): `submissions/combine_anatomy_functional/classifier.py`

### Data assets

- [Challenge metadata](https://github.com/ramp-kits/autism/tree/master/data): `data`
- [Time-series downloader](https://github.com/ramp-kits/autism/blob/master/download_data.py): `download_data.py`

### Other components

- **Challenge user**
- **Zenodo atlas archives**

## Connections

- Challenge user → Problem definition: runs challenge
- Problem definition → Challenge metadata: loads metadata (evidence: `problem.py`)
- Problem definition → Functional features: configures workflow
- Problem definition → Anatomical features: configures workflow
- Problem definition → Combined features: configures workflow
- Functional features → Functional classifier: provides features
- Anatomical features → Anatomical classifier: provides features
- Combined features → Combined classifier: provides features
- Time-series extraction → Challenge metadata: writes time series (evidence: `preprocessing/extract_time_series.py`)
- Time-series downloader → Zenodo atlas archives: downloads archives (evidence: `download_data.py`)
- Time-series downloader → Challenge metadata: stores atlas data (evidence: `download_data.py`)
