ARGscape Documentation#

Interactive visualization and analysis of ancestral recombination graphs

ARGscape provides powerful tools for visualizing ancestral recombination graphs (ARGs) encoded as tskit tree sequences. Whether you’re exploring the evolutionary history of samples, analyzing spatial patterns, or running inference methods, ARGscape has you covered.

Quick Links

What is ARGscape?#

ARGscape is a toolkit for visualizing and analyzing tree sequences. It offers:

  • 2D Graph Visualization - Interactive visualization of ARG topology

  • 3D Spatial Visualization - Geographic placement of nodes with temporal depth

  • Spatial Inference - Run GAIA, SPARG, Midpoint, and other inference methods

  • Temporal Inference - Date internal nodes with tsdate

  • Export Capabilities - Generate publication-ready figures in PNG, SVG, or PDF

Two Ways to Use ARGscape#

Python API & CLI#

Install ARGscape as a Python package and use it directly from your scripts, notebooks, or terminal:

pip install argscape
import argscape
import tskit

# Load your tree sequence
ts = tskit.load("sample.trees")

# Create and display a visualization
viz = argscape.visualize(ts, theme="tskit", max_samples=100)
viz.show()  # Opens in browser

Or from the command line:

argscape viz sample.trees -o figure.png --theme tskit

For 3D visualizations and inference tools, you’ll need to install the argscape[spatial] module - see Installation.

Web Application#

The web app offers an interactive interface and extended visualization capabilities. You’ll need the argscape[spatial] module installed. You can then run:

argscape serve  # Opens browser at http://localhost:8000

Documentation Overview#

Getting Started

Installation, quickstart guide, and choosing between web and Python interfaces.

Installation
Tutorials

Step-by-step guides for visualization, filtering, theming, and exporting.

First Visualization
Python API

Complete documentation of visualize(), VizResult, infer(), and InferResult.

Python API Overview
CLI Reference

Reference for all command-line tools: argscape viz, argscape serve, argscape infer, and more.

argscape
Advanced Topics

Shapefiles & CRS, inference algorithms, performance optimization, and benchmarking.

Custom Shapefiles and Coordinate Reference Systems

Citation#

If you use ARGscape in your research, please cite:

Talbot, C., & Bradburd, G. (2025). ARGscape: A modular, interactive tool for manipulation of spatiotemporal ancestral recombination graphs. arXiv preprint arXiv:2510.07255.

@article{talbot2025argscape,
  title={ARGscape: A modular, interactive tool for manipulation of spatiotemporal ancestral recombination graphs},
  author={Talbot, Christopher and Bradburd, Gideon},
  journal={arXiv preprint arXiv:2510.07255},
  year={2025}
}