17 October 2015

U of M EEB seminar - Archie

I’m going to keep this weeks post short - grant and code writing are hanging over my head as I type this.

The seminar this week was given by Elizabeth Archie from the University of Notre Dame. Her talk title was Social relationships health and fitness in wild baboons the portion of her research that she shared with us today focused on how social behavior contributes to health. Her work in this area has focused on baboons. She studies two social groups in Amboseli national park in Kenya. These groups have many similarities to humans for instance they are terrestrial and contain multiple male and female adults.

There are some aspect of social behavior that have very obvious consequences for health. For instance we know that social lifestyles can lead to greater risk of harmful infections. However, we understand less about the possible positive effects. Do social interactions contribute to differences in the gut microbiome? Do these changes have positive or negative net affect on health and longevity?

A first step in understanding this might be to try and understand what determines the character of the gut microbiome. We know that social partners have more similar gut microbiomes than nonsocial partners but we don’t know exactly why. Social partners often share diets, genetic ancestry, and habitat are any of these key in determining the microbiome?

Archie’s group has begun to unravel this through an ambitious project using metagenome shotgun sequencing of fecal samples. They sampled 48 adults from two groups over a one month period. The two groups were adjacent and each had a range of around 12.5 square miles during this month. This is an awesome dataset that allows lots of really interesting questions to be asked:

  1. Does social group explain differences in microbiome?
  2. Do social networks within groups explain differences in microbiome?
  3. Are all microbe groups equally influenced by social behavior?

So to test this first question we can look at a simple PCA and ask if differences in the taxonomic groups or genes present in the shotgun samples are able to differentiate the two groups. Indeed we see that the PCA shows that we can easily separate these two groups. Social group membership explains about 18% of difference in the taxonomic makeup of the gut microbiome, and about 10% of the differences in the genes present in the gut microbiome. I was curious about this difference 18% to 10% does this have important implications? To me this suggests that regardless of the species mix we have in our gut microbiome we converge on a community that is adapted to accomplish similar metabolic goals. Not sure exactly what the appropriate test for that would be, and this is probably already well established (not my subfield).

this is a screen shot of a figure from the 2015 elife paper on the left we have PCA based on taxonomy included in the sequences on the right based on KEGG enzyme orthology (type of genes). Mica and Viola  are the names for the two social groups being studied.

Now for question two. Do differences in within group social behavior have predictable contributions to gut microbiome content? This is where the nature of this dataset gets cool. It ends up that these 48 baboons that were sequenced have also been observed and their social interactions have been extensively documented. This results in pairwise measures of social connection between all individuals in a population. They have great looking figures of this (I’m not sure how much quantitative information an average user extracts from these - could the position of the figures be optimized to minimize crossing lines? - perhaps they are?).

This is a screen shot of a figure from the 2015 elife paper. The thickness of the line indicates the strength of social connection between individuals.  Social connections are measured based on grooming between pairs - Elizabeth tells us that this is a good measure of social connection since it is the primary activity used to build and maintain friendships in these baboons.

What we see (in both social groups) is that the strength of social interaction between two individuals is corelated with the similarity of their gut microbiomes.
Now for that final question, is it certain microbes that are producing this signal. We could easily imagine that many microbes are ubiquitous and widely available from the environment. Perhaps it is only a subset (fragile ones that don’t last long in the “wild”) that we see social behavior as the determining factor in their presence or absence. The approach that Archie’s group took was to see if the same taxonomic groups show enrichement between the two main groups and within the social network of one group. They found that indeed there is a subset of taxonomic groups that do seem to be prone to the effects of social behavior. To take this a step further the authors turned to the Genomes Online Database to ask if the identified groups were prone to be non spore forming species that might not persist outside of a host. This is indeed what the authors found the identified groups were “consistently enriched (relative to all species or genera tested) for an anaerobic, non-spore forming lifestyle”

This one only the first half of Beth’s talk she also shared fascinating work that her group has done looking at the effect of early life hardship on longevity. You can find links to this and some of the groups other fascinating work below.

The Archie Lab

Elizabeth A. Archie Google Scholar Profile

Manuscripts resulting from the projects mentioned above:

Social networks predict gut microbiome composition in wild baboons.

Social affiliation matters: both same-sex and opposite-sex relationships predict survival in wild female baboons.

09 October 2015

U of M EEB seminar - Castoe

Today’s seminar speaker was Todd Castoe from the University of Texas at Arlington where I did my Ph.D.  While Todd wasn’t on my committee my office when I was a grad student was directly across the hall from Todd, so it was great to catch up with him.  His talk was titled: Genome-wide evidence for perturbed systems as hotspots for adaptation.  Writ large this was a talk about convergence and the topography of the adaptive landscape.

The idea of adaptive landscapes is perhaps one of the oldest metaphors in evolutionary biology.  For Todd’s talk we will consider the high points in these landscapes as phenotypic combinations that provide high fitness and the pathway followed to travel between peaks as the evolutionary changes responsible for moving between peaks. 

Two alternative adaptive landscapes:

Here the adaptive landscape has many peaks and there are many potential pathways to reach any of these many peaks

In contrast there could be only one reasonable path between only a handful of local optima

We generate expectations for convergence under each of the above conceptions of the adaptive landscape.  In the first we would expect convergence at the phenotypic level to be relatively more common than the actual underlying molecular changes responsible for the phenotypes.  In contrast in the second case some form of constraint limits the pathways that can be used to move from one optima to another and we should expect phenotypic and molecular convergence to be more common.

Todd began his talk by suggesting that increasing evidence (including a great example of mitochondrial convergence in squamate reptiles) points to an adaptive landscape that is highly constrained and more like the second metaphorical picture.

Todd then showed us a variety of projects that his lab is working on that may shed light on the nature of this landscape and the nature of convergence.  For the sake of brevity I’m going to talk about just one of these. 

This project is a story centered on the amazing physiology of the Burmese python.  In its natural habitat the Burmese python often feeds very rarely but consumes meals that may mass as much as 50% of the snake’s mass.  After these large feedings the snake may fast for many months.  This pattern of large meals followed by long fasting is not unique to Burmese pythons and is also present in some of the large vipers.  The amazing part of this story though is the energy saving solution these large snakes have found.   During fasting periods the snakes have evolved to lose much of the physiological structure necessary for the digestion of these meals.  The snakes exhibit massive losses in the size of organs for instance the heart, liver, and kidneys, and they even lose some structure within organs.  For instance, microvilli in the small intestine are lost during fasting periods.  These adaptations allow the snake to achieve some of the lowest metabolic rates measured in vertebrates during fasting periods, but return to more typical metabolic levels after feeding.  The phylogenetic distribution of these traits suggests that some of the necessary machinery for this physiological remodeling is likely quite ancient and has been fine tuned or loss in contemporary clades.

The Castoe lab is now doing exciting work looking at the evolution of introduced Burmese python populations in Florida.  There are many differences in the environment that the invasive populations are living in.  The obvious and well documented difference is low temperatures.  For instance winter mortality appears to be as high as 40-90% in the invasive population.  Because of this it was expected that genome scans would reveal selection on genes important in cold tolerance.  Genome scans revealed that approximately 80 genes show strong signs of selection in this invasive population.  But, genes important in cold tolerance only accounted for a fraction (approximately 10%) of these 80.  What did the rest of the genes under selection look like?  Preliminary results suggest that the majority are those genes that have already been identified as being important in the evolution of physiological remodeling.  Why would these genes suddenly come under selection?  It ends up that in Florida prey items are abundant year round and snakes that do not remodel their organs may have higher fitness.  The story then may be a particularly fascinating version of convergent evolution where this introduced population is converging on a phenotype of its ancestor.  Returning to the analogy of adaptive landscapes at the beginning of the post then we would be seeing something like this:

  When we look at the Burmese python in Florida we are seeing a lineage that has used largely the same system of genes to move from no physiological remodeling to physiological remodeling and now back again… effectively converging on an ancestral phenotype and using the same pathway to do it!

Todd covered an impressive body of work in his talk and any mistakes or unjustified extrapolations are likely my own.  Below are links to some of the papers from his lab that focus on these topics:

30 September 2015

U of M - EEB seminar - Lockwood

Today we had an interesting seminar with Julie Lockwood from Rutgers University.  Her talk title was Killing the cuddly: Tactics for managing exotic predators to protect their native prey.   Her talk was divided into two sections the first dealt with the importance of model choice in providing guidance to managers and the second part dealt with attempts to understand population growth in invasive species.   

Importance of modeling
She motivated the first part of her talk with an empirical example from Rayner et al 2007.  This manuscript looks at the breeding success of Cook’s petrels under three conditions first prior to any work being done to remove predators so that both cats and rats were present (success=.25-.50), then after cats had been removed but rats were still present (success=0.0-.25), and then finally once both had been removed (success=.50-.75).  Here is the graph that she showed from that paper:

She then explained that most model informed management decisions that are currently made use models that only examine the predator population and look for the life stage that can be targeted to most quickly reduce its population.   She suggests instead we need to take a more nuanced approach with a more complex model and use the target of keeping the prey alive rather than dropping the population of predator as quickly as possible.

She then described work that developed a model that allowed the predator to effect the prey population size.  This model can accommodate biological realities such as the fact that often juvenile predators can’t eat adult prey or that only certain stages of prey are targeted at all.  Once this model was developed they did a series of full block experiments with short, medium, or long lived predators and prey for a total of 9 pairings.  The general results of this were that particularly in the case of long lived predators traditional approaches and her recommended approach found different optimal solutions.

- my biggest question from this part of the talk was: Can we wrap in two predators and get the "right" solution to the motivating example of Cook's petrels?

Population Lag
The next part of her talk was focused on population lag.  This is a well documented characteristic particularly in invasive plants.  It is characterized by a species being present at low density for an extended period of time and then at some point suddenly exhibiting a great increase in population size.   In plants it appears that population lag can range from as little as a decade to as long as a century or more.  The data available for vertebrates though was less clear.  Primarily because there are not large numbers of vertebrates that have been introduced with abundant data on population size over time.  However, Hawaiian birds offer the opportunity to study this phenomenon.  Her team used the Audubon Christmas bird count data to look at population dynamics of 54 invasive species in Hawaii.

I’ll be honest this part of the talk got a little fuzzy for me.  The data are very noisy and so apparently some method was used to define a maximum population size and data after this point were discarded (I believe).  The remaining data were fit with a number of models 1) simple linear, 2) log 3) two piece linear.  For the two piece linear basically every point between the 6th year and the 5th year prior to peak population was tried as the break and the break that resulted in the highest likelihood was kept.  If the single break model was better than the alternatives then that was evidence for population lag in that species.  Her results indicated that most species did exhibit a population lag. 

- my biggest question/comment from this part of the talk was: Seems like one of those places where we need to develop or assess model adequacy, I could picture the best model here being too poor to reveal biologically important characteristics.

All in all this was a really interesting talk.  My final take home from the talk was that most invasive species provide us with a long period of time when population grows slowly and during this time careful modeling can provide us with the best chance of having a successful attempt in controlling an invasive species.  In addition even if we miss this low population window populations are stochastic and so perhaps we should be prepared to attack an invasive when it experiences a natural fluctuation.

Here are links to the Lockwood lab and the pages of her two former students who did much of this work.  My explanations above are no doubt over simplifications and contain errors which are purely my own.  If this stuff really interests you check out the publications below which contain the research I described above.

Kevin Aagaard

Orin Robinson


25 September 2015

Brownian Motion

If you want to skip all the code and Shiny info you can jump straight to the shiny app: Brownian motion simulator.

In comparative phylogenetics Brownian motion is often either a null model that we compare observations to or is a de facto assumption that our methods depend on.  For this reason, I think it can be useful to have nice interactive ways for students to explore this model and develop an intuitive understanding of how it behaves.  The R package Shiny offers a great environment to develop something like this.  Below you can see just how easy it is to create a slick and responsive web app.

The first step is designing a file called “ui.R” this is the user interface.  It consists of two primary code chunks the first is the sidebarLayout this describes the part of the page that the user will interact with.  The Shiny package has many implemented widgets built into the package and in this example I use two of these one is sliderInput and the other is the actionButton.  SliderInput creates a sliding widget and lets you set the min and max value for the variable as well as an initial starting value.  The actionButton widget creates a variable that initially has a value of 1 and this is incremented by 1 each time the button is pressed.  I use the actionButton to act as the seed for the stochastic portion of my code.  The second part of this simple ui.R file specifies the output to place next to the sidebar.  In this example I simply call the object “distPlot” which is created in the server page and I also specify the vertical size to be larger than it would be by default.

The next component of the Shiny app is the “server.R” file.  This is the code that will be run to generate the outpot portion of the webapp.  This consists of two components in the example.  The first is the reactive component that is the result of the Brownian motion simulation. By using replicate we will create a matrix where the rows represent generations and the columns represent iterations. By placing it inside of a reactive command we insure that it will only be rerun when one of the underlying input variables changes.  If you look at the code you can see that this includes: input$seed.val, input$reps, input$gens.  In contrast if another variable such as input$mon changes “x” will not be recalculated.

The second element of the code is the actual plot I want output.  Because x is a matrix we can use matplot to plot the results quickly and easily.  I choose to use a new color pallete viridis.  However, we want to make this interactive by adding a histrogram of any time point on the graph.  We do this by using the argument input$mon to select a specific row of x to plot.  This determines what data is used for the second graph and adds a vertical line indicating what time point is being plotted.

Here is what the finished product looks like:

05 September 2015

Ternary Diagram - Working Example

A couple of years ago I posted a bit of code that lets you plot data in a ternary diagram.  This is a useful way to display proportion data when proportions are split between three possible states.  Unfortunately, my original post included a link to the underlying data in my dropbox account.  This has led to me accidentally deleting it a couple of times. 

Well I did it again.  I decided that the best solution would be to just post some new code that included simulation of the data.

The original data was generated under a phylogenetic model and the data represented the number of species in each of 3 possible states.  If you would like to regenerate data for that approach you will need an R package that allows for discrete data simulation on a phylogenetic tree.  A fairly easy to install package that can do this is geiger.  Below is the code for generating the an appropriate dataset.

If you are not interested in phylogenetics you can generate an appropriate dataset in a non-phylogenetic framework like this:

Finally with either of these datasets you can then plot using the vcd package. 

This script will then produce:


27 August 2015

Chromosome Evolution Conference


I had the good fortune of speaking at the American Genetics Association president’s symposium last week.  There were many things to enjoy at this conference.  First the location was Bainbridge Island just across the bay from downtown Seattle.  Second, despite a striking diversity of particular subfields all speakers shared a broad interest in chromosomal evolution and were interested in sharing ideas and approaches and finding ways to move the field forward.  There was also relative equality in the distribution of sexes with 10 female and 12 male speakers.  Likewise the poster session featured 14 female and 16 male presenters.  Finally, if the talks and posters weren’t sufficient then the opportunity to socialize and discuss science certainly were.  All meals were catered and there were no concurrent sessions.  This meant that you got to spend 2 ½ days sharing ideas and learning from each other without ever missing a talk or poster.  So many thanks to Katie Piechel for putting together such an awesome conference!  Below are a few highlights that I found particularly exciting.

Jeremy Searle from Cornell gave a great talk covering hybrid zones and speciation in mice and shrews.  He spoke quite a bit about the amazing variation in chromosome number that he has found on the island of Madeira.  This hit home for me because in my analysis of chromosome number it ends up that some of the fastest rates that I have observed are driven largely by the amazing diversity that I observe in species from the Canary islands just south of Madeira.  Its always reassuring when you see the same kind of patterns in such distant parts of the tree of life.

Karen Miga from University of California, Santa Cruz discussed her work trying to shed light on the dark side of the genome.  To be honest I’m not sure how to use the work that she has done but I think that her work represents a huge step forward in giving us some usable characterization of the nature of centromeric regions of chromosomes.  For a lay introduction to her work you can check out her blog post at Scientific American or if you're feeling a bit braver here is a nice article on a preprint server.

Beatriz Vicoso who recently took a position at the Institute of Science and Technology in Austria talked about some of the amazing work that she did while she was a postdoc with Doris Bachtrog.  Specifically the suprising discovery that heteromorphic sex chromosomes are not always a trap.  Indeed many of the mysterious attributes of the dot chromosome in Drosophila now make sense once we realize that it spent millions of years as a sex chromosome.  To read about this check out their article in PLOS Biology.

I could and should add another 10 or 12 talks and posters but I probably need to focus on my own papers instead.  Keep your eyes out for next years AGA president’s symposium in Asillomar; it will focus on local adaptation and will be organized by Lynda Delph.

Hadley and Winston talk about the future of interactive graphics

I went to my first R users group meeting in Minnesota and was treated to talks by two R heavy weights. First Hadley Wickham gave a talk about what he views as the most exciting and dynamic area of R development (interactive graphics) and this was followed by a short talk by Winston Chang showing what he has been doing to develop interactive graphics a part of the Shiny environment.  Below are some take home messages and a few links that I thought were particularly interesting.  

Hadley Wickham: First the slides for Hadley’s talk are on his github page.  Hadley started his talk off with a short demo showing how interactive graphics could allow you to learn about your data.  He has a clever dataset of 3d data points and these show no apparent pattern when viewed along any two axes.  However when viewed from the correct angle we discover that there is a very distinct spiral pattern in the data this provides a nice aha moment in his talk.  Next Hadley discussed the history of interactive graphics in R splitting them into 3 categories 1) those written in lower level languages, 2) those hacking existing R plotting functions, and 3) and browser based solutions.  Many of the packages that he showed are not very realistic for everyday use or for investing a lot of time since they are no longer being actively developed.

Perhaps the most interesting part of Hadley’s talk was his discussion and demonstration of ggvis this is Hadley’s package that he envisions eventually replacing ggplot2.  His goal is to continue to work on this and perhaps sometime in 2016 have it to the point that anything you could do in ggplot2 you can do in ggvis.  The upside of this is that if you are already comfortable with ggplot2 you will have no trouble transitioning into ggvis.  Hadley is using the same type of grammer based approach to building up more complex graphs from simpler elements.

Winston Chang gave a much shorter talk but illustrated some of the new interactive developments in Shiny.  Despite my use of Shiny I was actually completely unaware of this development.  Winston has added some nice examples on the Shiny articles page (bottom of right column).

Other interesting links from the evening:

Html widgets for R: allows you to use a variety of javascript visualization libraries within R

Hadley’s new book Advanced R