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

Mutation-bias driving the evolution of mutation rates

In classic game theory, we are often faced with multiple potential equilibria between which to select with no unequivocal way to choose between these alternatives. If you’ve ever heard Artem justify dynamic approaches, such as evolutionary game theory, then you’ve seen this equilibrium selection problem take center stage. Natural selection has an analogous ‘problem’ of many local fitness peaks. Is the selection between them simply an accidental historical process? Or is there a method to the madness that is independent of the the environment that defines the fitness landscape and that can produce long term evolutionary trends?

Two weeks ago, in my first post of this series, I talked about an idea Wallace Arthur (2004) calls “developmental bias”, where the variation of traits in a population can determine which fitness peak the population evolves to. The idea is that if variation is generated more frequently in a particular direction, then fitness peaks in that direction are more easily discovered. Arthur hypothesized that this mechanism can be responsible for long-term evolutionary trends.

A very similar idea was discovered and called “mutation bias” by Yampolsky & Stoltzfus (2001). The difference between mutation bias and developmental bias is that Yampolsky & Stoltzfus (2001) described the idea in the language of discrete genetics rather than trait-based phenotypic evolution. They also did not invoke developmental biology. The basic mechanism, however, was the same: if a population is confronted with multiple fitness peaks nearby, mutation bias will make particular peaks much more likely.

In this post, I will discuss the Yampolsky & Stoltzfus (2001) “mutation bias”, consider applications of it to the evolution of mutation rates by Gerrish et al. (2007), and discuss how mutation is like and unlike other biological traits.

Read more of this post

Don’t treat the player, treat the game: buffer therapy and bevacizumab

No matter how much I like modeling for the sake of modeling, or science for the sake of science, working in a hospital adds some constraints. At some point people look over at you measuring games in the Petri dish and ask “why are you doing this?” They expect an answer that involves something that benefits patients. That might mean prevention, early detection, or minimizing side-effects. But in most cases it means treatment: how does your work help us treat cancer? Here, I think, evolutionary game theory — and the Darwinian view of cancer more generally — offers a useful insight in the titular slogan: don’t treat the player, treat the game.

One of the most salient negative features of cancer is the tumour — the abnormal mass of cancer cells. It seems natural to concentrate on getting rid of these cells, or at least reducing their numbers. This is why tumour volume has become a popular surrogate endpoint for clinical trials. This is treating the player. Instead, evolutionary medicine would ask us to find the conditions that caused the system to evolve towards the state of having a large tumour and how we can change those conditions. Evolutionary therapy aims to change the environmental pressures on the tumour, such that the cancerous phenotypes are no longer favoured and are driven to extinction (or kept in check) by Darwinian forces. The goal is to change the game so that cancer proves to be a non-viable strategy.[1]

In this post I want to look at the pairwise game version of my joint work with Robert Vander Velde, David Basanta, and Jacob Scott on the Warburg effect (Warburg, 1956; Gatenby & Gillies, 2004) and acid-mediated tumour invasion (Gatenby, 1995; Gatenby & Gawlinski, 2003). Since in this work we are concerned with the effects of acidity and vascularization on cancer dynamics, I will concentrate on interventions that affect acidity (buffer therapy; for early empirical work, see Robey et al., 2009) or vascularization (angiogenesis inhibitor therapy like bevacizumab).

My goal isn’t to say something new about these therapies, but to use them as illustrations for the importance of changing between qualitatively different dynamic regimes. In particular, I will be dealing with the oncological equivalent of a spherical cow in frictionless vacuum. I have tried to add some caveats in the footnotes, but these could be multiplied indefinitely without reaching an acceptably complete picture.

Read more of this post

Variation for supply driven evolution

I’ve taken a very long hiatus (nearly 5 years!) from this blog. I suppose getting married and getting an MD are good excuses, but Artem has very kindly let me return. And I greatly appreciate this chance, because I’d like to summarize an idea I had been working on for a while. So far, only two publication has come out of it (Xue et al., 2015a,b), but it’s an idea that has me excited. So excited that I defended a thesis on it this Tuesday. For now, I call it supply-driven evolution, where I try to show how the generation of variation can determine long-term evolution.

Evolutionary theoreticians have long known that how variation is generated has a decisive role in evolutionary outcome. The reason is that natural selection can only choose among what has been generated, so focusing on natural selection will not produce a full understanding of evolution. But how does variation affect evolution, and can variation be the decisive factor in how evolution proceeds? I believe that the answer is “frequently, yes,” because it does not actually compete with natural selection. I’ll do a brief overview of the literature in the first few posts. By the end, I hope how this mechanism can explain some forms of irreversible evolution, stuff I had blogged about five years ago.

Read more of this post

EGT Reading Group 51 – 55 and a photo

The evolutionary game theory reading group — originally part of the raison d’être for this blog — has continued at a crawling pace. Far from the weekly groups of its early days in 2010, we’ve only had 5 meetings since my last update on March 26th, 2015 — almost 11 months ago. Surprisingly, this is a doubling in pace, with the 46 to 50 milestone having taken 22 months. To celebrate, I wanted to update you on what we’ve read and discussed:
Read more of this post

Lotka-Volterra, replicator dynamics, and stag hunting bacteria

Happy year of the monkey!

Last time in the Petri dish, I considered the replicator dynamics between type-A and type-B cells abstractly. In the comments, Arne Traulsen pointed me to Li et al. (2015):

We have attempted something similar in spirit with bacteria. Looking at frequencies alone, it looked like coordination. But taking into account growth led to different conclusions […] In that case, things were more subtle than anticipated…

So following their spirit, I will get more concrete in this post and replace type-A by Curvibacter sp. AEP13 and type-B by Duganella sp. C1.2 — two bacteria that help fresh water Hydra avoid fungal infection. And I will also show how to extend our replicator dynamics with growth and changing cell density.

Although I try to follow Arne’s work very closely, I had not read Li et al. (2015) before, so I scheduled it for a reading group this past Friday. I really enjoyed the experiments that they conducted, but I don’t agree with their interpretations that taking growth into account leads to a different conclusion. In this post, I will sketch how they measured their experimental system and then provide a replicator equation representation of the Lotka-Volterra model they use to interpret their results. From this, we’ll be able to conclude that C and D are playing the Stag Hunt — or coordination, or assurance, pick your favorite terminology — game.

Read more of this post

Hadza hunter-gatherers, social networks, and models of cooperation

At the heart of the Great Lakes region of East Africa is Tanzania — a republic comprised of 30 mikoa, or provinces. Its border is marked off by the giant lakes Victoria, Tanganyika, and Malawi. But the lake that interests me the most is an internal one: 200 km from the border with Kenya at the junction of mikao Arusha, Manyara, Simiyu and Singed is Lake Eyasi. It is a temperamental lake that can dry up almost entirely — becoming crossable on foot — in some years and in others — like the El Nino years — flood its banks enough to attract hippos from the Serengeti.

For the Hadza, it is home.

The Hadza number around a thousand people, with around 300 living as traditional nomadic hunter-gatherers (Marlow, 2002; 2010). A life style that is believed to be a useful model of societies in our own evolutionary heritage. An empirical model of particular interest for the evolution of cooperation. But a model that requires much more effort to explore than running a few parameter settings on your computer. In the summer of 2010, Coren Apicella explored this model by traveling between Hadza camps throughout the Lake Eyasi region to gain insights into their social network and cooperative behavior.

Here is a video abstract where Coren describes her work:

The data she collected with her colleagues (Apicella et al., 2012) provides our best proxy for the social organization of early humans. In this post, I want to talk about the Hadza, the data set of their social network, and how it can inform other models of cooperation. In other words, I want to freeride on Apicella et al. (2012) and allow myself and other theorists to explore computational models informed by the empirical Hadza model without having to hike around Lake Eyasi for ourselves.

Read more of this post

Measuring games in the Petri dish

For the next couple of months, Jeffrey Peacock is visiting Moffitt. He’s a 4th year medical student at the University of Central Florida with a background in microbiology and genetic engineering of bacteria and yeast. Together with Andriy Marusyk and Jacob Scott, he will move to human cells and run some in vitro experiments with non-small cell lung cancer — you can read more about this on Connecting the Dots. Robert Vander Velde is also in the process of designing some experiments of his own. Both Jeff and Robert are interested in evolutionary game theory, so this is great opportunity for me to put my ideas on operationalization of replicator dynamics into practice.

In this post, I want to outline the basic process for measuring a game from in vitro experiments. Games in the Petri-dish. It won’t be as action packed as Agar.io — that’s an actual MMO cells-in-Petri-dish game; play here — but hopefully it will be more grounded in reality. I will introduce the gain function, show how to measure it, and stress the importance of quantifying the error on this measurement. Since this is part of the theoretical preliminaries for my collaborations, we don’t have our own data to share yet, so I will provide an illustrative cartoon with data from Archetti et al. (2015). Finally, I will show what sort of data would rule-out the theoretician’s favourite matrix games and discuss the ego-centric representation of two-strategy matrix games. The hope is that we can use this work to go from heuristic guesses at what sort of games microbes or cancer cells might play to actually measuring those games.
Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 2,458 other followers