  Motivation: Epigenetic heterogeneity within a tumour can play an important
role in tumour evolution and the emergence of resistance to treatment. It is
increasingly recognised that the study of DNA methylation (DNAm) patterns along
the genome -- so-called `epialleles' -- offers greater insight into epigenetic
dynamics than conventional analyses which examine DNAm marks individually.
  Results: We have developed a Bayesian model to infer which epialleles are
present in multiple regions of the same tumour. We apply our method to reduced
representation bisulfite sequencing (RRBS) data from multiple regions of one
lung cancer tumour and a matched normal sample. The model borrows information
from all tumour regions to leverage greater statistical power. The total number
of epialleles, the epiallele DNAm patterns, and a noise hyperparameter are all
automatically inferred from the data. Uncertainty as to which epiallele an
observed sequencing read originated from is explicitly incorporated by
marginalising over the appropriate posterior densities. The degree to which
tumour samples are contaminated with normal tissue can be estimated and
corrected for. By tracing the distribution of epialleles throughout the tumour
we can infer the phylogenetic history of the tumour, identify epialleles that
differ between normal and cancer tissue, and define a measure of global
epigenetic disorder.
