Code for Variant Call Format (VCF) Explorer. It includes code for:
- Annotating VCF files using a Snakemake pipeline;
- Serving the annotated files via a rest API;
- Frontend display for the API.
The code is structured using a microservice architecture, with one container for data processing and API, and another one for the frontend.
Ensure your data folder contains data, in the following structure:
.
└── data
├── example.vcf.gz
├── sample1.vcf.gz
├── sample2.vcf.gz
├── sample3.vcf.gz
└── etc...
git clone https://github.com/matheusfvesco/vcf-explorer.gitUse the following command to build and run the image:
docker compose up -dSee usage section for more details
The web interface will be accessible at http://localhost:8501/. After running the container for the first time, the file will be processed. This will take some time. The web interface will update when the file is finishes the processing step.
After the file is processed, you may access the api at http://localhost:4000. Use http://localhost:4000/docs to further explore how to use the API.
git clone https://github.com/matheusfvesco/vcf-explorer.gitRun the following commands in your terminal:
uv sync --package apiuv sync --package frontendIf datrie build fails, try to use export AR=/usr/bin/ar and running the steps above again. For more information, see.
Use uv run --package <name> to run scripts. For example:
- To run API:
uv run --package api fastapi run serve.py --port 4000- To run frontend:
uv run --package frontend streamlit run frontend.py --server.fileWatcherType noneTo run tests, use pytest. Use the following command:
uv run --package api pytest