Materials from the R workshop at #AAPA2016

For last week’s AAPA conference, my friend and colleague David Pappano organized a workshop teaching about the many uses of the R programming language for biological anthropology (I’m listed as co-organizer, but really David did everything). After introducing the basics, we broke into small groups focusing on specific aspects of using R. I devised some lessons for basic statistics, writing functions, and resampling. Since each of the lessons could have easily taken up an hour and most people didn’t get to go through the activities fully, I’m posting up the R codes here for people to mess around with.

The basic stats lesson utilized Francis Galton’s height data for hundreds of families, courtesy of Dr. Ryan Raaum. To load in these data you just need to type into R: galton = read.csv(url(“http://bit.ly/galtondata“)). The code simply shows how to do basic statistics that are built into R, such as  t-test and linear regression.

Example of some summary stats for the Galton height data.

Some summary stats for the Galton  data. The code is in blue and the output in black.

Here is the Basic Stats code, download and paste it into an R file, then buckle up!

The lesson on functions and resampling was based on limb length data for apes, fossil hominins and modern humans (from Dr. Herman Pontzer). The csv file with the data can be downloaded from David’s website. R has lots of great built-in functions (see basic stats, above), and even if you’re looking to do something more than the basics, chances are you can find what you’re looking for in one of the myriad packages that researchers have developed and published over the years. But sometimes it’s necessary to write a function on your own, and with fossil samples you may find yourself needing to do resampling with a specific function or test statistic.

For example, you can ask whether a small sample of “anatomically modern” fossil humans (n=12) truly differs in femur length from a small sample of Neandertals (n=9). Traditional statistics require certain assumptions about the size and distribution of the data, which fossils fail to meet. Another way to ask the question is, “If the two groups come from the same distribution (e.g. population), would random samples of sizes n=12 and n=9 have so great an average difference as we see between the fossil samples?” A permutation test, shuffling the group membership of the fossils and then calculating the difference between the new “group” means, allows you to quickly and easily ask this question:

R code for a simple permutation test.

R code for a simple permutation test. The built-in function “sample()” is your best friend.

Although simply viewing the data suggests the two groups are different (boxplot on the left, below), the permutation test confirms that there is a very low probability of sampling so great a difference as is seen between the two fossil samples.

Left: Femur lengths of anatomically modern humans (AMH) and Neandertals. Right: distribution of resampled group differences. Dashed lines bracket 95% of the resampled distribution, and the red line is the observed difference between AMH and Neandertal femur lengths. Only about 1% of the resampled differences are as great as the observed fossil difference.

Left: Femur lengths of anatomically modern humans (AMH) and Neandertals. Right: distribution of resampled group differences. Dashed lines bracket 95% of the resampled distribution, and the red line is the observed difference between AMH and Neandertal femur lengths. Only about 1% of the resampled differences are as great as the observed fossil difference.

Here’s the code for the functions & resampling lesson. There are a bunch of examples of different resampling tests, way more than we possibly could’ve done in the brief time for the workshop. It’s posted here so you can wade through it yourself, it should keep you busy for a while if you’re new to R. Good luck!

Did GDF6 “gene tweak” allow humans to become upright?

The short answer is, “Not really.” But as is often the case, the real story behind so many headlines last week is a bit more complicated.

smh.

smh. Links to the first, second, third, and fourth stories.

What are they talking about, Willis?

These headlines, each saying something slightly different, are referring to a study by Indjeian and colleagues published in Cell.  Researchers identified a stretch of DNA that is highly conserved across mammals, or in other words, it is very similar between very different organisms. In humans, however, this conserved region is actually missing (“hCONDEL.306”):

Fig. 4A from Indjeian et al. 2016. A stretch of DNA, "hCONDEL.306" is completely missing in humans (as is another stretch, hCONDEL.305) but otherwise very similar between chimpanzees, monkeys and mice.

Fig. 4A from Indjeian et al. 2016. A stretch of DNA on Chromosome 8, “hCONDEL.306,” is very similar between chimpanzees, macaque monkeys, and mice, but is completely missing in humans (as is another stretch, hCONDEL.305).

That a stretch of DNA should be highly conserved across diverse animal groups suggests purifying natural selection has prevented any mutations from occurring here – alterations to this stretch of DNA negatively affected fitness. But that humans should be missing such a highly conserved region suggests that this deletion came under positive natural selection at some point in human evolution. This strategy, of seeking stretches of DNA that are similar between many animals but very different in humans, has led to the identification of hundreds of genetic underpinnings of human uniqueness. Some of these, such as the case in question, involve deleted sequences and have been termed “hCONDELs,” for “regions with high sequence conservation that are surprisingly deleted in humans” (McLean et al., 2011: 216). Others involve the accumulation of mutations where other animals show few or none (e.g., HACNS1; Prabhakar et al. 2008). In many (most?) cases these are “non-coding” sequences of DNA.

How can “non-coding” DNA help make humans upright?

As was predicted 30 years ago (King and Wilson, 1975), what makes humans different from other animals isn’t so much in the protein-coding DNA (the classical understanding of the term, “genes”), but rather in the control of these protein-coding genes. “Non-coding” means that a stretch of DNA may get transcribed into RNA but is not then translated into proteins. But even though these sequences themselves don’t become anything tangible, many are nevertheless critical in regulating gene expression – when, where and how much a gene gets used. It’s wild stuff. Indeed, “Many human accelerated regions are developmental [gene] enhancers” (Capra et al., 2013).

In the present case, hCONDEL.306 refers to the human-specific deletion of a developmental enhancer located near the GDF6 gene, which is a bone morphogenetic protein. The major finding of the paper, as stated succinctly in the Highlights title page, is that “Humans have lost a conserved regulatory element [hCONDEL.306] controlling GDF6 expression…. Mouse phenotypes suggest that [this] deletion is related to digit shortening in human feet.”

How do they link this “gene tweak” to digit shortening?

Since humans have lost this gene enhancer that is highly conserved in other mammals, Indjeian and team reasoned that the chimpanzee DNA sequence associated with this deletion, retaining the enhancer sequence, is likely the ancestral condition from which the human version evolved. They inserted the chimpanzee version into mouse embryos and watched what happened as they developed. The enhancer was only active in the mice’s back legs, specifically in the cartilage that would later become the lateral toe bones and cells that would become a muscle of the big toe (abductor hallucis). These are areas where humans and chimpanzees differ: our lateral toes are shorter than chimps’, and we only have one abductor hallucis muscle whereas chimpanzees have an additional, longer abductor hallucis  (Aiello and Dean, 2002). So, we’re on our way to seeing how hCONDEL.306 might relate to our big toe or upright walking, as the headlines say.

But this still doesn’t explain how this deletion affects GDF6 gene expression, and therefore what this does for our feet. Pressing onward, the scientists compared the size of certain bones in mice with a normal Gdf6 gene, and those in which the Gdf6 gene was completely turned off (or “knocked out”).  The Gdf6 knock-out mice had shorter lateral toe bones than regular mice, but they also had shorter big toes as well – the previous experiment staining mouse embryos showed the ancestral enhancer was expressed more in the latter toes, not so much the big toe.

Figures 5-6 from Indjeian et al. (2016) sum up the findings. Figure 5 (left) shows that the ancestral version of the GDF6 enhancer (blue staining) is most strongly expressed in the lower limb, especially the fifth toe bone. Figure 6 (right) shows that a lack of GDF6 expression (black bars) results in shorter skull and toe bones. Combining these findings, humans lack a gene enhancer associated with the development of long lateral toes.

Figures 5-6 from Indjeian et al. (2016) sum up the findings. Figure 5 (left) shows that the ancestral version of the GDF6 enhancer (blue staining) is most strongly expressed in the lower half of the body, especially the fifth toe bone. Figure 6 (right) shows that a lack of Gdf6 expression (black bars) results in shorter skull and toe bones. Combining these findings, humans lack a gene enhancer associated with the development of long lateral toes.

hCONDEL.306 doesn’t completely turn off GDF6, so this second experiment doesn’t really tell us exactly what the hCONDEL does. But the results are highly suggestive. Indjeian and team showed that Gdf6 affects toe length, among other skeletal traits, in mice. The ancestral enhancer that humans are missing seems to affect GDF6 activity in the leg/foot only. This illustrates a mechanism of modularity – as the authors state, “Loss of this enhancer would thus preserve normal GDF6 functions in the skull and forelimbs, while confining any … changes to the posterior digits of the hindlimb.” In other words, developmental enhancers allow different parts of the body to evolve independently despite being made by some of the same genes (such as GDF6).

As with any good study, results are intriguing but they raise more questions for future studies. The researchers conducted two experiments to investigate the function of hCONDEL.306: first putting the chimp version in mouse embryos to see where the ancestral enhancer is expressed, and then turning off Gdf6 completely in mice to see what happens. A more direct way to see what hCONDEL.306 does might be to put a longer stretch of the human sequence surrounding GDF6 containing (or rather missing) the ancestral enhancer into mouse embryos. I’m not a molecular biologist so maybe this isn’t possible. But this is important because the ancestral (chimpanzee) enhancer appeared to be most strongly expressed in the little toe, but of course this isn’t our only toe that is short compared to chimps. Similarly, how hCONDEL.306 relates to the abductor hallucis muscle remains in question – does it reduce the size of the intrinsic muscle present in both humans and chimps, or does it prevent development of the longer muscle that chimps have but we lack? We can expect to find hCONDEL.306 in the genomes of Neandertals (and Denisovans?), since they also have short toes, but what would it mean if they retained the ancestral enhancer?

So how does this gene tweak help with upright walking?

This is a really cool paper with important implications for human evolution, but something seems to have been lost in translation between the paper and the headlines (the news pieces themselves are good, though). The upshot of the study is that humans lack a stretch of non-coding DNA, which in chimpanzees (or chimp-ified mice) promotes embryonic development of the lateral toes and a big toe muscle. This may be a genetic basis for at least some aspects of our unique feet that have evolved under natural selection for walking on two legs.

But the headlines misrepresent this result, with words like “led to,” “allowed,” and “caused,” especially when these are followed by “big toe” or “upright walking.” hCONDEL.306 doesn’t really have anything to the big toe bone itself, although it might relate to a muscle affecting our big toe. The only sense in which the “Gene tweak led to humans’ big toe” (first title above) is that hCONDEL.306 might be responsible for our short lateral toes, which make our first toe look big by comparison. The other headlines are misleading since we know from fossil evidence that hominins walked upright long before we have evidence for short toes:

These little piggies get none. Fourth toe bones of living apes and humans (left) and possible hominins from 3-5 million years ago (right).

These little piggies get none. Fourth toe bones of living apes and humans (left) and (probable) hominins from 3-5 million years ago (right). I did my best to get all images to scale.

“Epigenetic,” from the fourth article headline, is simply wrong. Modern day epigenetics is a field concerned with the chemical alterations to the structure of DNA. Even the broad concept of epigenetic as originally devised by Conrad Waddington was about how environments (cellular or outside the body) influence development.

ResearchBlogging.orgIt’s hard to fit all the important and interesting information from scientific papers into news headlines. Still, it would be good if headlines more accurately portrayed scientific findings, especially avoiding such definitive verbs as “caused.” Especially in the realm of biology, people should know that there’s a lot that we still don’t know, that there’s lots more important work left to be done.

References

Aiello and Dean, 2002. Human Evolutionary Anatomy. Academic Press.

Capra et al., 2013. Many human accelerated regions are developmental enhancers. Philosophical Transactions of the Royal Society B 368: 20130025.

Indjeian et al. 2016. Evolving new skeletal traits by cis-regulatory changes in bone morphogenetic proteins. Cell http://dx.doi.org/10.1016/j.cell.2015.12.007

King and Wilson, 1975. Evolution at two levels in humans and chimpanzees. Science 188: 107-116 DOI: 10.1126/science.1090005

McLean et al., 2011. Human-specific loss of regulatory DNA and the evolution of human-specific traits. Nature 471: 216-219.

Prabhakar et al., 2008. Human-specific gain of function in a developmental enhancer. Science 321: 1346-1350.

Bioanthro lab activity: Estimating Miocene ape body mass

We’ve arrived at the Planet of the Apes, also known as the Miocene, in my “Bones, Stones and Genomes” course. The living apes are but a small remnant of what was a pretty successful radiation starting around 20 million years ago. There were so many apes that it can be a bit confusing for students, but it’s important for setting up the biological and ecological contexts of hominin origins.

Possible evolutionary relationships of myriad Miocene apes and subsequent hominins. From Harrison (2010)

Possible evolutionary relationships of myriad Miocene apes and subsequent hominins. From Harrison (2010)

This week also marks my students’ first lab assignment, analyzing CT scans of bones. Here, we looked at how we estimate body size in extinct animals, using the KUPRI database and the free CT analysis software InVesalius. Because some of the KUPRI primates have body masses recorded, students can examine the relationship between animals’ weight and skeletal dimensions. The purpose of the assignment is to help familiarize students with skeletal anatomy, CT data and principles of linear regression.

One of the KUPRI specimens, an old female gorilla, with known weight.

One of the KUPRI specimens, an old female gorilla, with known weight.

I selected a few specimens for students to examine. After students download the massive files, they can load them into InVesalius for analysis. This program allows students to easily identify bone versus other tissues, and to create a 3D surface rendering of a highlighted region (tissue) of interest.

A grivet, Chlorocebus aethiops, with bone highlighted in 2D sections and as a 3D model.

A grivet, Chlorocebus aethiops, with bone highlighted in 2D sections and as a 3D model. This little guy weighs only 4 kg!

It’s pretty easy to take simple linear measurements (and angles), assuming students can get oriented within the skeleton and identify the features they need to measure. It can be a little tricky to measure a femur head if it’s still in the acetabulum (below). Luckily, InVesalius lets you take measurements on both 2D slices or the 3D volume.

Let's measure that femur head diameter.

Let’s measure that femur head diameter.

So students do this for a few specimens and enter the data into Excel, which can then easily plot the data and provide a regression equation. They then use this equation to estimate masses of the specimens – if there’s a good relationship between mass and skeletal measures, then the estimates should be close to the observed values. Students use their equation to predict body mass of some Miocene apes based on femur head diameter and femur midshaft diameter, noting how confident they feel in their estimates given how well their regression performed on the training dataset. They also compare their mass estimates to those using another equation generated by Christopher Ruff (2003).

It might be a little intense for students totally unfamiliar with apes, bones and CT scans, but it should be a good way for them to learn lots of concepts we’ll revisit over the semester.

Here’s the lab assignment, in case you want to use it in your own class: Lab 1-Miocene masses

Antiquity of Laughter

There’s a quick blurb in ScienceNOW about a study showing that great ape tots laugh when tickled–hey, just like us! And for all the cuteoverload-lovers (Dana), the story also has footage of an orangutan being tickled.

In the study, researchers tickled baby apes and recorded their responses. The acoustics of the laughs were then compared to humans-being-tickled laughs. The results indicate that tickle-induced laughter in humans, chimpanzees, gorillas, and orangutans is homologous, that is it has the same evolutionary origin. [A siamang (essentially a large gibbon) was also included in the study, and while its response to tickling was similar to the orangutans’, it somehow did not display full-fledged laughter]. Nevertheless, the quite vocal human laugh is distinct from the apes’ laugh. Quite probably the difference in vocalization is related to the fact that humans speak and apes don’t.

In the ScienceNOW states that the study “challenges the notion that exhaled and voiced laughter are ‘a uniquely human trait'” (me quoting the commentary, which quotes the lead author of the study). I immediately cringe when I hear/read the phrase “challenge(s) the notion,” or often, “widely-held notion.” How trite. But I do think it is an interesting study (not like the one wherein they fed cooked foods to great apes…). For starters, researchers can begin to look into why exactly the acoustic patterns differ between humans and apes.

But more importantly, it opens the issue of why humans and animals laugh when tickled. Being tickled is an interesting feeling, because even though it makes you laugh, it also makes you uncomfortable and vulnerable–no one when tickled exclaims, “yes, keep tickling me!” (I’ve even heard urban legends of people wetting themselves when tickled). Unless tickle-laughter is a secondary result of selection on other things, I would imagine that the phenomenon evolved because of its value in social interactions–interactions which the study suggests are as old as the great apes.

"Spring" Break TV

Spring break, even if it takes place in February, is not a time for being productive. I took this to heart last week as I caught up on zoning out in front of the TV. But it wasn’t all Sabrina the Teenage Witch reruns for this girl: I also caught bits and pieces of two fairly interesting Nova episodes on PBS, “The Four-Winged Dinosaur” and “Ape Genius”.

“The Four-Winged Dinosaur”
I’ll admit, I’m not as fascinated by dinosaurs as some in this lab, so this episode did not hold my interest for the entire hour. However, I came in toward the end and was fascinated to discover that amidst scenes from “Jurassic Park”, they were interviewing a real scientist who actually is trying to breed dinosaurs! The entire episode (or so I gathered) looked at how birds evolved from dinosaurs. They took a bird embryo, and injected it with a virus that would attack the DNA and turn on previously turned off genes, including one that apparently coded for the bird to grow teeth in its beak. But the bird embryo with a beak-full of teeth was not the coolest part. Next they tried to create an emu-asaurus! They didn’t actually manage this, but the Nova voice-over talked us through the technique of how it could be possible to turn an emu egg into an emu-like dinosaur. To quote a friend, “haven’t they seen Jurassic Park? Don’t they know how that turns out??” All I know, is that if they ever manage to recreate dinosaurs, they should avoid breeding raptors – those guys in the movie are SCARY!

“Ape Genius”
This episode aired a while ago, but unfortunately I missed it the first time around. Thank god for reruns! This episode, which I actually watched most of, looked at what apes were and were not capable of doing in terms of communicating, learning, and working together (all those traits people try to describe as culture). I don’t have any profound conclusions about this episode, but I found a number of the experiments they did interesting and will describe a few of them here.

  • Will two chimps work together to get and then share food? The animals had to both pull a string at the same time to get a long plate of food close enough to their cages to eat. Results: if the food was split already, the chimps would work together and each take their share. If the food was not split up, the chimps would usually start fighting and not get the food close enough to reach. If the apes were bonobos, they worked together and shared their food without problems.
  • Do chimps understand the value of an M&M? A trainer puts 7 M&Ms in one bowl and 2 in another, and whichever bowl the chimp points to, a second chimp gets those M&Ms. The first chimp gets the bowl he doesn’t point to. Results: Even after multiple trials, the chimp still points first to the bowl with the most M&Ms, and thus does not get them.
  • Do human children understand the value of a gummy bear? Similar to the above test, in this one an adult explains to a 4-year-old that the one gummy bear in front of them is theirs to eat, but if they wait until the adult leaves and comes back, then they get the entire package of gummy bears. In most cases, the child ate the one gummy bear and did not get the package (these tapes were adorable to watch, by the way).
  • Do chimps understand numbers? A chimp is taught, using dots, the numbers 1-9. Then the previous chimp experiment (the one with the M&Ms) is repeated using numbers instead of M&Ms (introducing a symbolic element). In this case, the chimp learns to point to the lower number, and thus receives more M&Ms. However, the voice-over points out that chimps in the wild do not develop symbols on their own, they are just able to understand some of them when humans teach them.
  • Will bonobos protect or share outside of their own family group? A dead bonobo that is a stranger to a group of live bonobos is placed in the live bonobos’ habitat. Humans with long poles use the sticks to “attack” the dead bonobo. Result: the live bonobos shriek and try to protect the dead bonobo from the offending poles, even though they did not know the bonobo in life.

These were just a few of the interesting experiments compiled in this episode. If you ever catch the rerun of either of these, they might be worth checking out! Next up, a post about all the crappy TV I also watched over break… or maybe I’ll just keep that to myself.