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.0.tar.gz (300.5 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.0-py3-none-any.whl (306.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: varseek-0.2.0.tar.gz
  • Upload date:
  • Size: 300.5 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.0.tar.gz
Algorithm Hash digest
SHA256 28b017336c229223323fb629b047bbc98500910a324c3d92859265d164fdae03
MD5 df0fd80b1caac2f4a5879f751eec7df7
BLAKE2b-256 6ce3d3a1630464632dbc5b026694195d3a46e8634d25504c33bc6bcef28dbf8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: varseek-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 306.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ba7a0304c767dcbedf178ca6e406b54406e604b4fb463ca3e7c884f3190000a
MD5 5c41aafcdad46b52ea40a57181c4fe1e
BLAKE2b-256 86f77f46ee11973fd7bd4f4b18a6f1246f0260260073f3ae7e42cca3e53e4a11

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