The Bio-Engine is an asynchronous backend service designed to handle heavy bioinformatics computational tasks for PS Analyzer. It acts as an integration layer between the main web application and native bioinformatics tools like tracy, executing alignments, variant calling, and sequence annotations (HGVS, VEP).
- Asynchronous Job Management: Jobs are executed in isolated background threads.
- Tracy Wrapper: Advanced DNA sequence decomposition, basecalling, and alignment using the tracy C++ framework.
- Variant Recoder & VEP: Genomic consequence prediction via the Ensembl REST API with built-in batch handling and fallback strategies.
- HGVS Notation: Accurate nomenclature mapping powered by Universal Transcript Archive (UTA).
- Python >= 3.10
- Tracy CLI API: Must be installed and available in the system
PATH. samtoolsandbgzip: Needed for auto-indexing very large reference files (>50Kbp).
You can install the dependencies via pip:
pip install -r requirements.txt(Alternatively, use pip install . to install via pyproject.toml)
Start the FastAPI server via Uvicorn:
uvicorn main:app --host 127.0.0.1 --port 8000Or simply:
python main.pyOnce the server is running, the Swagger UI is available at http://127.0.0.1:8000/docs, where you can explore and interact with the endpoints.
This codebase follows PEP8 guidelines enforced by ruff. To check style errors, run:
ruff check .And to automatically format your changes:
ruff format .