.. _psmc_demo:

====================================
Demo: Running PSMC on Simulated Data
====================================

   *Running mini_psmc on simulated genomic data.*

.. figure:: /_static/figures/fig_demo_psmc.png
   :width: 100%
   :align: center

   **PSMC demo on msprime-simulated data.** Panel A: Input heterozygosity sequence from a diploid genome simulated under a bottleneck demographic model. Panel B: True N(t) piecewise demographic history with PSMC time discretization intervals shown as vertical lines. Panel C: Posterior decoding heatmap of HMM hidden states (coalescence time intervals) along the genome, using the true parameters. Panel D: True coalescence time vs MAP hidden state, illustrating how the HMM assigns genomic positions to time intervals.

This figure was generated by running the ``mini_psmc`` implementation
on data simulated with ``msprime``. The script is at
``figures/fig_demo_psmc.py``.
