Skip to main content

viralconseq

Project Status: Active – The project has reached a stable, usable state and is being actively developed. CI PyPI Documentation License: MIT

viralconseq infers consensus genome sequences from viral high-throughput sequencing data. Give it a sample sheet, a reference genome and, for amplicon data, a primer scheme; it validates the inputs and runs a reference-guided Snakemake workflow for Illumina paired-end or Nanopore reads, against a single or a segmented reference. It runs on Linux and macOS and processes a whole sequencing run on a regular computer.

Full documentation: https://viralconseq.readthedocs.io/en/latest/

Features

  • Reference-guided consensus assembly for Illumina paired-end and Nanopore reads
  • Amplicon primer clipping from a BED scheme, with primer/reference consistency checks
  • Segmented viruses: a multi-record reference FASTA is split per segment and every segment is assembled in one run
  • Consensus QC with viralQC: virus and clade assignment plus a genome-quality grade (A–D) for every consensus sequence
  • Optional intra-host variant calling (LoFreq) for Illumina data
  • Input validation before the run starts: truncated FASTQs, protein FASTAs or mismatched primer schemes are rejected up front
  • Nanopore models resolved for you: the Clair3 model is read from the basecalling tag in the reads; barcodes without mapped reads get an all-N consensus instead of failing the run
  • One place to look: summary.tsv with a status per sample, a share-ready consensus/ directory and a self-contained interactive report.html
  • Reproducible: every run records tool versions, its configuration, input checksums and per-rule benchmarks, and can be replayed with viralconseq rerun

Installation

viralconseq needs Python 3.10 or 3.11, conda (or mamba/micromamba) and seqkit. The project's environment.yml provides all of them:

conda env create -n viralconseq -f https://raw.githubusercontent.com/InstitutoTodosPelaSaude/viralconseq/main/environment.yml
conda activate viralconseq
pip install viralconseq
viralconseq setup --pipelines all      # once: tool environments, viralQC databases, Clair3 models

See the installation page for installing from source (bash setup.sh), where the caches live and troubleshooting.

Quick start

viralconseq create-samplesheet --input <run-dir> --output samples.csv
viralconseq consensus illumina --sample-sheet samples.csv --reference ref.fasta \
    --primer-scheme primers.bed --run-name run1 --config-file run1.yml --output results/
viralconseq consensus nanopore --sample-sheet samples.csv --reference ref.fasta \
    --run-name run1 --config-file run1.yml --output results/
viralconseq rerun results/run1/config.yml --dry-run                # replay a run from its config
viralconseq create-report results/run1                             # rebuild report.html

Every subcommand has a --help. The tutorial walks through a complete run on example data, and the commands reference lists every option.

Contributing

See CONTRIBUTING.md for the development setup, the test suites and the release flow.

Citation

A scientific publication describing viralconseq is being prepared. Meanwhile, please cite this repository (see CITATION.cff). References for the upstream tools (fastp, MultiQC, minimap2, SAMtools/BCFtools, BEDtools, LoFreq, Clair3, GSAlign, gofasta, viralQC, Nextclade, BLAST+) are listed in the documentation.

License

MIT — see LICENSE.

Metadata

Release files for viralconseq 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viralconseq 0.3.2
File Size Uploaded Provenance
viralconseq-0.3.2.tar.gz 165.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for viralconseq 0.3.2
File Interpreter ABI Platform
viralconseq-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 362.6 kB

Release files / viralconseq-0.3.2.tar.gz

Download URL viralconseq-0.3.2.tar.gz
Size 165.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be61af9e36ae96d7f23aa473a7e5ab57b17db38b9886769f06223f25578f6de2
BLAKE2b-256 checksum
How to use checksums
b0d7c5b9a354522f4bdf7f351811ad9449d84c3870789341a5d4d6d506a80719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / viralconseq-0.3.2-py3-none-any.whl

Download URL viralconseq-0.3.2-py3-none-any.whl
Size 197.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c89eaeb083b74bf89bdd13af9d83c1a9b4a545b086d45fbcff701bfe65aea329
BLAKE2b-256 checksum
How to use checksums
3cbe80fb3612fdfd3e51acb812bda05c8ec4c3af61cb0677fc28d170845d7d66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for viralconseq 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for viralconseq-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page