Skip to main content

DiscoVista-Next

Phylogenetic discordance visualization and analysis — a complete Python 3 rewrite

License: GPL v3 PyPI Python 3.8+ Platform

English | 简体中文

Overview

DiscoVista-Next is a complete Python 3 rewrite of the original DiscoVista (Discordance Visualization Tool), written by Erfan Sayyari and Siavash Mirarab on a mixed Python 2 + R stack. This version reimplements every R dependency (ggplot2, reshape2, plyr, ape, optparse, …) in Python 3 and adds a graphical interface built on qt-material.

Key Features

  • Pure Python 3 — no R installation or R packages required
  • Six analysis modes — species tree discordance, gene tree discordance, GC content, occupancy, branch statistics, relative frequency
  • Complete visualization — matplotlib + seaborn replace ggplot2
  • Graphical interface — modern qt-material GUI with 26 built-in color themes
  • Bilingual UI — switch between English and Chinese at runtime
  • Command-line tool — CLI compatible with the original DiscoVista argument format
  • Standalone executable — build a self-contained exe that runs without a Python install
  • Example data — 1KP plant dataset parameter files and a fetch script ship with the repo

Quick Start

Installation

From PyPI (recommended for users):

pip install discovista-next

From source (recommended for development):

# Clone the repository
git clone https://github.com/ZengZichao/DiscoVista-Next.git
cd DiscoVista-Next

# Install dependencies
pip install -r requirements.txt

# Install the package (development mode)
pip install -e .

Command line

# Species tree discordance
discoVista -m 0 -c examples/1KP/parameters/clade-defs.txt \
    -p examples/1KP/species/ -t 95 -o results/

# Gene tree discordance
discoVista -m 1 -c examples/1KP/parameters/clade-defs.txt \
    -p examples/1KP/genetrees/filtered/ -t 95 -o results/

# GC content
discoVista -m 2 -p examples/1KP/GC/unfiltered/ -o results/

# Occupancy
discoVista -m 3 -p examples/1KP/occupancy/filtered/ \
    -a examples/1KP/parameters/annotation.txt -o results/

# Branch support vs branch length
discoVista -m 4 -p examples/1KP/branchAnalysis/ \
    -r examples/1KP/parameters/rooting.txt \
    -a examples/1KP/parameters/annotation.txt -o results/

# Relative frequency
discoVista -m 5 -p examples/1KP/relativeFreq/astral.trim50genes33taxa.no3rd.final-FNA2AA/ \
    -a examples/1KP/parameters/annotation.txt -o results/

Launch the GUI

discoVista-gui
# or
python -m discovista_next.gui.main

Use the standalone executable

Run DiscoVista-Next.exe directly — no Python installation needed.

  1. Double-click DiscoVista-Next.exe
  2. Click Load Example Data to fill in all input paths
  3. Choose an analysis mode and adjust the parameters
  4. Click Run Analysis
  5. The generated figures appear in the Plots panel on the right

Build the executable

python build_exe.py
# or
pyinstaller DiscoVista-Next.spec

The build output goes to dist/DiscoVista-Next/.

Feature Coverage

DiscoVista-Next covers the full feature set of the original DiscoVista:

Feature Original DiscoVista-Next
Species tree discordance ✅ ✅ (mode 0)
Gene tree discordance ✅ ✅ (mode 1)
GC content analysis ✅ ✅ (mode 2)
Occupancy analysis ✅ ✅ (mode 3)
Branch support vs branch length ✅ ✅ (mode 4)
Relative frequency analysis ✅ ✅ (mode 5)
Clade definition file ✅ ✅
Annotation file ✅ ✅
Rooting file ✅ ✅
Model condition reordering ✅ ✅
Clade reordering ✅ ✅
Missing data handling ✅ ✅
Graphical interface ❌ ✅ (26 themes)
English/Chinese switching ❌ ✅
Standalone exe ❌ ✅
Example data ✅ (manual download) ✅ (in repository)

Project Structure

DiscoVista-Next/
├── discovista_next/           # Main package
│   ├── __init__.py            # Package init, analysis mode constants
│   ├── cli/                   # Command-line interface
│   │   └── main.py
│   ├── core/                  # Core analysis logic
│   │   ├── analyzer.py        # Analysis controller
│   │   ├── config.py          # Configuration and option handling
│   │   ├── find_clades.py     # Clade monophyly detection
│   │   ├── gc_stats.py        # GC content statistics
│   │   ├── occupancy.py       # Occupancy analysis
│   │   ├── relative_freq.py   # Relative frequency analysis
│   │   └── tree_tools.py      # Tree manipulation utilities
│   ├── gui/                   # Graphical interface
│   │   ├── main.py            # Main window
│   │   ├── i18n.py            # Internationalization
│   │   └── runtime_hook.py    # PyInstaller runtime hook
│   ├── resources/             # Icons and other resources
│   └── viz/                   # Visualization modules
│       ├── depict_clades.py   # Clade visualization
│       ├── gc_plot.py         # GC content plots
│       ├── occupancy_plot.py  # Occupancy plots
│       ├── branch_stat_plot.py # Branch statistics plots
│       ├── tree_plot.py       # Phylogenetic tree plots
│       └── relative_freq_plot.py # Relative frequency plots
├── docs/                      # Documentation
│   ├── en/                    # English docs
│   └── zh/                    # Chinese docs
├── examples/1KP/              # Example data (parameter files + fetch instructions)
├── .github/workflows/         # CI: publish to PyPI on release
├── build_exe.py               # PyInstaller build script
├── DiscoVista-Next.spec       # PyInstaller spec file
├── pyproject.toml             # Package metadata and build configuration
├── CITATION.cff               # Citation metadata (GitHub / Zenodo)
├── requirements.txt           # Python dependencies
├── setup.py                   # Legacy shim (metadata lives in pyproject.toml)
├── LICENSE                    # GPL-3.0 license
├── README.md                  # This file (English)
└── README.zh-CN.md            # Chinese README

Built-in Themes

DiscoVista-Next ships all 26 qt-material color themes:

  • Dark (9): Amber, Blue, Cyan, Lightgreen, Pink, Purple, Red, Teal, Yellow
  • Light (17): Amber, Blue, Blue 500, Cyan, Cyan 500, Lightgreen, Lightgreen 500, Orange, Pink, Pink 500, Purple, Purple 500, Red, Red 500, Teal, Teal 500, Yellow

Example Data

The examples/1KP/ directory in this repository contains the parameter files of the 1KP plant dataset:

  • parameters/annotation.txt — species-to-clade annotation
  • parameters/clade-defs.txt — clade (split) definitions
  • parameters/rooting.txt — outgroup and rooting definitions
  • parameters/newModel.txt, parameters/newOrders.txt — model condition and ordering

The large data files — gene trees, sequence alignments, GC content, occupancy and so on (about 400 MB unpacked) — are not bundled. Fetch them from the original DiscoVista repository:

python examples/fetch_data.py

Once the data is in place, click Load Example Data in the GUI to fill in all paths automatically. See examples/README.md for details.

Documentation

Document Description
Installation Guide Detailed installation steps
User Guide Complete usage tutorial
Developer Guide Architecture and development
API Reference Complete API documentation
FAQ Frequently asked questions
安装指南 (中文) Detailed installation steps (Chinese)
使用手册 (中文) Complete usage tutorial (Chinese)
开发者文档 (中文) Architecture and development (Chinese)
API 参考 (中文) Complete API documentation (Chinese)
FAQ (中文) Frequently asked questions (Chinese)

Development

Set up an environment

git clone https://github.com/ZengZichao/DiscoVista-Next.git
cd DiscoVista-Next
pip install -r requirements.txt
pip install -e .

Build the executable

python build_exe.py

Known Issues and Local Patches

Two fixes in this release are marked LOCAL PATCH 20261024-1 in the source. Both are required — without them the tool does not run correctly.

Location Problem Fix
discovista_next/viz/depict_clades.py The monophyly status of the support-filtered tree was read from the wrong column — iloc[:, 3] holds the clade name, not MONO. Every classification then collapsed to Missing and the proportion plot crashed. Read iloc[:, 2], the MONO column.
requirements.txt, setup.py DendroPy 5.x dropped preserve_underscores from the public signature of Tree.get() / TreeList.get(), which the tree-reading code passes in six places. It survives only as an undocumented **kwargs passthrough — 5.0.x happens to tolerate it, but it is outside the supported API. Pin dendropy==4.5.2, the version the pipeline is validated against.

The analysis result files use the column order ID DS MONO BOOT CLADE BRANCHLEN (written by discovista_next/core/analyzer.py); the column indices above refer to that layout.

Acknowledgements

Thanks to Zhiyong Yang (杨智勇), who reported the column-index bug in discovista_next/viz/depict_clades.py: every clade classification degraded to Missing and the proportion plot broke. That report led to the fix recorded under LOCAL PATCH 20261024-1 — see issue #1 for the diagnosis and before/after numbers.

Citation

If you use DiscoVista-Next in your research, please cite the original paper:

Sayyari, E., Whitfield, J. B., & Mirarab, S. (2018). DiscoVista: Interpretable Visualizations of Gene Tree Discordance. Molecular Phylogenetics and Evolution, 122, 110-115.

License

GPL-3.0

Metadata

Release files for discovista-next 0.1.0

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

Source distribution (sdist)

Source distribution for discovista-next 0.1.0
File Size Uploaded Provenance Actions
discovista_next-0.1.0.tar.gz 149.9 kB With provenance Details for discovista_next-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for discovista-next 0.1.0
File Interpreter ABI Platform Actions
discovista_next-0.1.0-py3-none-any.whl Python 3 none any Details for discovista_next-0.1.0-py3-none-any.whl

Total release size: 272.8 kB

Release files / discovista_next-0.1.0.tar.gz

Download URL discovista_next-0.1.0.tar.gz
Size 149.9 kB
Tags Source
SHA-256 checksum
How to use checksums
998dee501146b954c9b0afe00ab9de8e2cb7d3002fe490a57516c438ee8355f7
BLAKE2b-256 checksum
How to use checksums
f1134b91674644663d8aeeeda28acae2a3b96b1db668e8d1f52310a71c3e6d05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / discovista_next-0.1.0-py3-none-any.whl

Download URL discovista_next-0.1.0-py3-none-any.whl
Size 122.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b62828f225ccd79f131ab81faccf59e520853ac17e7f769e19cb0b4510e3321
BLAKE2b-256 checksum
How to use checksums
add44f393bbada4c9fd491f70e1e78a97c3025b4289ce00c90fd3718f6824c7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Security for discovista-next 0.1.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for discovista_next-0.1.0.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 25, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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