HRA-AMAP (Human Reference Atlas – Automated Mapping and Projection) enables automated projection of tissue blocks from a source organ to a new reference organ—typically aligned with the Human Reference Atlas (HRA)—as part of the HuBMAP initiative.
🧬 List of available millitomes: https://cns-iu.github.io/hra-amap/millitomes.html
📦 HRA Registrations repository: https://github.com/hubmapconsortium/hra-registrations
pip install git+https://github.com/cns-iu/hra-amap.git@main
Install BCPD (an essential component of this project)
Please follow the BCPD Installation Instructions if it is not already set up on your machine.
To contribute or develop this project locally, follow the steps below:
git clone https://github.com/cns-iu/hra-amap.git
cd hra-amap
npx github:hubmapconsortium/hra-rui-locations-processor help
pip install hatch
pip install -e .
hatch build
pip install dist/hra_amap-0.5.0-py3-none-any.whl
pip uninstall hra-amap
To register a new millitome organ, organize the necessary configuration and input files as described below.
Each millitome dataset should be placed in its own subdirectory under:
input-data/millitome/<organ-name>-<sex>-<source>/<version>/
Place the following files inside the
🔹 Stage 1: Generates the projected 3D model data
It takes a configuration file with RUI locations and donor metadata, and generates projection data that serves as input for Stage 2.
hra-amap-stage-1 \
--config <path_to_config.yaml> \
--output_path <path_to_output_directory> \
--point_cloud_output_path <path_to_point_cloud_tranformation_glb>
🔹 Stage 2: Produces the final registered organ model
It takes the output from Stage 1 (a projection file), a configuration file, and produces the final registered organ models.
hra-amap-stage-2 \
--stage1_projection_path <path_to_projections.pickle.gz> \
--output_path <path_to_output_directory> \
--config <path_to_config.yaml>
🔹 Run All: Register All Available Millitome Organs This command automates both Stage 1 and Stage 2 for all available millitome configurations found in the input-data/millitome/ directory.
hra-amap-run
In addition to standard millitome registration workflows, HRA-AMAP supports backward projection and Non-HRA mapping, enabling tissue blocks to be projected from HRA reference organs into external (non-HRA) atlas models.
This extension is designed for scenarios where:
The backward mapping workflow consists of two stages:
External Atlas (non-HRA)
↑ (Backward Projection)
Stage 1: Projection Generation
↓
Projection Pickle (.pickle.gz)
↓
Stage 2: Non-HRA Mapping
↓
GLB + JSON-LD Outputs
Stage 1 generates organ registration projections using the HRA registration pipeline.
When the --backward_projection flag is enabled, the projection direction is reversed (HRA → non-HRA).
.pickle.gz)hra-amap-stage-1 \
--config <path_to_config.yaml> \
--output_path <path_to_output_projection.pickle> \
--point_cloud_output_path <path_to_point_cloud_tranformation_glb> \
--backward_projection
Stage 2 consumes the projection output from Stage 1 and maps donor tissue blocks into a non-HRA organ model space.
What this stage does
Waits for the HRA database to be ready
Fetches donor samples using an ontology term
Loads projected tissue blocks
Aligns blocks into the non-HRA organ mesh
non-hra-mapping \
--stage1_projection_path <path_to_projections.pickle.gz> \
--config <path_to_config.yaml> \
--output_path <path_to_output_directory> \
--ontology-term http://purl.obolibrary.org/obo/UBERON_<ID>
Use this mode when the organ mesh is already aligned to the HuBMAP Framework. In this mode the pipeline:
non-hra-mapping \
--stage1_projection_path <path_to_projections.pickle.gz> \
--config <path_to_config.yaml> \
--output_path <path_to_output_directory> \
--ontology-term http://purl.obolibrary.org/obo/UBERON_<ID> \
--hubmap_derived_model