Difference between revisions of "BIN-ALI-MSA"
m |
m |
||
Line 90: | Line 90: | ||
::'''A - Publication quality plot''' | ::'''A - Publication quality plot''' | ||
− | ::'''A.1''' Create a publication quality figure and figure caption of an MSA of Mbp1 orthologue sequences including MYSPE, that covers the APSES domain only. Produce this as a single page PDF using the msa package <code>msaPrettyPrint()</code> function, and upload to the Student Wiki. | + | :::'''A.1''' Create a publication quality figure and figure caption of an MSA of Mbp1 orthologue sequences including MYSPE, that covers the APSES domain only. Produce this as a single page PDF using the msa package <code>msaPrettyPrint()</code> function, and upload to the Student Wiki. |
− | ::'''A.2''' In your report, document the procedure and discuss how you have chosen the color parameters to illustrate interesting points about the domain. | + | :::'''A.2''' In your report, document the procedure and discuss how you have chosen the color parameters to illustrate interesting points about the domain. |
::'''B - Algorithm Comparison: MAFFT''' | ::'''B - Algorithm Comparison: MAFFT''' | ||
− | ::'''B.1''' At the EBI, produce a MSA of the Mbp1 orthologues of the | + | :::'''B.1''' At the EBI, produce a MSA of the Mbp1 orthologues of the reference species plus MYSPE, using the MAFFT algorithm - a good, general purpose MSA algorithm. |
− | ::'''B.2''' Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings. | + | :::'''B.2''' Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings. |
::'''C - Algorithm Comparison: WebPRANK''' | ::'''C - Algorithm Comparison: WebPRANK''' | ||
− | ::'''C.1''' At the EBI, produce a MSA of the Mbp1 orthologues of the | + | :::'''C.1''' At the EBI, produce a MSA of the Mbp1 orthologues of the reference species plus MYSPE, using the WebPRANK algorithm which has an interesting approach to defining indels from computed phylogenetic relationships. |
− | ::'''C.2''' Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings. | + | :::'''C.2''' Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings. |
::'''D - Algorithm Comparison: PRALINE''' | ::'''D - Algorithm Comparison: PRALINE''' | ||
− | ::'''D.1''' PRALINE reportedly produces some of the best alignments due to its (slow) PSI-BLAST profile pre-processing step, that pulls in additional homologues to increase the information that goes into the alignment. Access the [http://www.ibi.vu.nl/programs/pralinewww/ '''PRALINE Web Server'''] and produce a high-quality MSA of the Mbp1 orthologues of the reference species plus MYSPE. | + | :::'''D.1''' PRALINE reportedly produces some of the best alignments due to its (slow) PSI-BLAST profile pre-processing step, that pulls in additional homologues to increase the information that goes into the alignment. Access the [http://www.ibi.vu.nl/programs/pralinewww/ '''PRALINE Web Server'''] and produce a high-quality MSA of the Mbp1 orthologues of the reference species plus MYSPE. |
− | ::'''D.2''' Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings. | + | :::'''D.2''' Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings. |
::'''E - Algorithm Parameters: MUSCLE''' | ::'''E - Algorithm Parameters: MUSCLE''' | ||
− | ::'''E.1''' MUSCLE has a large number of additional parameters to tweak alignments. Discuss their use, and try different variations on the MSA of the Mbp1 orthologues of the reference species plus MYSPE<ref>A good example how systematic tweaking of parameters can improve alignments is here: {{#pmid:27376004}}</ref>. | + | :::'''E.1''' MUSCLE has a large number of additional parameters to tweak alignments. Discuss their use, and try different variations on the MSA of the Mbp1 orthologues of the reference species plus MYSPE<ref>A good example how systematic tweaking of parameters can improve alignments is here: {{#pmid:27376004}}</ref>. |
− | ::'''E.2''' Report on the results of your experiments. | + | :::'''E.2''' Report on the results of your experiments. |
:'''3.''' When you are done with your report, add the following category tag to the page: | :'''3.''' When you are done with your report, add the following category tag to the page: | ||
Line 144: | Line 144: | ||
barplot(msaMScores, col=myCol[lev], border = NA) | barplot(msaMScores, col=myCol[lev], border = NA) | ||
</source> | </source> | ||
− | :*Create a new page on the student Wiki as a subpage of your User Page. Put your documented | + | :*Create a new page on the student Wiki as a subpage of your User Page. Put your documented code and instructions there. |
:*When you are done with developing this contents, add the following category tag to the page: | :*When you are done with developing this contents, add the following category tag to the page: | ||
::<code><nowiki>[[Category:Eval-BIN-ALI-MSA]]</nowiki></code> | ::<code><nowiki>[[Category:Eval-BIN-ALI-MSA]]</nowiki></code> | ||
Line 152: | Line 152: | ||
;Option to write a "Self-Evaluation Question" | ;Option to write a "Self-Evaluation Question" | ||
− | :Write a "Self-evaluation Question" (with a model solution) that explores the interpretation of an MSA. The goal is for the learner to think about the biological interpretation of a multiple sequence alignment. Questions that I find interesting often explain the context of | + | :Write a "Self-evaluation Question" (with a model solution) that explores the interpretation of an MSA. The goal is for the learner to think about the biological interpretation of a multiple sequence alignment. Questions that I find interesting often explain the context of a biological fact (e.g. a phosporylation site, a ligand binding site, a domain boundary, a frameshift mutation etc. etc.), then ask to interpret an MSA as to how it represents information about the fact. Apply the [[ABC-Rubrics| '''marking rubrics''']] in spirit to satisfy yourself of the quality of your question. Use the format and code templates that you find on the [[Self_evaluation_questions|'''Self evaluation questions page''']] - but don't assume those examples are already models of excellent contributions. This will be a short-answer format question. Note: assume that approximately the same amount of work is expected for all evaluation options. Consequently, the standard of excellence for this option will be quite high. |
:* Create a new page on the student Wiki as a subpage of your User Page. Develop your question there. | :* Create a new page on the student Wiki as a subpage of your User Page. Develop your question there. | ||
:* When you are done with developing this contents, add the following category tag to the page: | :* When you are done with developing this contents, add the following category tag to the page: | ||
Line 218: | Line 218: | ||
* Explore the tabs that are available, in particular note that you can save the result to a file. | * Explore the tabs that are available, in particular note that you can save the result to a file. | ||
− | * Click on the '''Download Alignment File''' tab to load the alignment as text into a browser window. Then save the file into your project directory with a filename of <code>msaT.aln</code>. (<code>.aln</code> is the standard extension for | + | * Click on the '''Download Alignment File''' tab to load the alignment as text into a browser window. Then save the file into your project directory with a filename of <code>msaT.aln</code>. (<code>.aln</code> is the standard extension for CLUSTAL Formatted aligment files, so it helps if we give the file that extension. Of course you know better than to '''rely''' on an extension to signal the filetype and format.) |
}} | }} |
Revision as of 02:55, 29 October 2017
Multiple Sequence Alignment
Keywords: Multiple sequence alignment
Contents
Abstract
A carefully produced multiple sequence alignment is a extarordinarily valuable asset for sequence analysis. In this unit we will discuss the concepts, practice producing MSA's online and in R, and analyze, write and display alignments.
This unit ...
Prerequisites
You need to complete the following units before beginning this one:
- BIN-ALI-Optimal_sequence_alignment (Optimal global and local sequence alignment)
- BIN-ALI-PSI-BLAST (PSI-BLAST)
- FND-STA-Information_theory (Concepts of Information Theory)
Objectives
This unit will ...
- ... introduce the benefits of multiple sequence alignments (MSA), the objective functions they pursue, algorithms and methods, practical considerations, and the analysis of alignments;
- ... demonstrate Web services that calculate MSAs;
- ... teach how to compute and analyze MSA's in R.
Outcomes
After working through this unit you ...
- ... can critically assess available options for producing Multiple Sequence Alignments;
- ... are familar with online and R programming tools to produce alignments;
- ... have aligned the full length sequence of the MYSPE Mbp1 orthologue to a selected set of reference sequences.
Deliverables
- Time management: Before you begin, estimate how long it will take you to complete this unit. Then, record in your course journal: the number of hours you estimated, the number of hours you worked on the unit, and the amount of time that passed between start and completion of this unit.
- Journal: Document your progress in your Course Journal. Some tasks may ask you to include specific items in your journal. Don't overlook these.
- Insights: If you find something particularly noteworthy about this unit, make a note in your insights! page.
Evaluation
This learning unit can be evaluated for a maximum of 6 marks. If you want to submit tasks for this unit for credit you have the following options. If you have any questions about these options, discuss on the mailing list.
- Short Report option
- 1. Create a new page on the student Wiki as a subpage of your User Page.
- 2. Write a short report on one of the five following topics - A, B, C, D, or E. (All reports must have the R code you wrote in an appendix.)
- A - Publication quality plot
- A.1 Create a publication quality figure and figure caption of an MSA of Mbp1 orthologue sequences including MYSPE, that covers the APSES domain only. Produce this as a single page PDF using the msa package
msaPrettyPrint()
function, and upload to the Student Wiki. - A.2 In your report, document the procedure and discuss how you have chosen the color parameters to illustrate interesting points about the domain.
- A.1 Create a publication quality figure and figure caption of an MSA of Mbp1 orthologue sequences including MYSPE, that covers the APSES domain only. Produce this as a single page PDF using the msa package
- A - Publication quality plot
- B - Algorithm Comparison: MAFFT
- B.1 At the EBI, produce a MSA of the Mbp1 orthologues of the reference species plus MYSPE, using the MAFFT algorithm - a good, general purpose MSA algorithm.
- B.2 Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings.
- B - Algorithm Comparison: MAFFT
- C - Algorithm Comparison: WebPRANK
- C.1 At the EBI, produce a MSA of the Mbp1 orthologues of the reference species plus MYSPE, using the WebPRANK algorithm which has an interesting approach to defining indels from computed phylogenetic relationships.
- C.2 Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings.
- C - Algorithm Comparison: WebPRANK
- D - Algorithm Comparison: PRALINE
- D.1 PRALINE reportedly produces some of the best alignments due to its (slow) PSI-BLAST profile pre-processing step, that pulls in additional homologues to increase the information that goes into the alignment. Access the PRALINE Web Server and produce a high-quality MSA of the Mbp1 orthologues of the reference species plus MYSPE.
- D.2 Import the alignment to R and evaluate its quality relative to the MUSCLE alignment with default parameters. Report your findings.
- D - Algorithm Comparison: PRALINE
- E - Algorithm Parameters: MUSCLE
- E.1 MUSCLE has a large number of additional parameters to tweak alignments. Discuss their use, and try different variations on the MSA of the Mbp1 orthologues of the reference species plus MYSPE[1].
- E.2 Report on the results of your experiments.
- E - Algorithm Parameters: MUSCLE
- 3. When you are done with your report, add the following category tag to the page:
[[Category:Eval-BIN-ALI-MSA]]
- Do not change your submission page after this tag has been added. The page will be marked and the category tag will be removed by the instructor.
- R-code option
- Alignments can get very long it would be great to have an overview plot of the full-length alignment in one image. Your task is to write a function for that.
- Submit code according to the following requirements. Make sure your code is documented and that you have tested your functions to be correct.
- Write a function that takes an MsaAAMultipleAlignment object as input and produces a plot of the entire alignment. Sections of gaps shall be shown as continuos lines (
segments()
). Aligned residues shall be shown as rectangles (rect()
). Provide an option to define line colors (e.g. default: "lightgrey"). Provide an option to define fill colors for residue rectangles (e.g. default: "skyblue"). Provide an option to color alignment columns with a color gradient according to the alignment score instead. Here is some code for inspiration of how to work with a color palette:
- Write a function that takes an MsaAAMultipleAlignment object as input and produces a plot of the entire alignment. Sections of gaps shall be shown as continuos lines (
# v is the vector of moving-average scores of msaMscores
lev <- cut(v, labels = FALSE, breaks = 10)
myPal <- colorRampPalette(c("#e8e8e8", "#d6d6d6","#c4c4c4", "#b2b2b2",
"#f4a582", "#d6604d", "#b2182b"))
myCol <- myPal(max(lev))
barplot(msaMScores, col=myCol[lev], border = NA)
- Create a new page on the student Wiki as a subpage of your User Page. Put your documented code and instructions there.
- When you are done with developing this contents, add the following category tag to the page:
[[Category:Eval-BIN-ALI-MSA]]
- Do not change your submission page after this tag has been added. The page will be marked and the category tag will be removed by the instructor.
- Option to write a "Self-Evaluation Question"
- Write a "Self-evaluation Question" (with a model solution) that explores the interpretation of an MSA. The goal is for the learner to think about the biological interpretation of a multiple sequence alignment. Questions that I find interesting often explain the context of a biological fact (e.g. a phosporylation site, a ligand binding site, a domain boundary, a frameshift mutation etc. etc.), then ask to interpret an MSA as to how it represents information about the fact. Apply the marking rubrics in spirit to satisfy yourself of the quality of your question. Use the format and code templates that you find on the Self evaluation questions page - but don't assume those examples are already models of excellent contributions. This will be a short-answer format question. Note: assume that approximately the same amount of work is expected for all evaluation options. Consequently, the standard of excellence for this option will be quite high.
- Create a new page on the student Wiki as a subpage of your User Page. Develop your question there.
- When you are done with developing this contents, add the following category tag to the page:
[[Category:Eval-BIN-ALI-MSA]]
- Do not change your submission page after this tag has been added. The page will be marked and the category tag will be removed by the instructor.
Contents
Task:
- Read the introductory notes on concepts of multiple sequence alignments.
Multiple sequence alignments (MSAs) are enormously useful to resolve ambiguities in the precise placement of "indels"[2] and to ensure that columns in alignments actually contain amino acids that evolve in a similar context. MSAs serve as input for
- functional annotation;
- protein homology modelling;
- phylogenetic analyses;
- sensitive homology searches in databases;
- and more.
Multiple Sequence Alignment
In order to perform a multiple sequence alignment, we obviously need a set of homologous sequences. This is not trivial. All interpretation of MSA results depends absolutely on how the input sequences were chosen. Should we include only orthologues, or paralogues as well? Should we include only species with fully sequenced genomes, or can we tolerate that some orthologous genes are possibly missing for a species? Should we include all sequences we can lay our hands on, or should we restrict the selection to a manageable number of representative sequences? All of these choices influence our interpretation:
- orthologues are expected to be functionally and structurally conserved;
- paralogues may have divergent function but have similar structure;
- missing genes may make paralogs look like orthologs; and
- selection bias may weight our results toward sequences that are over-represented and do not provide a fair representation of evolutionary divergence.
MSA's on the web at the EBI
The EBI hosts a number of excellent MSA programs on their Website. Let's perform an MSA of full length MBP1 orthologues:
Task:
- Navigate to the NCBI protein database and paste the MBP1 protein RefSeq IDs from our database into the search form:
NP_010227 NP_593032 XP_660758 XP_007682304 XP_955821 XP_001837394 XP_569090 XP_003327086 XP_011392621 XP_006957051
(add your MBP1_MYSPE RefSeq ID too!)
- This will give you a page with links to the retrieved sequences. Click on Summary and choose FASTA(text) as the Format to retrieve all sequences at once as a multi-FASTA formatted page (this is useful, remember it!)
- Open another browser window and navigate to the EBI MSA tools page.
- Click on Launch T-coffee.
- Copy the FASTA sequences from the NCBI page, and paste them into the form at the EBI's T-Coffee page. Click Submit.
- The result should show you the aligned sequences, with three blocks of high similarity:
- The most N-terminal block is the APSES domain - the main DNA binding domain of these transcription factors.
- In the middle, we have Ankyrin domains: these are protein-protein interaction modules that Mbp1 uses to recruit other proteins to the bound complex.
- At the end, there is one additional, shorter segment of high similarity.
- Explore the tabs that are available, in particular note that you can save the result to a file.
- Click on the Download Alignment File tab to load the alignment as text into a browser window. Then save the file into your project directory with a filename of
msaT.aln
. (.aln
is the standard extension for CLUSTAL Formatted aligment files, so it helps if we give the file that extension. Of course you know better than to rely on an extension to signal the filetype and format.)
MSA's in R
Let's move to our RStudio project to explore producing and analyzing multiple sequence alignments in R.
Task:
- Open RStudio and load the
ABC-units
R project. If you have loaded it before, choose File → Recent projects → ABC-Units. If you have not loaded it before, follow the instructions in the RPR-Introduction unit. - Choose Tools → Version Control → Pull Branches to fetch the most recent version of the project from its GitHub repository with all changes and bug fixes included.
- Type
init()
if requested. - Open the file
BIN-ALI-MSA.R
and follow the instructions.
Note: take care that you understand all of the code in the script. Evaluation in this course is cumulative and you may be asked to explain any part of code.
Sequence alignment editors
Really excellent software tools have been written that help you visualize and manually curate multiple sequence alignments. If anything, I think they tend to do too much. Past versions of the course have used Jalview, but I have heard good things of AliView (and if you are on a Mac seqotron might interest you, but I only cover software that is free and runs on all three major platforms).
Here, I am just mentioning the two alignment editors and encourage you to explore and use them. If you have experience with comparing them, let us know.
- [Jalview] an integrated MSA editor and sequence annotation workbench from the Barton lab in Dundee. Lots of functions.
- [AliView] from Uppsala: fast, lean, looks to be very practical.
Further reading, links and resources
This is a good, current recapitulation of many of the concepts you have encountered in this unit. Compact to read, I highly recommend this paper to reinforce what you have just learned.
Bawono et al. (2017) Multiple Sequence Alignment. Methods Mol Biol 1525:167-189. (pmid: 27896722) |
Benítez-Páez et al. (2012) A practical guide for the computational selection of residues to be experimentally characterized in protein families. Brief Bioinformatics 13:329-36. (pmid: 21930656) |
Pais et al. (2014) Assessing the efficiency of multiple sequence alignment programs. Algorithms Mol Biol 9:4. (pmid: 24602402) |
Sievers & Higgins (2018) Clustal Omega for making accurate alignments of many protein sequences. Protein Sci 27:135-145. (pmid: 28884485) |
Iantorno et al. (2014) Who watches the watchmen? An appraisal of benchmarks for multiple sequence alignment. Methods Mol Biol 1079:59-73. (pmid: 24170395) |
Notredame (2007) Recent evolutions of multiple sequence alignment algorithms. PLoS Comput Biol 3:e123. (pmid: 17784778) |
Notes
- ↑ A good example how systematic tweaking of parameters can improve alignments is here:
Long et al. (2016) Determination of optimal parameters of MAFFT program based on BAliBASE3.0 database. Springerplus 5:736. (pmid: 27376004) - ↑ "indel": insertion / deletion – a difference in sequence length between two aligned sequences that is accommodated by gaps in the alignment. Since we can't tell from the comparison of two sequences whether such a change was introduced by insertion into or deletion from the ancestral sequence, we join both into a portmanteau.
Self-evaluation
If in doubt, ask! If anything about this learning unit is not clear to you, do not proceed blindly but ask for clarification. Post your question on the course mailing list: others are likely to have similar problems. Or send an email to your instructor.
About ...
Author:
- Boris Steipe <boris.steipe@utoronto.ca>
Created:
- 2017-08-05
Modified:
- 2017-10-22
Version:
- 0.1
Version history:
- 0.1 First stub
This copyrighted material is licensed under a Creative Commons Attribution 4.0 International License. Follow the link to learn more.