Skip to content

Repository files navigation

Fast-growing intracellular Mycobacterium tuberculosis populations evade antibiotic treatment

macrohet is a code repository designed to investigate Macrophage heterogeneity. It accompanies the aforementioned manuscript exploring single-cell heterogeneity in Mtb-infected macrophages using time-lapse microscopy, tracking, and single-cell growth rate analysis.

Interactive figures and plots for this project can be explored via GitHub Pages: nthndy.github.io/macrohet

macrohet image

Image description: A pseudocoloured timelapse image of Mtb, projected along the time axis visualise spatiotemporal evolution.

Contents

  • notebooks/: Reproducible analysis notebooks for data loading, segmentation, tracking, and quantification
  • macrohet/: Python module with core analysis functions
  • data/: Subset of image data with associated segmentation and tracks
  • models/: Bespoke segmentation model and btrack tracking parameters
  • docs/: HTML manuscript and supporting content (hosted via GitHub Pages)
  • environment.yml: Conda environment specification
  • .pre-commit-config.yaml: Code formatting and linting hooks

Installation and Reproducibility

The following instructions are configured for an Ubuntu workstation.

Clone the repository:

git clone https://github.com/nthndy/macrohet.git
cd macrohet

Create, install and activate the environment:

mamba env create -f environment.yml
mamba activate macrohet

Parts of the image tiling and stitching pipeline were adapted from Volker Hilsenstein’s DaskFusion project, used under the MIT License. Details of the hardware and software used to generate the analyses in this repository are provided in reproducibility.md.


Example data

To let the pipeline run end to end without the full dataset, the repository ships a small example acquisition under data/:

  • data/untiled_images/ — a down-scaled 3×3-tile Opera Phenix field of view (well r03c05), comprising the individual acquisition fields and the Index.idx.xml metadata. This is the only example image input tracked in the repository.

Everything downstream is derived from this and is generated locally rather than committed, to keep the repository lean:

  1. notebooks/tile_image.ipynb parses the Harmony metadata with dataio.read_harmony_metadata and stitches the fields into a contiguous mosaic with tile.compile_mosaic.
  2. The save step writes the stitched mosaic to data/example_data.zarr (OME-Zarr, recommended) or data/example_data.ome.tiff (OME-TIFF).

These outputs are git-ignored; generate them by running tile_image.ipynb once after cloning. The full processed single-cell dataset and the raw imaging data are held externally, see the Data Availability statement for the repository DOI.


Contact

For questions or access to underlying data/code, please contact:

Nathan J. Day
Host–Pathogen Interactions in Tuberculosis Laboratory
The Francis Crick Institute
nthndy@gmail.com
@nthndy.bsky.social
github.com/nthndy

About

Python framework for high-throughput analysis of intracellular M. tuberculosis growth heterogeneity from multidimensional microscopy data (manuscript in submission).

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages