Skip to main content

varseek

pypi version Downloads license status Code Coverage

alt text

varseek is a free, open-source command-line tool and Python package that enables variant calling and genotyping of DNA-seq, bulk RNA-seq, and single-cell RNA-seq data using k-mer-based alignment against a reference of variant sequences.

alt text

Why is k-mer-based alignment advantageous?

  • It's way faster than traditional alignment-based variant calling methods, especially for large datasets - varseek runs in minutes, while traditional methods can take hours or days.
  • It's more sensitive than traditional alignment-based methods, especially for low-frequency variants and variants in repetitive regions.
  • It can be used for both DNA-seq and RNA-seq data, including single-cell RNA-seq data.
  • It allows for fast and easy screening against established variant databases (e.g., COSMIC, ClinVar, dbSNP) or custom variant sets.

Installation

PyPI installation is sufficient for the basic pipeline (screening against a variant database).

PyPI:

pip install varseek

For additional use cases involving FASTQ preprocessing or the de novo variant calling workflow, we recommend using a conda environment.

GitHub:

pip install git+https://github.com/pachterlab/varseek.git
cd varseek
conda env create -f environment.yml  # includes pip install .

🪄 Quick start guide

1. Acquire a Reference

Follow one of the below options:

a. Download a pre-built variant reference

  • (optional) View all downloadable references: vk ref --list_downloadable_references
  • vk ref --download --variants VARIANTS --sequences SEQUENCES # downloads INDEX, T2G

b. Make custom variant reference from a VARIANTS database

  • vk ref --variants VARIANTS --sequences SEQUENCES ... # creates INDEX, T2G

c. Make custom variant reference for de novo variant calling

  • vk denovo --sequences SEQUENCES ... FASTQ1 FASTQ2 ... # creates VARIANTS
  • vk ref --variants VARIANTS --sequences SEQUENCES ... # creates INDEX, T2G

2. Screen for variants

  • vk count --index INDEX --t2g T2G ... --fastqs FASTQ1 FASTQ2 ...

Workflow Overview

The two commands used in a standard workflow are varseek ref and varseek count. varseek ref takes as input (1) a database of variants (e.g., COSMIC, ClinVar, dbSNP, custom) and (2) the reference genome/transcriptome upon which the variants are annotated. varseek ref outputs a variant-containing reference sequence (VCRS) index that serves as the basis for variant calling in varseek count. varseek count takes as input (1) the VCRS index generated by varseek ref and (2) sequencing read data in FASTQ format. varseek count outputs a variant count matrix in Anndata format with samples/cells (rows) x variants (columns).

varseek utilizes the pseudoalignment algorithm implement by the kb-python package. varseek ref creates the VCRS index by taking short sequences flanking each variant, in which each k-mer of the VCRS contains the variant nucleotide(s). varseek ref wraps kb ref to create the VCRS index. varseek count uses the VCRS index to pseudoalign sequencing reads and count the number of reads that map to each variant. The variant count matrix can be used for downstream analysis, such as clustering, differential expression, and pathway analysis. varseek count wraps varseek fastqpp, kb count, varseek clean, and varseek summarize to generate the variant count matrix.

alt text

The functions of varseek are described in the table below.

Description Bash Python (with import varseek as vk)
Build a variant-containing reference sequence (VCRS) index vk ref ... vk.ref(...)
Preprocess the FASTQ files before pseudoalignment vk fastqpp ... vk.fastqpp(...)
Process the variant count matrix vk clean ... vk.clean(...)
Analyze the variant count matrix results vk summarize ... vk.summarize(...)
Wrap vk fastqpp, kb count, vk clean, and vk summarize vk count ... vk.count(...)

Additional examples and citation

Examples for getting started: GitHub - pachterlab/varseek-examples

Repository for manuscript figures: GitHub - pachterlab/RLSRP_2025

If you use varseek in a publication, please cite the following study:

Rich JM, Luebbert L, Sullivan DK, Rosa R, Pachter L. Reference-based variant detection with varseek. bioRxiv. 2025 September 3. Available from: https://doi.org/10.1101/2025.09.03.674039

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

varseek-0.2.1.tar.gz (300.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

varseek-0.2.1-py3-none-any.whl (306.5 kB view details)

Uploaded Python 3

File details

Details for the file varseek-0.2.1.tar.gz.

File metadata

  • Download URL: varseek-0.2.1.tar.gz
  • Upload date:
  • Size: 300.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for varseek-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a3bfd8935c5b932f2047f883bf266a34ed50e68d862019540e6efa4c2c52e153
MD5 81156aede27d6d3aea4bc9d9e95908ea
BLAKE2b-256 6df7932ef23160cbf110276dc168b946ae5c76220ec6f0c8c4dda5d18f06703d

See more details on using hashes here.

File details

Details for the file varseek-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: varseek-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 306.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for varseek-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f5e7333b702c798047ecd04f68672e34f10508b2e31727097445845ed5bb63
MD5 4b2f23ee0b4d8e00b06531ead0305f6f
BLAKE2b-256 11d5c7a13f0e7c4b0efd7de35f383b2208720d2950dd60ca5e75074984c1ea89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page