Assignment 14

Your name:
Your email address:

In case there is time left, you can work through the identification of sites under diversifying selection (below), or explore mummer plots as an alternative to gene plots (at the end).

MrBayes by example: Identification of sites under positive selection in a protein

Background:

Professor Walter M. Fitch and assistant research biologist Robin M. Bush of UCI's Department of Ecology and Evolutionary Biology, working with researchers at the Centers for Disease Control and Prevention, studied the evolution of a prevalent form of the influenza A virus during an 11-year period from 1986 to 1997. They discovered that viruses having mutations in certain parts of an important viral surface protein were more likely than other strains to spawn future influenza lineages. Human susceptibility to infection depends on immunity gained during past bouts of influenza; thus, new viral mutations are required for new epidemics to occur. Knowing which currently circulating mutant strains are more likely to have successful offspring potentially may help in vaccine strain selection. The researchers' findings appear in the Dec. 3 issue of Science magazine.

Fitch and his fellow researchers followed the evolutionary pattern of the influenza virus, one that involves a never-ending battle between the virus and its host. The human body fights the invading virus by making antibodies against it. The antibodies recognize the shape of proteins on the viral surface. Previous infections only prepare the body to fight viruses with recognizable shapes. Thus, only those viruses that have undergone mutations that change their shape can cause disease. Over time, new strains of the virus continually emerge, spread and produce offspring lineages that undergo further mutations. This process is called antigenic drift. "The cycle goes on and on-new antibodies, new mutants," Fitch said.

The research into the virus' genetic data focused on the evolution of the hemagglutinin gene-the gene that codes for the major influenza surface protein. Fitch and fellow researchers constructed "family trees" for viral strains from 11 consecutive flu seasons. Each branch on the tree represents a new mutant strain of the virus. They found that the viral strains undergoing the greatest number of amino acid changes in specified positions of the hemagglutinin gene were most closely related to future influenza lineages in nine of the 11 flu seasons tested.

By studying the family trees of various flu strains, Fitch said, researchers can attempt to predict the evolution of an influenza virus and thus potentially aid in the development of more effective influenza vaccines.

The research team is currently expanding its work to include all three groups of circulating influenza viruses, hoping that contrasting their evolutionary strategies may lend more insight into the evolution of influenza.

Along with Fitch and Bush, Catherine A. Bender, Kanta Subbarao and Nancy J. Cox of the Centers for Disease Control and Prevention participated in the study.

A talk by Walter Fitch (slides and sound) is here


The goal of this exercise is to detect sites in hemmagglutinin that are under positive selection.

Since the analysis takes a very long time to run (several days), here are the saved results of the MrBayes run: Fitch_HA.nex.p.txt, Fitch_HA.nex.t.txt .

The original data file is flu_data.paup . The dataset is obtained from an article by Yang et al, 2000 . The File used for MrBayes is here


The MrBayes block used to obtain results above is:

begin mrbayes;
set autoclose=yes;
lset nst=2 rates=gamma nucmodel=codon omegavar=Ny98;
mcmcp samplefreq=500 printfreq=500;
mcmc ngen=500000;
sump burnin=50;
sumt burnin=50; end;

Selecting a nucmodel=codon with Omegavar=Ny98 specifies a model in which for every codon the ratio of the rate of non-synonymous to synonymous substitutions is considered. This ratio is called OMEGA. The Ny98 model considers three different omegas, one equal to 1 (no selection, this site is neutral); the second with omega < 1, these sites are under purifying selection; and the third with Omega >1, i.e. these sites are under positive or diversifying selection. (The problem of this model is that the there are only three distinct omegas estimated, and for each site the probability to fall into one of these three classes. If the omega>1 is estimated to be very large, because one site has a large omega, the other sites might not have a high probability to have the same omega, even though they might also be under positive selection. This leads to the site with largest omega to be identified with confidence, the others have more moderate probabilities to be under positive selection).

Note : Version 2.0 of Mr Bayes has a model that estimates omega for each site individually, the new version only allows the Ny98 model as described above..

  1. First, you need to detect how many generations to burn in (meaning the number of samples you will have to discard). Open the file Fitch_HA.nex.p.txt with Excel and plot # of generations versus -LnL values. Determine after how many generations the graph becomes "stationary" (hint: change the Y-axis bounds to "zoom in", e.g., -3300 min to -3200 max). The burnin value is that number of generations divided by 50 (since only every 50th generation was sampled; i.e. the burnin value roughly is equal to the number of rows - not quite because there is a header). To more accurately determine the burnin, you need to rescale the Y-axis (click at the Y-axis -- if you aim accurately, you'll get a box that allows rescaling).
    The result (scatterplot of LogL versus generation) might look like this:


  2. This file contains information for posterior probabilities for each codon (columns) at each sampled generation (rows). Scroll to the right to see these columns, starting with pr+(1,2,3), pr+(4,5,6), etc. Calculate average posterior probability for each site of being under positive selection (Do not forget to exclude first N rows as a burnin; you should have detected value of N in the first question of this exercise - to be clear on where the burnin ends, you might want to highlight the rows representing the burnin and select a different font color. (Use AVERAGE() function of Excel, enter the formula in a cell below the values for the individual generations -- starting in column pr+(1,2,3) -- copy the formula to all columns) (see slides)

  3. Plot average posterior probability vs. site #. (select the row in which you calculated the averages, then click Graph, and select a bar graph). Write down the codon positions for a few sites with the highest posterior probability of being positively selected (the columns name pr+(1,2,3), pr+(4,5,6)....and so on. pr+(1,2,3) mean probability of codon #1 (nucleotide #1, #2 and #3) to be under positive selection))
  1. Determine the 95% credibility interval for the omega<1 value. To do this you sort posterior probability column in ascending order (Select data you want to sort, and go to Data->Sort... ). Again, do not forget to discard the burnin ; the easiest might be to actually delete it.. After sorting, exclude 5% of the data on the top and on the bottom. The range of the remaining data gives you the 90% confidence interval. (Enter answer in box below!)

  2. The structure of hemagglutinin has been crystallized and is publicly available through PDB. Examin the 2VIU.pdb file (here) in chimera. Chain A of the PDB file corresponds to the sequences we did our analysis with (color the molecule according to chain). Below is a comparison of one of the sequences we used for analyses with the sequence for which the structure was determined:



    Using this alignment as a guide, map the site(s) which have the highest probability to belong to the class with omega>1. Where are these sites located in the protein? (Reminders: The position number in the nexus file corresponds to nucleotide sequence, the smoduletructure is based on the amino acid sequence - take the third codon position and divide by 3 to find the amino acid. You only want to be concerned with Chain A!)

    What is the 95% credibility interval for the omega < 1?
    Does this value indicate strong purifying selection?
    Which codon(s) showed signs of positive selection?
    Which position and which amino acid does this correspond to in the above alignment?
    Where is this aa located in the structure?

 

 

Mummer as an easy alternative to study the synteny between two genomes: 

Mummer is a program that finds matching nucleotide sequences, and produces nice plots, similar to the gene plot based one encoded proteins. The difference is that in this case the search is done on the nucleotide level, and that the program keeps track of the + and the - strand. Mummer is installed on the cluster.

Log into xanadu and move to a compute node:
srun --partition=general --qos=general --pty bash (you need to use the student queue and partition)

load MUMmer/4.0.2

module load gnuplot/5.2.2

Download two or more genomes you want to compare. You can browse microbial genomes at NCBI and download chromosomes or genomes (*.fna) files to your computer or use the curl -O command targeting the NCBI FTP site.

For an example you also could download three Haloferax chromosomes

curl -O http://gogarten.uconn.edu/mcb3421_2018/labs/Haloferax_genomes.zip
unzip Haloferax_genomes.zip

Execute the following commands, replacing the genome names with the names of the ones you chose to analyze. 
mummer -maxmatch -b -c Haloferax_gibbonsii_strain_ARA6.fasta Haloferax_mediterranei_ATCC_33500.fasta > gib_med.mums
mummerplot --png --large --prefix=gib_med gib_med.mums

Edit the gp file in a text editor (nano, vi) -- delete tiny and increase size to 4000 4000

gnuplot trap_lact.gp

Download the resulting png file to your computer ....

If your genomes consists of multiple contigs or chromosomes, mummerplot is rescaling the output, so that each contig covers the whole Y axis, which may not be what one is looking for. The plots that only give the best matches look nicer:

nucmer Haloferax_gibbonsii_strain_ARA6.fasta Haloferax_mediterranei_ATCC_33500.fasta
mummerplot out.delta

Modify out.gp in a texteditor to send to gib_med.nucmer.png and
set terminal png size 4000,4000
set output "gib_med_nucmer.png"

Repeat for the other genome comparisons:

nucmer Haloferax_gibbonsii_strain_ARA6.fasta Haloferax_volcanii_DS2.fasta
mummerplot out.delta

Modify out.gp in a texteditor to send to gib_vol.nucmer.png and
set terminal png size 4000,4000
set output "gib_vol_nucmer.png"

If you are interested in details, check the mummer manual at http://mummer.sourceforge.net/manual/#mummer

Example plots are below.

Please describe any interesting findings (include the names of the genomes you compared)

    Finished?

    Type logout to release the compute node from the queue.
    If you you encountered problems in your session, check the queue for abandoned sessions using the command qstat. If there are abandoned sessions under your account, kill them by deleting them from the queue by typing qdel job-ID, e.g. "qdel 40000" would delete Job # 40000

 

Send email to your instructor (and yourself) upon submit
Send email to yourself only upon submit (as a backup)
Show summary upon submit but do not send email to anyone.

 

Mummer comparison betewen Haloferax gibsonii and Haloferax mediterrnei (this plots all similar sequences)

mummer plot

 

Nucmer comparison betewen Haloferax gibsonii and Haloferax mediterranei (this plots only the best matches)

nucmer 1

Nucmer comparison betewen Haloferax gibsonii and Haloferax volcanii

nucmer 3

Nucmer comparison betewen Haloferax mediterranei and Haloferax volcanii

nucmer 4

===================================================

Comparison between Halorubrum trapanicum (Y-axis) and Halorubrum lacusprofundi (X axis) Note that the genomes consist of 1 chromosome and several plasmids. In case of H. lacusprofundi the largest plasmid is considered a chromosome; but its content mainly matches the two plasmids in H. trapanicum. (The beginning of the contigs is maked on the axes with the accession number).

nucmer 5