Archive | February, 2019

The magic 8 ball in Python

28 Feb

When different people go into computer science, different tools will be built!

Maybe you have heard of the Tampon Run game? Tampon Run is a game that was built by two teenage girls who learned coding in a summer program. Obviously, you are more likely to get computer games about tampons when women or girls build games then when men build games! This is just one reason why we need more diversity in computer science.

In my Intro to Programming class last semester, students could make a video as a final project. Natasha Crawford, Destinee Lanns and Niquo Ceberio are Master’s students in the Biology Department at SFSU. As their final project, they made a video about a a computer program that works like a Magic 8 Ball. They ask: “Will my boyfriend propose to me?”

220px-Magic8ball

Niquo told me that she got the idea for the Magic 8 Ball program from her mom who used to have a Magic 8 Ball a long time ago. Now she can use the Python version!

In the video, Niquo, Destinee and Natasha first explain how to use the Python Magic 8 Ball. Then they go on to explain how they use strings and functions in the program.

I love love love how they created this program and made a video about it. They connected the CS class to things that are important or fun to them and with an audience in mind that is probably young and female.

I hope you enjoy the video and share it with a budding coder in your world.

Advertisements

Wu and Watterson’s Theta*?

10 Feb

If you are doing population genetics, you probably heard of Watterson’s theta.
The paper where Watterson introduced theta is a classic. It is cited more that 3000 times.

Even if Watterson (1975) was a single-author paper, Watterson wasn’t working alone on this project. In the acknowledgments he says “I thank Mrs. M. Wu for help with the numerical work, and in particular for computing Table I.” In a similar situation in 2019, she would have likely gotten co-authorship on this paper and a PhD after a few papers. We would all have known the paper as Wu and Watterson (1975).

Screenshot 2019-02-10 16.04.53

I only know this story because a group of researchers from SF State and Brown University, including my amazing friend and office neighbor Dr Rori Rohlfs, did a study on “Acknowledged Programmers.”

Professor Margaret Wu

Margaret Wu was a programmer in the 70s, at a time when programming was often a job for women. She didn’t get authorship on Watterson (1975) and other papers she worked on, but much later, she did get a PhD and became a very successful professor.

If you would like to learn more about Margaret Wu, have a look at this insightful interview: http://genestogenomes.org/margaret-wu/.

Here is a video with her about the PISA rankings for countries’ educational systems: https://www.youtube.com/watch?v=Br93GTTnWr8 .

Paper and video on acknowledged programmers in theoretical population genetics

If you’d like to read more on acknowledged programmers in theoretical population genetics, have a look at the paper by Rori Rohlfs, Emilia Huerta-Sanchez and their students Samantha Dung, Andrea López, Ezequiel Lopez-Barragan, Rochelle-Jan Reyes, Ricky Thu, Edgar Castellanos and Francisca Catalan.

Plus!!! They made a really neat video about their project:

 

Here is a picture with most of the authors of the Genetics paper.

2018lab_3_orig

Authors of the paper in Genetics on Acknowledged Programmers: Illuminating Women’s Hidden Contribution to Historical Theoretical Population Genetics, Dung et al 2019.

 

* “Wu and Watterson’s Theta” was suggested by Tim Downing in a tweet.

Sequential evolution of HIV drug resistance against two-drug treatments

1 Feb

Together with Alison Feder (UC Berkeley), I am writing a paper about the history of HIV drug resistance evolution. In the paper, we focus on triple-drug therapies and we decided to leave out a nice story about two-drug therapies. It’s one of those cases where I really like the story and the data, but it just doesn’t fit in the paper we are trying to write. So, here it is, not peer-reviewed, not even on the BioRxiv, just on my blog.

drugsevolutionon3tcazttherapy

Based on data from Picard et al 2001. Viral populations in patients acquire 3TC resistance first and AZT resistance later when treated with AZT and 3TC.

In 1987, the first RT inhibitor for treatment of HIV was FDA approved: zidovudine or AZT. Its claim to fame is mostly that it didn’t work. The virus became resistant quickly in almost every patient. In the first half of the 1990, other RT inhibitors were approved: DDI, D4T and 3TC. Now it was possible to combine drugs in two-drug (and even 3-drug) combinations. I want to focus here on the two-drug combinations.

One combination that was used was 3TC+AZT. HIV needs two mutations to become resistant to both drugs (there is no single mutation that makes the virus resistant to both).

Prediction: double mutants take over

Evolutionary biologists who were working on HIV drug resistance at the time predicted that drug resistance would evolve easily against these two-drug treatments (Ribeiro et al 1998), and this was indeed what happened. However, the reasoning for their prediction doesn’t hold. Let me explain. They made their prediction based on ideas about mutation-selection balance: with a large enough population size and high enough mutation rate, they expected that double mutants would be present as standing genetic variation in all patients. Therefore, they predicted that doubly resistant strains would take over the viral populations quickly. However, if we look at data from patients in clinical trials, this is not what we see happening.

What do the data show?

The dynamics of acquired drug resistance among patients on 3TC+AZT is evident from clinical trial data. In a study from 2001 (Picard et al, JID), all 21 patients treated with 3TC+AZT had developed resistance to 3TC (but not AZT!) after 24 weeks of treatment (see figure). By week 48, half of the patients who were still in the study had also acquired various AZT resistance mutations. Similar results were reported in another study (Larder, Kemp and Harrigan, 1995): after 8 weeks, 95% of patients were 3TC resistant (M184V), but none were AZT resistant. However, after 24 weeks, 25% of the patients had AZT resistance as well. In both of these examples, drug resistance mutations were fixed sequentially, with 3TC resistance arising before AZT resistance.

Two surprises

So, while the predictions based on evolutionary theory predicted rapid spread of double mutants, what we saw was first, the rapid spread of a single mutant and later, the spread of the second mutant on the background of the first. There are two surprises here. First, there is the surprise that the double mutant was not present as standing genetic variation in most patients (I think this is because early pop gen papers on HIV overestimated the effective population size of HIV), and second, there is the surprise that it was possible for a single mutant to spread in the face of two-drug treatment. We think that this last phenomenon has to do with the existence of compartments in the human body (Moreno-Gamez, 2015), where some drugs do not penetrate in all compartments. The drug that has the best penetration into compartments like the brain or the lymphatic tissue is therefore vulnerable to drug resistance evolution when it encounters the virus without the support of the second or third drug.

Take-home message

A model that makes the correct prediction may still be wrong.

Thanks to Sarina Qin for making the figure for me!

References

Larder, B. A., Kemp, S. D. and Harrigan, P. R. (1995) ‘Potential mechanism for sustained antiretroviral efficacy of AZT-3TC combination therapy.’, Science (New York, N.Y.). American Association for the Advancement of Science, 269(5224), pp. 696–9. doi: 10.1126/SCIENCE.7542804.

Moreno-Gamez, S., Hill, A.L., Rosenbloom, D.I.S., Petrov, D.A., Nowak, M.A., Pennings, P.S. 2015. Imperfect drug penetration leads to spatial monotherapy and rapid evolution of multi-drug resistance. PNAS. (22 citations)

Picard V, Angelini E, Maillard A, et al. Comparison of genotypic and phenotypic resistance patterns of human immunodeficiency virus type 1 isolates from patients treated with stavudine and didanosine or zidovudine and lamivudine. J Infect Dis. 2001;184:781–784.

Ribeiro RM, Bonhoeffer S, Nowak MA. The frequency of resistant mutant virus before antiviral therapy. Aids. 1998;12(5):461–5.