Skip to main content

virusdicer logo


VirusDicer is a command-line toolkit for building distance-based proteomic virus phylogenies from protein or nucleotide inputs.

Workflow

Show workflow chart
flowchart TD
    input[Input sequences or table] --> mode{Input type}
    mode -->|--in-fna| orfs[Predict ORFs with pyrodigal-gv]
    mode -->|--in-faa| faa[Prepare protein FASTA]
    mode -->|--in-dmnd-tab| dmnd[DIAMOND output table]
    orfs --> faa
    faa --> blast[DIAMOND makedb + blastp]
    blast --> dmnd
    dmnd --> filter[Filter DIAMOND hits]
    filter --> best[Best hit per query protein and target genome]
    best --> score[Symmetric genome bitscore matrix]
    score --> dice[Dice distance matrix]
    dice --> support{Support replicates?}
    support -->|yes| reps[Bootstrap or jackknife replicates]
    reps --> tree[BioNJ tree with midpoint rooting]
    support -->|no| tree
    tree --> final[Final Newick tree]

Dice distance:

$$ D_{AB} = 1 - \frac{2AB}{AA + BB} $$

where AB is the symmetric bitscore between genomes A and B, and AA and BB are their self bitscores.

Installation

External dependencies:

  • DIAMOND (tested with v2.1.24)
  • R (tested with v4.5.3)
  • R package ape (tested with v5.8.1)

If you have all the external dependencies:

python3 -m venv venv
source venv/bin/activate
pip install virusdicer

Conda:

conda env create --file https://raw.githubusercontent.com/dbespiatykh/VirusDicer/refs/heads/main/environment.yml
conda activate virusdicer
virusdicer -h

Usage

Usage: virusdicer [OPTIONS]

  `VirusDicer` builds a distance-based proteomic virus phylogeny.

  Examples:
    virusdicer --in-fna genomes/ -o virusdicer_out
    virusdicer --in-dmnd-tab hits.tsv -o virusdicer_out

  Provide either FAA/FNA inputs for a full end-to-end run, or a correctly
  formatted all-vs-all DIAMOND outfmt6 table with self hits and columns:
  qseqid sseqid pident length qlen slen evalue bitscore

Options:
  --in-faa TEXT                   Protein FAA inputs. Provide one or more files or directories. Provide one or more
                                  values after the option name.  [default: all_proteins.faa]
  --in-fna TEXT                   Nucleotide FASTA inputs used for ORF calling. Provide one or more files or
                                  directories. Provide one or more values after the option name.
  --in-dmnd-tab TEXT              Use an existing DIAMOND outfmt6 table instead of running DIAMOND.
  -o, --output-dir TEXT           Write pipeline outputs to this directory.  [default: virusdicer_out]
  -t, --threads INTEGER           Total worker budget for pyrodigal-gv ORF prediction, DIAMOND, and support
                                  replicate computation.  [default: 4]
  --diamond-sensitivity INTEGER   DIAMOND search sensitivity level.
                                  
                                  1 default
                                  2 fast
                                  3 mid-sensitive
                                  4 sensitive
                                  5 more-sensitive
                                  6 very-sensitive (default)
                                  7 ultra-sensitive
  --min-pident FLOAT              Minimum percent identity retained from DIAMOND hits.  [default: 30.0]
  --min-aalen FLOAT               Minimum alignment length in amino acids retained from DIAMOND hits.  [default:
                                  30.0]
  --max-evalue FLOAT              Maximum e-value retained from DIAMOND hits.  [default: 0.01]
  --min-bitscore FLOAT            Minimum bitscore retained from DIAMOND hits.  [default: 30.0]
  --min-qcov FLOAT                Minimum query coverage retained from DIAMOND hits. Accepts values like 50 or 0.5.
                                  [default: 0.5]
  --min-scov FLOAT                Minimum subject coverage retained from DIAMOND hits. Accepts values like 50 or
                                  0.5.  [default: 0.5]
  --min-protein-len INTEGER       Exclude hits where either protein is shorter than this.  [default: 50]
  --id-regex TEXT                 Regex with one capture group used to derive genome IDs from protein IDs.  [default:
                                  ^(.*)_\d+$]
  --write-score-matrix            Write the symmetric genome-vs-genome bitscore matrix.
  --support-mode [bootstrap|jackknife]
                                  Resampling strategy used when --support-replicates is greater than zero.  [default:
                                  bootstrap]
  --support-replicates INTEGER    Number of protein-level support replicates to compute for branch support.  [default:
                                  0]
  --jackknife-fraction FLOAT      Fraction of proteins to keep per genome in each jackknife replicate.  [default: 0.5]
  --support-seed INTEGER          Random seed for bootstrap or jackknife replicate generation.  [default: 1984]
  -v, --version                   Show the version and exit.
  -h, --help                      Show this message and exit.

From nucleotide FASTAs:

virusdicer --in-fna genomes/ -o virusdicer_out

From protein FASTAs:

virusdicer --in-faa faa/ -o virusdicer_out

From a DIAMOND output table:

diamond blastp \
  --query faa \
  --db db \
  --out diamond_output.tsv \
  --outfmt 6 qseqid sseqid pident length qlen slen evalue bitscore \
  --max-target-seqs 0 \
  --evalue 1000.0 \
  --more-sensitive


virusdicer --in-dmnd-tab diamond_output.tsv -o virusdicer_out

With bootstrap support:

virusdicer --in-fna genomes/ -o virusdicer_out \
  --support-replicates 1000 \
  --support-mode bootstrap

Main output

  • virusdicer_out/dice_distance.tsv - Distance matrix
  • virusdicer_out/genome_bitscore.tsv when --write-score-matrix is used - Score matrix
  • virusdicer_out/bionj.nwk - BioNJ phylogeny

Citation

Release files for virusdicer 0.1.1

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

Source distribution (sdist)

Source distribution for virusdicer 0.1.1
File Size Uploaded
virusdicer-0.1.1.tar.gz 25.9 kB Details

Built distribution (wheel)

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

Total release size: 52.7 kB

Release files / virusdicer-0.1.1.tar.gz

Download URL virusdicer-0.1.1.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
55adc88a078a7e6e130df066f61b729806a558fc15a46c1b90e835c03fc178c7
BLAKE2b-256 checksum
How to use checksums
b9c01da35213dca42aaa8865c138633b1f357cea996aed421b1ed70446d6f0b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 26, 2026.

Transparency log

Release files / virusdicer-0.1.1-py3-none-any.whl

Download URL virusdicer-0.1.1-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eee9d505e7efeaab1bb4c8d3127e37b345dac34070514335badb76cb3e904047
BLAKE2b-256 checksum
How to use checksums
15ab6d2a2f0002e6e1e04d161302a90ea4e3fef346147c0ed9b87df57c53e06b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

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