Video Tutorial: editing R plots in Adobe Illustrator

Adobe Illustrator is a powerful tool for creating and editing figures; unfortunately, it’s also really intimidating. So today at The Molecular Ecologist we’re trying something a little different: a screen-capture video tutorial about using Adobe Illustrator to enhance and edit plots that you make in R.

If you want to follow along with the full 13.75 minute tutorial, you can download the example PDF plots by clicking these links: Phylogeny and Scatterplot.

Video contents:

0:10-1:25: Saving plots to PDF in R

1:25-8:07: Editing a phylogeny

8:07-10:27: Editing a scatterplot

10:27-13:45: Combining and finalizing the figures

This video barely scratches the surface of what you can do with Adobe Illustrator, but hopefully it helps you get started. Happy Illustrating!

Posted in howto, R | Tagged , , , , , , , , | 2 Comments

Gene expression shows how a plant and its mutualists are better together

Medicago truncatula, in its model-organism habitat. (Flickr: Jeremy Yoder)

Medicago truncatula in its model-organism habitat. (Flickr: Jeremy Yoder)

No living thing is an island, and many of the encounters between living things that happen every day are not antagonistic or even indifferent, but mutually beneficial. Two such mutualisms that could be among the most important on the planet are the relationships plants have with nitrogen-fixing bacteria and mycorrhizal fungi. Rhizobial bacteria convert nitrogen from the biologically inaccessible form that makes up a large fraction of the atmosphere to a chemical compound plants can use to build amino acids; mycorrhizal fungi collect rare soil nutrients and water from sources a plant can’t access, like leaf litter. Many plants allow either rhizobia or mycorrhizae — or both — to colonize their roots, and feed them sugar in exchange for the nutrients they provide.

The possiblity of hosting both these relatively simple mutualists opens up interesting options — do they help each other, or compete for their hosts’ favor? How does a plant juggle both bacteria and fungus? One such plant is Medicago truncatula or barrel medick, a small, weedy relative of alfalfa that grows really well in greenhouses, and has become a “model species” for studying mutualism. A recent paper in Molecular Ecology examines how the “tripartite” relationship affects the activity of genes in the host plant.

Continue reading

Posted in microbiology, next generation sequencing, plants, RNAseq | Tagged , , | Leave a comment

Conifer convergence

Convergent local adaptation is typically studied within a species or between closely related species. In these cases, it is perhaps not unexpected to observe parallel evolution due to common genetic variation, constraints, etc. Convergence between species is somewhat less studied, especially when complex polygenic traits are considered. Are similar genes required for different species to adapt to similar environments? That is, is adaptation genetically constrained?

To address this question (link to paper), Sam Yeaman and colleagues involved with the AdapTree project focused on two tree species from western North America, lodgepole pine and interior spruce. These species are about 140 million years diverged but occupy similar environmental clines and consist of locally adapted populations throughout their ranges.

It is known that these species show local adaptation to their environment, but are the underlying genetic adaptations convergent? To address this, the authors grew > 1100 individuals from 250 populations across the range of both species in a greenhouse. These individuals were phenotyped for 17 climate related traits. They were genotyped for > 1 million SNPs in 23,000 genes and genotype-phenotype and genotype-environment associations (for 22 environmental variables) were conducted. These associations identified outliers, and the authors looked at specific genes, identifying which had the highest proportion of their total SNPs as outliers. They then looked for signals of adaptation in the orthologs of these outliers in the other species.

For a false discovery rate (FDR) of 0.05, 47 genes showed evidence for convergence. That is, about 10-18% of locally adapted genes are evolving convergently (depending on the FDR used). I really don’t have a sense about whether this is high or low… if anyone has thoughts, please weigh in. Another interesting finding is that duplicated genes were more likely to show convergence than unduplicated genes (see figure). This pattern may be explained by a relaxation of selective constraint following duplication.


Candidate genes with signatures of convergent local adaptation. From Yeaman et al., 2016

I like this study for a number of reasons. First, the authors are explicitly looking for convergence in distantly related species. This allows them to address the degree of convergence in adaptive evolution in species that should share no standing genetic variation. Second, they asked this question in regard to complex physiological traits. This is nice because many previous examples of convergence between species have been found in relatively simple traits (I’m looking at you, MC1R). Now, we just need other people to perform similar studies so we can figure out if these rates of convergence are consistent across taxa and phenotypes.


Yeaman, Sam, Kathryn A. Hodgins, Katie E. Lotterhos, Haktan Suren, Simon Nadeau, Jon C. Degner, Kristin A. Nurkowski et al. “Convergent local adaptation to climate in distantly related conifers.” Science 353, no. 6306 (2016): 1431-1433. DOI: 10.1126/science.aaf7812

Posted in adaptation, association genetics, genomics, plants, selection, Uncategorized | Tagged , , | Leave a comment

It’s not the size that counts: teeny tiny SAR11 bacteria play a big role in our oceans

Microbes account for a huge chunk of the diversity on this planet, are essential in all sorts of biogeochemical processes, and we are still figuring out how everything is related. Teeny tiny bacterial cells are abundant both on land as well in the ocean, which (let’s be real) are less well explored than the surface of Mars. The oceans cover more than 70% of the planet and are not at all a homogeneous habitat. In fact, they encompass regions known as oxygen minimum zones (OMZs), where (as you might guess) oxygen is below the level of detection.

slide1In areas in the ocean where water circulation isn’t very strong and productivity is high, the oxygen is nearly completely used up from about 100 to 1000 meters depth. These oxygen deplete areas are important since they are indicators signaling changes in ocean temperature and pH and they occur naturally. Global climate, however, change can affect the expansion of these OMZs.

Continue reading

Posted in adaptation, community ecology, evolution, metagenomics, microbiology | Tagged , , , , , | Leave a comment

The tarsier’s nuclear genome comes with a bonus mitochodrial genome

A tarsier, looking as shocked as we are.(Fickr: Keren Tan)

A tarsier, looking as shocked as we are. (Fickr: Keren Tan)

This week Nature Communications published a paper presenting a new genome assembly for Tarsius syrichta, the Phillipine tarsier. Tarsiers are the subject of one of the best of Ze Frank’s “True Facts” videos, and they occupy an interesting place in the family tree of primates — their common ancestor with humans pre-dates the common ancestor of monkeys and apes, but post-dates the divergence of the group that includes lemurs and lorises, the Strepsirrhini. This phylogenetic position doesn’t mean that tarsiers are a transitional form between (say) lemurs and gorillas, they do have traits that are considered distinctive to both groups, and a tarsier genome sequence helps to understand evolutionary change across the primates.

The genome turns out to have a lot of what we casually call junk. Long and short interspersed elements (LINEs and SINEs) account for over 31% of the new genome assembly, and the paper’s authors invent the term “tarsier intersperesed elements” (TINEs) for repetive sequence elements unique to the tarsier genome. They also found sequences that were likely transferred from the mitochondrial genome, the set of genetic code inside the mitochondria of every cell. This is a common enough phenomenon in eukaryotes — but one of the ones in the tarsier genome comprises the entire, contiguous mitochondrial genome sequence.

(Schmitz et al. 2016: Figure 4)

Alignment of a 17,866bp-long region of tarsier nuclear DNA sequence against the nuclear genome, with Southern blog images inset. (Schmitz et al. 2016: Figure 4)

The authors suggest that some ancestral tarsier’s nucleus didn’t swallow the mitochondrial genome in one gulp, so to speak, but that this represents a sort of assembly over time — mutiple fragments transferred separately, then brought together by recombination. (It is not clear to me that the former is more parsimonious than the latter.) Although they go to some additional effort to validate the whole-mitochondrial-genome sequence with a Southern blot, the authors do not evaluate whether any of it is expressed — that’s probably a whole different paper. They do point out that the duplication provides a kind of interesting experiment in molecular evolution:

We contend that this unique tarsier event offers a new perspective in comparing the evolutionary changes between the rapidly changing mitochondrial DNA and slowly changing nuclear sequences, both originating from the same source but evolving under very different selective constraints.

All in all, there’s every reason to think this reference genome has laid the groundwork for some very cool science yet to come. Maybe Ze Frank can do a sequel?


Perelman P, Johnson WE, Roos C, Seuanez HN, Horvath JE, et al. 2011. A molecular phylogeny of living primates. PLOS Genetics 7(3): e1001342. doi: 10.1371/journal.pgen.1001342

Richly, E. and D. Leister. 2004. NUMTs in sequenced eukaryotic genomes. Molecular Biology and Evolution 21: 1081-1084. doi: 10.1093/molbev/msh110

Schmitz, J. et al. 2016. Genome sequence of the basal haplorrhine primate Tarsius syrichta reveals unusual insertions. Nature Communications 7: 12997 doi: 10.1038/ncomms12997

Posted in evolution, genomics, natural history | Tagged , , | Leave a comment

The Hidden History of Kiwi Diversification

Of the millions of Earth’s species that likely remain to be described, a majority is thought to be invertebrates, plants, fungi, or microbes. Nevertheless, the pace of species description in some vertebrate groups has not slackened over the past few decades. This hidden vertebrate diversity is surprising because it resides in the clades with which scientists and society are most familiar. It also speaks (at least in part) to the challenges of finding species boundaries in morphologically conserved taxa, wherein traditional characters provide few clues to true taxonomic diversity.

Besides an increasing amount of sequence data, recent progress in species delimitation is also being fueled by coalescent-based methods for modeling population histories. A new paper by Jason Weir et al. brings some of those tools to bear in attempting to resolve diversity and diversification of the kiwis (Order Apterygiformes, Genus Apteryx). Kiwi are flightless, morphologically conservative, forest-dwelling birds endemic to New Zealand (Fig. 1). Along with their ratite relatives, they are the conspicuous outgroup to all other birds. Any new species of apterygiform would therefore represent particularly disproportionate increases in global avian diversity. However, the systematics and phylogegography of kiwi have rarely been addressed with molecular data.

Left: Species tree of genus Apteryx inferred from 1,000 SNPs, with 11 major lineages colored (Weir et al. 2016, PNAS). Right: photo of a juvenile brown kiwi (Apteryx mantelli; photo courtesy of (

Fig. 1. Left: Species tree of Apteryx inferred from 1,000 SNPs, with 11 major lineages colored (Weir et al. 2016, PNAS). Right: photo of a juvenile brown kiwi (Apteryx mantelli; courtesy of

Weir et al. sampled 2 mitochondrial regions and >5kb of the nuclear genome (using a genotype-by-sequencing approach) of kiwi across their range. Species delimitation in BPP (Yang and Rannala 2010) supported existence of 16-17 Holocene lineages of kiwi, 11 of which are still extant (currently, only 5 species are recognized (!)). At least some of these lineages represent incipient species. Still, regardless of whether these lineages are best recognized at the specific or subspecific level, their conserved anatomy and plumage have resulted in them being overlooked by systematists for decades.

Most of Weir et al.’s paper is focused on contextualizing such high levels of cryptic diversity within a fresh phylogenetic framework. By taking a coalescent-based dating approach, they find a massive upturn in kiwi diversification rates over the past 780,000 years. This is coincident with the most severe of Pleistocene glacial periods, which also induced mountain glaciation in across New Zealand. It disagrees, however, with the hypothesis of some workers that recent bird diversification has been minimally affected by climatic cycling.

Fig. 2. Estimated effective population sizes of 11 extant lineages of kiwi over the last glacial/interglacial cycle. (Fig. 4 from Weir et al. 2016, PNAS)

Fig. 2. Estimated effective population sizes of 11 extant lineages of kiwi over the last glacial/interglacial cycle. (Fig. 4 from Weir et al. 2016, PNAS)

Weir et al. argue convincingly that kiwi underwent significant, recent diversification in allopatry – primarily as a result of Pleistocene climate and environmental change. This narrative is supported by the known geological history of the islands, the fossil record, and coalescent-based effective population size estimates (all lineages except 1 experienced strong late Pleistocene bottlenecks; Fig. 2). As the methods used by Weir et al. continue to be combined with genomic-scale data, expect hidden histories of diversification in other morphologically cryptic clades to be exposed.



Weir, J.T., Haddrath, O., Robertson, H.A., Colbourne, R.M., Baker, A.J. (2016). Explosive ice age diversification of kiwi. PNAS E5580–E5587. doi:10.1073/pnas.1603795113

Yang, Z., Rannala, B. (2010). Bayesian species delimitation using multilocus sequence data. PNAS 107, 9264–9269. doi:10.1073/pnas.0913022107

Posted in genomics, phylogenetics, phylogeography, species delimitation, Uncategorized | Leave a comment

Visualizing the evolution of bacterial resistance

You have probably already seen this. It’s pretty amazing and beautiful and I watched it more than once (although I won’t say how many times….). If by some chance you didn’t catch this fantastic video, don’t fret, I’m here to make sure you don’t miss it.

Baym et al., 2016. Supplemental Figure 3A.

A hot topic lately, specifically related to microbial evolution, is studying the development of antibiotic resistance in strains of bacteria that are involved in human related diseases. Because, as we know, we are totally surrounded by / colonized by / helped (and sometimes) hurt by the microbial world that we live in.

Continue reading

Posted in adaptation, evolution, mutation | Tagged , , | Leave a comment