Fast, memory-efficient extraction of variable sites from FASTA alignments.
Paula Ruiz-Rodriguez and Mireia Coscolla, Institute for Integrative Systems Biology, I2SysBio, University of Valencia-CSIC, Valencia, Spain
SNPick pulls the variable (SNP) sites out of a whole-genome FASTA alignment and writes a reduced alignment ready for phylogenetics: ascertainment-bias correction (ASC fconst) for IQ-TREE and RAxML, plus an optional VCF. A zero-copy, memory-mapped scan handles thousands of genomes in seconds on a laptop, where snp-sites runs out of memory (250 sequences in 1.7 s; at 1000 it is killed).
# Install from Bioconda
conda install -c bioconda snpick
# Extract the variable sites
snpick -f alignment.fasta -o snps.fasta
# ...with a VCF, on 8 threads
snpick -f alignment.fasta.gz -o snps.fasta --vcf -t 8That is the core of it. The flags for per-site filtering, region masking, VCF coordinates, alternative output formats (PHYLIP / NEXUS) and QC all live in the documentation, and snpick --help prints the authoritative list.
Everything is at pathogenomics-lab.github.io/snpick:
- Installation: Bioconda, pre-built binaries, from source, Docker / Apptainer
- Usage: the complete flag reference and common recipes
- Tutorial: a hands-on walkthrough
- Output formats: FASTA, PHYLIP, NEXUS and the VCF layout
- Benchmarks: how it scales against snp-sites
- Architecture: the two-pass memory-mapped scan
snpick is also a Rust library crate, with Python (bindings/python) and WebAssembly (bindings/wasm) bindings.
If SNPick helps your research, please cite it:
@software{snpick,
author = {Ruiz-Rodriguez, Paula and Coscolla, Mireia},
title = {SNPick: Fast extraction of variable sites from FASTA alignments},
url = {https://github.com/PathoGenOmics-Lab/snpick},
doi = {10.5281/zenodo.14191809},
license = {GPL-3.0}
}|
Paula Ruiz-Rodriguez 💻 🔬 🤔 🔣 🎨 🔧 |
Mireia Coscolla 🔍 🤔 🧑🏫 🔬 📓 |
This project follows the all-contributors specification (emoji key).