Population-based sequencing of Mycobacterium tuberculosis reveals how current population dynamics are shaped by past epidemics