Installation

Requirements

Locator requires Python 3.10 or higher and TensorFlow 2.16+.

Installing with pip

Locator can also be installed with pip. Note that you must manage TensorFlow and CUDA installation separately when using pip.

pip install locator

For development:

pip install locator[dev,docs,ray,fast-vcf]

Optional pip extras:

  • locator[dev] — pytest, ruff, pre-commit

  • locator[docs] — sphinx and related packages

  • locator[ray] — Ray for multi-GPU parallel analysis

  • locator[fast-vcf] — bio2zarr + cyvcf2 for fast VCF-to-Zarr conversion

Fast VCF-to-Zarr Conversion

For large VCF files, we recommend converting to zarr format for fast loading. With pixi, bio2zarr is included in the default environment. With pip, install via pip install locator[fast-vcf].

bcftools index -t genotypes.vcf.gz
vcf2zarr convert -p 8 genotypes.vcf.gz genotypes.zarr

Locator supports zarr files from both bio2zarr and scikit-allel. See CLI Guide for usage with windowed analysis.

Installing from Source

git clone https://github.com/kr-colab/ReLocator.git
cd ReLocator

# With pixi (recommended)
pixi install

# Or with pip
pip install -e ".[dev]"

Verifying Installation

# With pixi
pixi run python -c "from locator import Locator; print('OK')"

# Or directly
python -c "from locator import Locator; print('OK')"

Next Steps