This repository will be archived in the coming weeks and will become read-only.
Development has moved to the following repository: fhir-moldef
No further updates will be made to this repository.
Welcome to the FHIR-MolDef-python repository. This project provides a Python implementation of the HL7 (Health Level Seven) Fast Healthcare Interoperability Resources (FHIR) Molecular Definition standard. It enables users to create instances of the MolecularDefinition resource and currently supports three profiles: Sequence, Allele, and Variant.
Additionally, this repository supports seamless, bidirectional translation between Global Alliance for Genomics and Health (GA4GH) Variant Representation Specification (VRS) Alleles (v2.0) and the FHIR Allele Profile, enabling interoperability between the two standards.
This project uses the MolecularDefinition schema from the latest in-progress development version: Work in Progress Schema. This page may occasionally be unavailable due to active development.
It does not match the schema in the HL7 FHIR 6.0.0 Ballot 2 release: FHIR Ballot 2 Schema.
| Category | Currently Supported |
|---|---|
| Resource | Generation of HL7 FHIR MolecularDefinition resources |
| Profiles | Sequence, Allele, and Variant profiles |
| Translation | Bidirectional translation between VRS 2.0 and FHIR (full + minimal) |
| Notebooks | Interactive Jupyter notebooks with examples (see the Notebooks README for details) |
| Pipeline | Extraction of VRS Allele objects from ClinVar variation files and translation into the FHIR Allele Profile |
This package is not currently published on PyPI but will be available soon.
In the meantime, clone the repository and follow the instructions below to work with the code locally.
- Python 3.11–3.13
- Virtual environment (uv recommended): used to manage project dependencies
The following infrastructure is required only for the VRS ↔ FHIR translation functionality:
- PostgreSQL 14
- SeqRepo (
biocommons.seqrepo)
These dependencies are not required if you only plan to instantiate MolecularDefinition profiles.
For instructions on installing and configuring SeqRepo, see the VRS-Python SeqRepo installation guide.
Containerized setup instructions using Podman are planned, including configuration for running SeqRepo (and future UTA support).
Clone the repository and install the package for local development.
git clone https://github.com/InformaticsGenomicMedicine/FHIR-MolDef-python.git
cd FHIR-MolDef-python
uv venv
source .venv/bin/activate
uv pip install -e .[dev]Contributions are welcome! Please feel free to fork the repository and submit a pull request.
You can also report bugs or suggest improvements by opening an issue.
This project builds upon the following community standards and open-source implementations.
We gratefully acknowledge the communities and contributors who develop and maintain these standards and software projects.