Counting cancer cells with computer vision for time-lapse microscopy

Competing cellsSome people characterize TheEGG as a computer science blog. And although (theoretical) computer science almost always informs my thought, I feel like it has been a while since I have directly dealt with the programming aspects of computer science here. Today, I want to remedy that. In the process, I will share some Python code and discuss some new empirical data collected by Jeff Peacock and Andriy Marusyk.[1]

Together with David Basanta and Jacob Scott, the five of us are looking at the in vitro dynamics of resistance to Alectinib in non-small cell lung cancer. Alectinib is a new ALK-inhibitor developed by the Chugai Pharmaceutical Co. that was approved for clinical use in Japan in 2014, and in the USA at the end of 2015. Currently, it is intended for tough lung cancer cases that have failed to respond to crizotinib. Although we are primarily interested in how alectinib resistance develops and unfolds, we realize the importance of the tumour’s microenvironment, so one of our first goals — and the focus here — is to see how the Alectinib sensitive cancer cells interact with healthy fibroblasts. Since I’ve been wanting to learn basic computer vision skills and refresh my long lapsed Python knowledge, I decided to hack together some cell counting algorithms to analyze our microscopy data.[2]

In this post, I want to discuss some of our preliminary work although due to length constraints there won’t be any results of interest to clinical oncologist in this entry. Instead, I will introduce automated microscopy to computer science readers, so that they know another domain where their programming skills can come in useful; and discuss some basic computer vision so that non-computational biologists know how (some of) their cell counters (might) work on the inside. Thus, the post will be methods heavy and part tutorial, part background, with a tiny sprinkle of experimental images.[3] I am also eager for some feedback and tips from readers that are more familiar than I am with these methods. So, dear reader, leave your insights in the comments.

Read more of this post


Cancer metabolism and voluntary public goods games

When I first came to Tampa to do my Masters[1], my focus turned to explanations of the Warburg effect — especially a recent paper by Archetti (2014) — and the acid-mediated tumor invasion hypothesis (Gatenby, 1995; Basanta et al., 2008). In the course of our discussions about Archetti (2013,2014), Artem proposed the idea of combining two public goods, such as acid and growth factors. In an earlier post, Artem described the model that came out of these discussions. This model uses two “anti-correlated” public goods in tumors: oxygen (from vasculature) and acid (from glycolytic metabolism).

The dynamics of our model has some interesting properties such as an internal equilibrium and (as we showed later) cycles. When I saw these cycles I started to think about “games” with similar dynamics to see if they held any insights. One such model was Hauert et al.’s (2002) voluntary public goods game.[2] As I looked closer at our model and their model I realized that the properties and logic of these two models are much more similar than we initially thought. In this post, I will briefly explain Hauert et al.’s (2002) model and then discuss its potential application to cancer, and to our model.
Read more of this post

Choosing units of size for populations of cells

Recently, I have been interacting more and more closely with experiment. This has put me in the fortunate position of balancing the design and analysis of both theoretical and experimental models. It is tempting to think of theorists as people that come up with ideas to explain an existing body of facts, and of mathematical modelers as people that try to explain (or represent) an existing experiment. But in healthy collaboration, theory and experiment should walk hand it hand. If experiments pose our problems and our mathematical models are our tools then my insistence on pairing tools and problems (instead of ‘picking the best tool for the problem’) means that we should be willing to deform both for better communication in the pair.

Evolutionary game theory — and many other mechanistic models in mathematical oncology and elsewhere — typically tracks population dynamics, and thus sets population size (or proportions within a population) as central variables. Most models think of the units of population as individual organisms; in this post, I’ll stick to the petri dish and focus on cells as the individual organisms. We then try to figure out properties of these individual cells and their interactions based on prior experiments or our biological intuitions. Experimentalists also often reason in terms of individual cells, making them seem like a natural communication tool. Unfortunately, experiments and measurements themselves are usually not about cells. They are either of properties that are only meaningful at the population level — like fitness — or indirect proxies for counts of individual cells — like PSA or intensity of fluorescence. This often makes counts of individual cells into an inferred theoretical quantity and not a direct observable. And if we are going to introduce an extra theoretical term then parsimony begs for a justification.

But what is so special about the number of cells? In this post, I want to question the reasons to focus on individual cells (at the expense of other choices) as the basic atoms of our ontology.

Read more of this post