Set up the RareLink Framework
Getting Started
Follow these steps to set up the project locally and run tests.
Clone the repository:
git clone https://github.com/BIH-CEI/rarelink.git
cd rarelink
Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate # On macOS/Linux
.venv\Scripts\activate # On Windows
Install RareLink:
pip install rarelink
This installs everything needed for REDCap interaction, Phenopacket export, and the RareLink CLI.
For optional features, install the relevant extras:
pip install rarelink[fhir] # adds Docker SDK for the toFHIR pipeline
pip install rarelink[data] # adds numpy and pandas for tabular data processing
For development (includes testing, docs, and all optional extras):
pip install -e .[dev]
4. Configure all api keys necessary to use rarelink by running the following command:
rarelink setup keys
This command will prompt you to enter the following keys:
- BioPortal API key
- REDCap API key
- REDCap URL
- REDCap project ID
Note
You can create your free BioPortal account here: BioPortal
Run tests:
pip install rarelink[test]
pytest
RareLink Framework CLI config
Use the following commands to update the framework and its components, view its status or reset the framework. See RareLink CLI for more information.
rarelink framework --help
rarelink framework update
rarelink framework status
rarelink framework reset
Import Mapper Configuration
Via the RareLink CLI type:
to be implemented
This command guides you through setting up the Import Mapper pipeline for RareLink. You will be prompted to enter: - Your location of your local (tabular) database. - Your REDCap project URL and API token. - Your location where to store the Import Mapper configurations.
Phenopacket Pipeline Configuration
The Phenopacket export pipeline requires a BioPortal API key and a
CREATED_BY value, both configured via:
rarelink setup keys
Once configured, export Phenopackets with:
rarelink phenopackets export --help
FHIR Pipeline Configuration
Note
The FHIR pipeline requires the fhir extra: pip install rarelink[fhir]
rarelink fhir setup
This command guides you through setting up the FHIR pipeline for RareLink. You will be prompted to enter:
Your FHIR server URL.
If required, your FHIR server username & password.
Note
All sensitive information will also be stored in the hidden configuration file.