This repository contains a juypter-notebook, attendant code and data allowing all analysis and (nearly all) figures in the below preprint to be reproduced:
Brunner VM, Fowler PW (2025) Subpopulations in clinical samples of M. tuberculosis can give rise to rifampicin resistance and shed light on how resistance is acquired. bioRxiv preprint doi:10.1101/2025.04.09.647945
This reference will be updated when the manuscript is published in a peer-reviewed journal.
The easiest way is to click the blue Open in Colab button at the top left of this README when viewed on github.com. This will open the notebook in your browser window and by clicking the "play" buttons in the grey code windows you can step through the code, including drawing the graphs etc.
You need have installed a number of standard Python packages -- many of these are common (e.g. numpy) so you may already have a version installed. To install these locally using pip issue
git clone git@github.com:fowler-lab/tuberculosis-RNAP-subpopulations.git
cd tuberculosis-RNAP-subpopulations/
pip install -r requirements.txt
Then you will need to open the notebook using your IDE of choice. For example, to open in VS Code
code -n notebook.ipynb
And you can step through the different code cells as above using the "play" buttons.
Running the entire notebook should take no more than a few minutes.
As mentioned in the manuscript, the data tables for the samples included in this repository are extracts from v3.0.0 of the CRyPTIC Consortium Dataset whilst the list of compensatory mutations was taken from this publication
Brunner VM, Fowler PW (2024) Compensatory mutations are associated with increased in vitro growth in resistant clinical samples of Mycobacterium tuberculosis. mGen 10:001187 doi:10.1099/mgen.0.001187
That publication list also has an attendant GitHub repository which contains the list.