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

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

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

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

A year in books: Neanderthals to the National Cancer Act to now

A tradition I started a couple of years ago is to read at least one non-fiction book per month and then to share my thoughts on the reading at the start of the following year. Last year, my dozen books were mostly on philosophy, psychology, and political economy. My brief comments on them ended up running a long 3.2 thousand words. This time the list had expanded to around 19 books. So I will divide the summaries into thematic sets. For the first theme, I will start with a subject that is new for my idle reading: cancer.

As a new researcher in mathematical oncology — and even though I am located in a cancer hospital — my experience with cancer has been mostly confined to the remote distance of replicator dynamics. So above all else these three books — Nelson’s (2013) Anarchy in the Organism, Mukherjee’s (2010) The Emperor of All Maladies, and Leaf’s (2014) The Truth in Small Doses — have provided me with insights into the personal experiences of the patient and doctor.

I hope that based on these reviews and the ones to follow, you can suggest more books for me to read in 2016. Better yet, maybe my comments will help you choose your next book. Much of what I read in 2015 came from suggestions made by my friends and readers, as well as articles, blogs, and reviews I’ve stumbled across.[1] In fact, each of these cancer books was picked for me by someone else.

If you’ve been to a restaurant with me then you know that I hate choosing between close-to-equivalent options. To avoid such discomfort, I outsourced the choosing of my February book to G+ and Nelson’s Anarchy in the Organism beat out Problems of the Self by a narrow margin to claim a spot on the reading list. As I was finishing up Nelson’s book — which I will review last in this post — David Basanta dropped off The Emperor of All Maladies on my desk. So I continued my reading on cancer. Finally, Leaf’s book came towards the end of the year based on a recommendation from Jacob Scott. It helped reinvigorate me after a summer away from the Moffitt Cancer Center.
Read more of this post

Cataloging a year of blogging

Happy Old New Year.

January 2016 is the the start of the 6th calendar year and the 41st month with updates to TheEGG. The reason for the large discrepancy between these two numbers is occasional months without activity. The past year was exceptional in this regard with the longest single silence on the blog between April 4th and October 26th. This means that the year saw only 29 new entries, 2 indexes cataloging 2014, a report on the EGT reading group, and an update on readership. This post is meant to organize the last year of activity for future reference, and to try to uncover common themes.

If you like lists and TL;DRs then this is for you.
Read more of this post

Evolutionary dynamics of cancer in the bone

I don’t know about you, dear reader, but when I was a senior in highschool, I was busy skipping class to play CounterStrike. And I wasn’t even any good at it. Pranav Warman, however, is busy spending his senior year curing cancer. Or at least modeling it. On Friday, David Basanta, Pranav, and I spent much of the evening trying to understand prostate cancer after it has metastasized to the bone. Below, you can see us trying to make sense of some Mathematica calculations.[1]

WorkingBoneCancer

In this post, I want to sketch some of the ideas that we fooled around with. First is a model of healthy bone. Second is an introduction of the tumour into the system. Third, we will consider a model of a simple chemotherapy as treatment. You might notice some similarities to Warman et al. (2015) and my old discussions of the Basanta et al. (2012) model of tumour-stroma interaction. This is not accidental.

Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 2,460 other followers