.. _lshmm_demo:

=====================================================
Demo: Running the Li & Stephens HMM on Simulated Data
=====================================================

   *Running mini_lshmm on simulated genomic data.*

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

   **Li & Stephens HMM demo on msprime-simulated data.** Panel A: Forward probability matrix showing the posterior over reference haplotypes at each site. Panel B: Viterbi path identifying the most likely copying template. Panel C: Posterior decoding probabilities along the genome. Panel D: True vs inferred copying source comparison.

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