Biol375 2016

From QiuLab
Jump to navigation Jump to search
Molecular Evolution (BIOL 375.00/790.64/793.03, Fall 2016)
Instructor: Dr Weigang Qiu, Associate Professor, Department of Biological Sciences
Room: 926 HN (Seminar Room, North Building)
Hours: Mon. & Thur 4:10-5:25 pm
Office Hours: Belfer Research Building (Google Map) BB-402; Wed 5-7 pm or by appointment
Course Website:


Course Description

Molecular evolution is the study of the change of DNA and protein sequences through time. Theories and techniques of molecular evolution are widely used in species classification, biodiversity studies, comparative genomics, and molecular epidemiology. Contents of the course include:

  • Population genetics, which is a theoretical framework for understanding mechanisms of sequence evolution through mutation, recombination, gene duplication, genetic drift, and natural selection.
  • Molecular systematics, which introduces statistical models of sequence evolution and methods for reconstructing species phylogeny.
  • Bioinformatics, which provides hands-on training on data acquisition and the use of software tools for phylogenetic analyses.

This 3-credit course is designed for upper-level biology-major undergraduates. Hunter pre-requisites are BIOL203, and MATH150 or STAT113.

Please note that starting from fall 2015, completing this course no longer counts towards research credits for biology majors.


  • (Required) Graur, 2016, Molecular and Genome Evolution, First Edition, Sinauer Associates, Inc. ISBN: 978-1-60535-469-9. Publisher's Website (Student discount: a 15% discount and receive free UPS standard shipping)

  • (Recommended) Baum & Smith, 2013. Tree Thinking: an Introduction to Phylogenetic Biology, Roberts & Company Publishers, Inc.

Learning Goals

  • Be able to describe evolutionary relationships using phylogenetic trees
  • Be able to use web-based as well as stand-alone software to infer phylogenetic trees
  • Understand mechanisms of DNA sequence evolution
  • Understand algorithms for building phylogenetic trees

Links for phylogenetic tools

Exams & Grading

  • Attendance (or a note in case of absence) is required. Bonus for active participation in classroom discussions.
  • Assignments. All assignments should be handed in as hard copies only. Email submission will not be accepted. Late submissions will receive 10% deduction (of the total grade) per day.
  • Three Mid-term Exams (30 pts each)
  • Comprehensive Final Exam (50 pts)

Academic Honesty

While students may work in groups and help each other for assignments, duplicated answers in assignments will be flagged and investigated as possible acts of academic dishonesty. To avoid being investigated as such, do NOT copy anyone else's work, or let others copy your work. At the least, rephrase using your own words. Note that the same rule applies regarding the use of textbook and online resources: copied sentences are not acceptable and will be considered plagiarism.

Hunter College regards acts of academic dishonesty (e.g., plagiarism, cheating on examinations, obtaining unfair advantage, and falsification of records and official documents) as serious offenses against the values of intellectual honesty. The College is committed to enforcing the CUNY Policy on Academic Integrity and will pursue cases of academic dishonesty according to the Hunter College Academic Integrity Procedures.

Course Schedule

Part 1. Tree Thinking

  • 8/25 (TH). Overview & Introduction. Textbook Chapter: "Introduction" (pages 1-3)
Assignment 1 (10 pts; Due: 8/29, Monday)
Pre-test: Full credits will be given as long as each question is answered with some reasoning. In other words, it will NOT be graded on being right or wrong. It's an assessment tool, to be compared with later test outcomes to show teaching/learning results.
  • 8/29 (M). Introduction (Continued). Tutorial: R & R-Studio (Bring your own computer). Lecture slides:
  • 9/1 (TH). Intro to trees. In-class exercise 1.
Assignment 2 (10 pts; Due: 9/8, Thursday)
Watch Origin of Species: Lizards in an Evolutionary Tree. Provide short answer (1-3 sentences) to each of the following three questions.
  1. What are the two hypotheses explaining the origin of different ecomorphs of lizards on Caribbean Islands?
  2. What is the expected phylogeny under each hypothesis?
  3. Which hypothesis is supported by the phylogeny of actual DNA sequences?
R exercises
  1. Install R & R-studio (see "Links for phylogenetic tools" above)
  2. Open R-studio and install the "ape" package using the "Packages"->"Install" menu, located within the lower right window
  3. Type in the console window (lower left) the following commands (one at a time, wait for the prompt ">" to appear before proceed to the next command; quit & restart R-studio if stuck):
    1. library(ape)
    2. tr = read.tree(text = "(monkey:0.09672,((tarsier:0.18996,lemur:0.14790)0.999:0.09005,(macaque:0.18524,(gibbon:0.10388,(orang-utan:0.09481,(human:0.03391,(gorilla:0.06135,chimpanzee:0.05141):0.01580)0.316:0.05381)1.000:0.03019)0.978:0.05616)0.997:0.05042)0.965:0.09672);")
    3. plot(tr)
  4. Export the tree graph using the "Export->Save as PDF or Save as Image" menu in the lower right window
  5. Exit R studio by typing the command "q()" and type "y" to answer the question for saving the R session
  6. Copy & paste the tree image into your document to be handed in
  • 9/5 (M). Labor Day. No class
  • 9/8 (TH). Intro to trees. In-class exercise 2. Textbook Chapter 5: "Molecular Phylogenetics" (pages 170-175; 201-202)
  • 9/12 (M). Species Tree & Lineage Sorting. Textbook Chapter 5: "Molecular Phylogenetics" (pages 177-180)
Assignment 3 (10 pts; Due: 9/19, Monday)
R exercises
  1. Download this file & save it in a file folder you could find (e.g., /Users/john/Documents/ for Apple, and C:/Users/john/Documents/ for Windows): . This is an alignment of mitochondrial DNA sequences from primate species, Do not attempt to open or modify it, which may render it un-readable by R. If this happens, delete & re-download.
  2. Open R-studio and install the "phangorn" package (see Assignment 2 for how to install packages)
  3. Run the following commands:
    1. getwd() (this is to show your working directory, from which R-studio could read file)
    2. setwd("/Users/john/Documents") (to set the working directory to where you saved your mt_primate.txt file)
    3. library(ape) (this is to load the ape library)
    4. mt = read.FASTA("mt_primate.txt") (to read the alignment and save it in an object called "mt")
    5. mt (to show result, copy & paste into your report)
    6. = dist.dna(mt) (to obtain a pair-wise distance matrix)
    7. dist.raw = dist.dna(mt, model = "raw") (to obtain raw, un-corrected pair-wise sequence differences, in fractions)
    8. dist.raw * 888 (888 is the length of aligned DNA bases, to show raw counts of base differences; copy & paste into your report)
    9. = bionj( ( to create a tree based on the pairwise distance matrix)
    10. plot( (to show tree; Export and save tree image)
    11. library(phangorn)
    12. tr.mid = midpoint( (this creates a midpoint-rooted tree)
    13. plot(tr.mid) (Export and save tree image)
    14. q() (to quit and save your R session, to your working directory)
  4. Answer the questions:
    1. Summarize, with your own complete sentences, the key steps you have taken to obtain a tree from sequences.
    2. Define "monophyly"
    3. Illustrating with your tree (by labeling ancestral nodes and groups of species), explain why "ape" excluding "human" does not constitute a monophyletic group.
  • 9/15 (TH). Consensus Tree & Review. Chapter 5. pages 199-200 (Figure 5.31) Lecture Slides:
  • 9/19 (M). 4:10 - 5:10pm Midterm Exam I Bring pencils, erasers, and a calculator

Part 2. Trait & Sequence Evolution

  • 9/22 (Th). Traits & trait matrix
    • Textbook Chapter 5, pages 180-183
Assignment #4 (10 pts; Due Thursday, 9/29)
  1. Download or Copy/Paste the lizard DNA sequences to your own computer and save the file as "lizard.txt"
  2. Align the DNA sequences using this website and save the aligned DNA file ("Output->Alignment in Fasta format") as "lizard-aligned.txt" (No need to print or submit the above two DNA sequence files; save them for next week's assignment)
  3. Based on the lizard card, construct a character-state matrix for all lizard species. For each species, list its character state for each of the following two characters (as columns): (1) Geographic origin, and (2) Habitat. Re-watch the video may help this assignment. Hint: use Excel & hand in a printout of your Excel sheet.
  • 9/26 (M). Homoplasy & consistency
  • 9/29 (Th). Parsimony reconstruction (Chapter 5).
    • Textbook Chapter 5, pages 188-191
    • In-Class Exercise 4
  • 10/3 (No class)
  • 10/6 (TH). Genome & gene structure (Chapter 3)
    • In-Class Exercise 5. Pretest Part 2 (molecular phylogenetics in forensics)
Assignment #5 (10 pts; Due 10/13)
  1. Use the DNA alignment from the last assignment to build a tree of Anolis species.
    1. Set working directory to where you have downloaded the DNA alignment file: e.g., setwd("/Users/ann/Document")
    2. Load library: library(ape)
    3. Read alignment: = read.FASTA("lizard-aligned.txt")
    4. Calculate pairwise distance matrix: = dist.dna(
    5. Estimate tree: = bionj(
    6. Reroot tree: tr.root = root(, outgroup = "Leiocephalus_barahonensis", resolve.root = T)
    7. Save tree: write.tree(tr.root, "rerooted.dnd")
    8. Read re-rooted tree: tr.2 = read.tree("rerooted.dnd")
    9. Download the phenotype file and save it as "pheno.txt"
    10. Read phenotype with the command: ph = read.table("pheno.txt", row.names = 1)
    11. Assign column names: colnames(ph) = c("hab", "geo", "hab_id", "geo_id")
    12. Plot re-rooted tree: plot(tr.2, x.lim = 1, y.lim = 18, show.tip.label = F)
    13. Add species names: text(rep(0.2,17), 1:17, tr.2$tip.label, pos=4, font = 3)
    14. Match species names to tree order: ord = match(tr.2$tip.label, rownames(ph))
    15. Add a column: text(rep(0.5,17), 1:17, ph[ord,1], pos=4, col = ph[ord,3])
    16. Add another column: text(rep(0.7,17), 1:17, ph[ord,2], pos=4, col = ph[ord,4])
    17. Add a heading: text(0.5, 18, "Ecomorph", font = 2, pos=4)
    18. Add another heading: text(0.7, 18, "Geography", font = 2, pos=4)
    19. Export & print two copies (in color, preferably)
  2. On one copy, infer locations (i.e., islands) of all internal nodes using parsimony
  3. On another copy, infer habitats (i.e., ecomorphs) of all ancestors
  4. Based on your reconstructed trait evolution, count the number of character-state changes and calculate consistency index for each trait.
  5. Compare the two consistency indices & explain why the molecular phylogeny supports convergent adaptive evolution to habitats.
  • 10/10 (M). No Class (Columbus Day)
  • 10/13 (Th). Genome and gene evolution. Lecture Slides:
  • 10/17 (M). Review & Practices.
  • 10/20 (Th). Midterm Exam 2

Part 3. Tree Algorithms

  • 10/24 (M). BLAST & Alignments (Chapter 3. pages 93-100)
Assignment #6 (5 pts; Due 10/31)
Based on the NCBI Gene Page for cytochrome C (CYCS), answer the following questions:
  • What is the molecular function of CYCS?
  • Describe its chromosomal location and gene structure (number of introns and exons, length of protein)
  • Click the link "HomoloGene" and then in the section "Pairwise alignments generated using BLAST", run BLAST between Human and Mouse protein sequences. Show BLAST report.
  • Pick another species and generate a BLAST alignment between the Human and this species. Show BLAST report. Explain the meaning of "Expect" by rephrasing from this page
  • 10/27 (TH). Genetic distances & Sequence-evolutionary models (Chapter 3, pages 79-88)
  • 10/31 (M). Maximum parsimony (Chapter 5, pages 191-194). In class exercise #6
Assignment #7 (10 pts; Due 11/7, Monday (Part-3 lecture slides posted below))
  1. [Do NOT use computer for this part] Compare these two Ebola VP30 sequences, one from the 2014 outbreak and the other from the 1994 outbreak.
    1. Calculate the proportion of difference (p) between the two sequences
    2. Calculate Jukes-Cantor distance (d) between the two sequences (specify unit)
    3. Count the number of transitions and transversions (arrange in a table, as we did in the class)
    4. Identify the number of synonymous and nonysynonymous substitutions
    5. Assuming that the total number of synonymous sites S=174 and the total number of nonsynonymous sites N=690, calculate KS and KA (with Jukes-Cantor correction)
  2. [Computer Exercise] Calculate & compare genetic distances among the primate mitochondria sequences using R-Studio
    1. Make sure you have a file "Mt_primate.txt" in your working directory (e.g., "/Users/john/Documents") [Note: Refer back to Assignment #3 if you couldn't locate the file.]
    2. Load library: library(ape)
    3. Read alignment: mt = read.FASTA("Mt_primate.txt")
    4. Calculate raw distance: mt.raw = dist.dna(mt, model = "raw")
    5. Apply Juke-Cantor (one-parameter model) correction: mt.jc = dist.dna(mt, model = "JC")
    6. Apply Kimura(two-parameter model, for Ts and Tv) correction: mt.k80 = dist.dna(mt, model = "K80")
    7. Plot JC distance vs the raw distance: plot(mt.raw, mt.jc, xlab = "uncorrected distance (diff/site)", ylab = "corrected distance (sub/site)", xlim = c(0,0.4), ylim = c(0,0.5), las =1)
    8. Add a 1:1 line: abline(0,1, col = "red")
    9. Add K80 distances: points(mt.raw, mt.k80, pch = 3, col = "blue")
    10. Add a legend: legend(0.05, 0.45, legend = c("JC (1-parameter)", "K80 (2-parameter)"), pch = c(1,3), col = c("black","blue"), bty = "n")
    11. Export an PDF and print a copy
    12. Use the graph to explain (1) Why it is necessary to correct for raw distances when comparing sequences from distantly related species; (2) What is the key difference between the K80 and JC models
  • 11/3 (TH). Distance methods (Chapter 5, pages 184-187). Lecture Slides:
  • 11/7 (M). Likelihood & Bayesian methods (Chapter 5, pages 194-198)
Assignment #8 (10 pts; Due 11/14, Monday)
  1. Comparison of distance and parsimony trees (review previous assignments for detailed R-Studio instructions)
    1. In R studio, load the "ape" and "phangnorm" libraries
    2. Read the "Mt_primate.txt" file, save as "aln"
    3. Obtain a distance tree:
      1. Calculate K80 distance matrix, save as "mt.dist"
      2. Obtain a neighbor-joining tree: tree.nj = NJ(mt.dist)
      3. Plot a midpoint rooted tree: plot(midpoint(tree.nj))
      4. Add a scale bar:
      5. Print tree and answer this question: what does the distance represent? What is the unit?
    4. Obtain a maximum parsimony tree
      1. Convert object to a different class: aln.phy = as.phyDat(aln)
      2. Search maximum parsimony = optim.parsimony(tree.nj, aln.phy)
      3. Get tree distance: = acctran(, aln.phy)
      4. Plot tree: plot(midpoint(
      5. Add a scale bar:
      6. Print tree and answer the question: what does the distance represent? What is the unit?
    5. Compare the two trees and explain the differences in these two methods: Which one uses full sequence information and why?
  2. Bootstrap analysis
    1. Read alignment: aln.fas = read.dna("Mt_primate.txt", format = "fasta")
    2. Create a function for re-rooted distance tree: f = function(x) root(nj(dist.dna(x)), outgroup = c("lemur", "tarsier"), resolve.root = T)
    3. Calculate a tree: tr = f(aln.fas)
    4. Perform bootstrap for 100 pseudo-replicates: boot.trees = boot.phylo(tr, aln.fas, f, B=100, rooted =T)
    5. Plot tree: plot(tr, no.margin = T)
    6. Add bootstrap values as node labels: nodelabels(boot.trees, bg= "white")
    7. Explain (1) Does bootstrap test for tree precision or tree accuracy? (2) What does a bootstrap value of 80% mean?
  • 11/10 (TH). Tree-testing & Review (Chapter 5, pages 207-209). Lecture slides: to be posted
  • 11/14 (M). Midterm Exam 3

Part 4. Population Genetics (Chapter 2)

  • 11/17 (Th). Mechanism of molecular evolution: Overview (pages 35-38)
  • 11/21 (Mon). SNP statistics & Genetic Drift (pages 47-49)
Assignment #9 (10 pts; Due 12/1, Thursday)

The left figure shows a codon alignment of 38 strains of a bacterium, with an outgroup sequence (which starts with a string of SNPs: "", etc), answer the following questions (with the outgroup sequence excluded.) Do not print the figure directly. Hand-copy the sequences to a graph sheet, include only sequences at the two variable codon positions:

  1. There are two SNP sites. For each SNP, determine whether it is a synonymous or nonsynonymous change (could be both if more than 2 states). You may simply list the codons and their corresponding amino acids, at each aligned codon site.
  2. Calculate allele frequencies at each SNP site (for 3 SNP states, calculate frequencies of all three separately)
  3. List all haplotypes using the 2 SNP sites
  4. Calculate frequencies of all haplotypes
  5. Using the outgroup sequence, determine the ancestral and derived SNP, codon, and amino-acid states at each codon site. Explain with a tree including the outgroup sequence.
  • 11/28 (M). Neutral Theory & Molecular Clock (pages 58-59; 72-74)
  • 12/1 (TH). Tests of Natural Selection
Assignment # (10 pts; Due 12/8, Thursday)
Statistical experiments to explore gene-frequency change due to genetic drift:
  1. With R-studio, make two populations of N=1000 haploid individuals consisting of alleles "A" and "G" at a SNP site: pop1 = c(rep("A",500), rep("G",500)); pop2 = c(rep("A",100), rep("G",900))
  2. Count alleles in each population: table(pop1); table(pop2). Which population is more diverse? Why?
  3. Define a function to calculate heterozygosity: hg = function(x) {cts = table(x); total=sum(cts); if (length(cts)==1) {return(0) } else { freq1=cts[1]/total; freq2=cts[2]/total; return(1-(freq1^2+freq2^2)) } }
  4. Calculate heterozygosity of each population: hg(pop1); hg(pop2). The results should match your answer to the 2nd question.
  5. Permute population 1 and take a random sample of 100 individuals: pop1=sample(pop1); s = sample(pop1, 100); counts=table(s); heterozygosity = hg(s). Is the sample more or less diverse than the original population? Repeat 10 times and report all counts and diversity (e.g., with a table)
  6. Repeat the above with a smaller sample of 10 individuals
  7. Repeat with population 2 and a sample of 100 individuals
  8. Repeat the above with a smaller sample of 10 individuals
  9. Define "genetic diversity" verbally (+2 pts for giving and using formula for calculating heterozygosity). Answer: Heterozygosity is the probability that two randomly picked alleles are different
  10. Define "genetic drift". Using results from the above four statistical experiments, discuss the effect of genetic drift to genetic diversity within population. What's the general trend (increase or decrease) of genetic diversity as a result of random sampling of gametes? Is the gain or loss of genetic diversity due to genetic drift more rapid in small or large population (contrasting results with different sample sizes)? Genetic drift is random, non-selective fluctuation of allele frequencies due to random gamete sampling in a finite population. Genetic drift reduces genetic diversity within a population and increases genetic divergence between populations. The effect of drift is more pronounced in small populations, as shown by larger frequency variation in a sample of 10 individuals than in a sample of 100 individuals.