Skip to content

matheusfvesco/vcf-explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Variant Call Explorer

uv Ruff

Description of GIF

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.

Installation

Docker (Recommended)

0. Data folder

Ensure your data folder contains data, in the following structure:

.
└── data
    ├── example.vcf.gz
    ├── sample1.vcf.gz
    ├── sample2.vcf.gz
    ├── sample3.vcf.gz
    └── etc...

1. Clone the repository

git clone https://github.com/matheusfvesco/vcf-explorer.git

2. Build and run the image

Use the following command to build and run the image:

docker compose up -d

See usage section for more details

Usage

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.

Development

Local install for development

1. Clone the repository

git clone https://github.com/matheusfvesco/vcf-explorer.git

2. Install dependencies

Run the following commands in your terminal:

uv sync --package api
uv sync --package frontend

If datrie build fails, try to use export AR=/usr/bin/ar and running the steps above again. For more information, see.

3. Run files

Use uv run --package <name> to run scripts. For example:

  1. To run API:
uv run --package api fastapi run serve.py --port 4000
  1. To run frontend:
uv run --package frontend streamlit run frontend.py --server.fileWatcherType none

Tests

To run tests, use pytest. Use the following command:

uv run --package api pytest

About

Code for annotating and exploring VCF files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published