BIN-ALI-MSA
Multiple Sequence Alignment
(Multiple sequence alignment)
Abstract:
A carefully produced multiple sequence alignment is an indispensable, extarordinarily valuable asset for the analysis of sequence features. Fully automated methods are regularly inferior to knowledgeable manual curation of alignments. In this unit we will discuss the concepts, practice producing MSA's online and in R, and analyze, write and display alignments. The goal is to empower you to produce the best alignments possible.
Objectives:
|
Outcomes:
|
Deliverables:
Prerequisites:
This unit builds on material covered in the following prerequisite units:
Contents
Evaluation
This learning unit can be evaluated for a maximum of 5 marks. There are several options for submission. Choose one option, then ...
- Create a new page on the student Wiki as a subpage of your User Page.
- Put all of your writing to submit on this one page.
- When you are done with everything, go to the Qercus Assignments page and open the first Learning Unit that you have not submitted yet. Paste the URL of your Wiki page into the form, and click on Submit Assignment.
Do not change your Wiki page after you have submitted your assignment, until it has been graded.
- 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
msa::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 full-length 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, submit the link to your page via Quercus as described above.
- 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, submit the link to your page via Quercus as described above.
- Option to write a "Self-Evaluation Question"
- You can submit a "Self-Evaluation Question" for at most one of your assignments.
- 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, submit the link to your page via Quercus as described above.
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.
However: we should spend a moment considering the kind of improvements manual editing of alignments can aim for.
Alignment Editing
A good MSA comprises only columns of residues that play similar roles in the proteins' mechanism and/or that evolve in a comparable structural context. Since the alignment reflects the result of biological selection and conservation, it has relatively few indels and the indels it has are usually not placed into elements of secondary structure or into functional motifs. For example, the contiguous features annotated for Mbp1 are expected to be left intact by a good alignment.
A poor MSA has many errors in its columns; these contain residues that actually have different functions or structural roles, even though they may look similar according to a (pairwise!) scoring matrix. A poor MSA also may have introduced indels in biologically irrelevant positions, to maximize spurious sequence similarities. Some of the features annotated for Mbp1 will be disrupted in a poor alignment and residues that are conserved may be placed into different columns.
Often errors or inconsistencies are easy to spot. The main goal of manual editing is to make an alignment biologically more plausible. Most commonly this means to mimize the number of rare evolutionary events that the alignment suggests and/or to emphasize conservation of known functional motifs. Here are some examples:
- Reduce number of indels
From a Probcons alignment: 0447_DEBHA ILKTE-K-T---K--SVVK ILKTE----KTK---SVVK 9978_GIBZE MLGLN-PGLKEIT--HSIT MLGLNPGLKEIT---HSIT 1513_CANAL ILKTE-K-I---K--NVVK ILKTE----KIK---NVVK 6132_SCHPO ELDDI-I-ESGDY--ENVD ELDDI-IESGDY---ENVD 1244_ASPFU ----N-PGLREIC--HSIT -> ----NPGLREIC---HSIT 0925_USTMA LVKTC-PALDPHI--TKLK LVKTCPALDPHI---TKLK 2599_ASPTE VLDAN-PGLREIS--HSIT VLDANPGLREIS---HSIT 9773_DEBHA LLESTPKQYHQHI--KRIR LLESTPKQYHQHI--KRIR 0918_CANAL LLESTPKEYQQYI--KRIR LLESTPKEYQQYI--KRIR
Gaps marked in red were moved. The sequence similarity in the alignment does not change considerably, however the total number of indels in this excerpt is reduced to 13 from the original 22
- Move indels to more plausible position
From a CLUSTAL alignment: 4966_CANGL MKHEKVQ------GGYGRFQ---GTW MKHEKVQ------GGYGRFQ---GTW 1513_CANAL KIKNVVK------VGSMNLK---GVW KIKNVVK------VGSMNLK---GVW 6132_SCHPO VDSKHP-----------QID---GVW -> VDSKHPQ-----------ID---GVW 1244_ASPFU EICHSIT------GGALAAQ---GYW EICHSIT------GGALAAQ---GYW
The two characters marked in red were swapped. This does not change the number of indels but places the "Q" into a a column in which it is more highly conserved (green). Progressive alignments are especially prone to this type of error.
- Conserve motifs
From a CLUSTAL W alignment: 6166_SCHPO --DKRVA---GLWVPP --DKRVA--G-LWVPP XBP1_SACCE GGYIKIQ---GTWLPM GGYIKIQ--G-TWLPM 6355_ASPTE --DEIAG---NVWISP -> ---DEIA--GNVWISP 5262_KLULA GGYIKIQ---GTWLPY GGYIKIQ--G-TWLPY
The first of the two residues marked in red is a conserved, solvent exposed hydrophobic residue that may mediate domain interactions. The second residue is the conserved glycine in a beta turn that cannot be mutated without structural disruption. Changing the position of a gap and insertion in one sequence improves the conservation of both motifs.
- An example of alignment editing for ankyrin domains.
This is example below came from alignment editing in JALVIEW. Columns were coloured by hydrophobicity, and the examples were exported to HTML and then pasted into the page source. Not that the bottom row of the alignment contains a manually added sequence that represents secondary structure elements that were determined by X-ray crystallography of the Swi6 ankyrin domain.
|
- Aligned sequences before editing. The algorithm has placed gaps into the Swi6 helix
LKWIIAN
and the four-residue gaps before the block of well aligned sequence on the right are poorly supported.
|
- Aligned sequence after editing. A significant cleanup of the frayed region is possible. Now there is only one insertion event, and it is placed into the loop that connects two helices of the 1SW6 structure.
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) |
[ PubMed ] [ DOI ] The increasing importance of Next Generation Sequencing (NGS) techniques has highlighted the key role of multiple sequence alignment (MSA) in comparative structure and function analysis of biological sequences. MSA often leads to fundamental biological insight into sequence-structure-function relationships of nucleotide or protein sequence families. Significant advances have been achieved in this field, and many useful tools have been developed for constructing alignments, although many biological and methodological issues are still open. This chapter first provides some background information and considerations associated with MSA techniques, concentrating on the alignment of protein sequences. Then, a practical overview of currently available methods and a description of their specific advantages and limitations are given, to serve as a helpful guide or starting point for researchers who aim to construct a reliable MSA. |
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) |
[ PubMed ] [ DOI ] In recent years, numerous biocomputational tools have been designed to extract functional and evolutionary information from multiple sequence alignments (MSAs) of proteins and genes. Most biologists working actively on the characterization of proteins from a single or family perspective use the MSA analysis to retrieve valuable information about amino acid conservation and the functional role of residues in query protein(s). In MSAs, adjustment of alignment parameters is a key point to improve the quality of MSA output. However, this issue is frequently underestimated and/or misunderstood by scientists and there is no in-depth knowledge available in this field. This brief review focuses on biocomputational approaches complementary to MSA to help distinguish functional residues in protein families. These additional analyses involve issues ranging from phylogenetic to statistical, which address the detection of amino acids pivotal for protein function at any level. In recent years, a large number of tools has been designed for this very purpose. Using some of these relevant, useful tools, we have designed a practical pipeline to perform in silico studies with a view to improving the characterization of family proteins and their functional residues. This review-guide aims to present biologists a set of specially designed tools to study proteins. These tools are user-friendly as they use web servers or easy-to-handle applications. Such criteria are essential for this review as most of the biologists (experimentalists) working in this field are unfamiliar with these biocomputational analysis approaches. |
Pais et al. (2014) Assessing the efficiency of multiple sequence alignment programs. Algorithms Mol Biol 9:4. (pmid: 24602402) |
[ PubMed ] [ DOI ] BACKGROUND: Multiple sequence alignment (MSA) is an extremely useful tool for molecular and evolutionary biology and there are several programs and algorithms available for this purpose. Although previous studies have compared the alignment accuracy of different MSA programs, their computational time and memory usage have not been systematically evaluated. Given the unprecedented amount of data produced by next generation deep sequencing platforms, and increasing demand for large-scale data analysis, it is imperative to optimize the application of software. Therefore, a balance between alignment accuracy and computational cost has become a critical indicator of the most suitable MSA program. We compared both accuracy and cost of nine popular MSA programs, namely CLUSTALW, CLUSTAL OMEGA, DIALIGN-TX, MAFFT, MUSCLE, POA, Probalign, Probcons and T-Coffee, against the benchmark alignment dataset BAliBASE and discuss the relevance of some implementations embedded in each program's algorithm. Accuracy of alignment was calculated with the two standard scoring functions provided by BAliBASE, the sum-of-pairs and total-column scores, and computational costs were determined by collecting peak memory usage and time of execution. RESULTS: Our results indicate that mostly the consistency-based programs Probcons, T-Coffee, Probalign and MAFFT outperformed the other programs in accuracy. Whenever sequences with large N/C terminal extensions were present in the BAliBASE suite, Probalign, MAFFT and also CLUSTAL OMEGA outperformed Probcons and T-Coffee. The drawback of these programs is that they are more memory-greedy and slower than POA, CLUSTALW, DIALIGN-TX, and MUSCLE. CLUSTALW and MUSCLE were the fastest programs, being CLUSTALW the least RAM memory demanding program. CONCLUSIONS: Based on the results presented herein, all four programs Probcons, T-Coffee, Probalign and MAFFT are well recommended for better accuracy of multiple sequence alignments. T-Coffee and recent versions of MAFFT can deliver faster and reliable alignments, which are specially suited for larger datasets than those encountered in the BAliBASE suite, if multi-core computers are available. In fact, parallelization of alignments for multi-core computers should probably be addressed by more programs in a near future, which will certainly improve performance significantly. |
Sievers & Higgins (2018) Clustal Omega for making accurate alignments of many protein sequences. Protein Sci 27:135-145. (pmid: 28884485) |
[ PubMed ] [ DOI ] Clustal Omega is a widely used package for carrying out multiple sequence alignment. Here, we describe some recent additions to the package and benchmark some alternative ways of making alignments. These benchmarks are based on protein structure comparisons or predictions and include a recently described method based on secondary structure prediction. In general, Clustal Omega is fast enough to make very large alignments and the accuracy of protein alignments is high when compared to alternative packages. The package is freely available as executables or source code from www.clustal.org or can be run on-line from a variety of sites, especially the EBI www.ebi.ac.uk. |
Iantorno et al. (2014) Who watches the watchmen? An appraisal of benchmarks for multiple sequence alignment. Methods Mol Biol 1079:59-73. (pmid: 24170395) |
[ PubMed ] [ DOI ] Multiple sequence alignment (MSA) is a fundamental and ubiquitous technique in bioinformatics used to infer related residues among biological sequences. Thus alignment accuracy is crucial to a vast range of analyses, often in ways difficult to assess in those analyses. To compare the performance of different aligners and help detect systematic errors in alignments, a number of benchmarking strategies have been pursued. Here we present an overview of the main strategies-based on simulation, consistency, protein structure, and phylogeny-and discuss their different advantages and associated risks. We outline a set of desirable characteristics for effective benchmarking, and evaluate each strategy in light of them. We conclude that there is currently no universally applicable means of benchmarking MSA, and that developers and users of alignment tools should base their choice of benchmark depending on the context of application-with a keen awareness of the assumptions underlying each benchmarking strategy. |
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) [ PubMed ] [ DOI ] BACKGROUND: Multiple sequence alignment (MSA) is one of the most important research contents in bioinformatics. A number of MSA programs have emerged. The accuracy of MSA programs highly depends on the parameters setting, mainly including gap open penalties (GOP), gap extension penalties (GEP) and substitution matrix (SM). This research tries to obtain the optimal GOP, GEP and SM rather than MAFFT default parameters. RESULTS: The paper discusses the MAFFT program benchmarked on BAliBASE3.0 database, and the optimal parameters of MAFFT program are obtained, which are better than the default parameters of CLUSTALW and MAFFT program. CONCLUSIONS: The optimal parameters can improve the results of multiple sequence alignment, which is feasible and efficient.
- ↑ "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.
About ...
Author:
- Boris Steipe <boris.steipe@utoronto.ca>
Created:
- 2017-08-05
Modified:
- 2020-09-25
Version:
- 1.0
Version history:
- 1.0 2020 Updates
- 0.1 First stub
This copyrighted material is licensed under a Creative Commons Attribution 4.0 International License. Follow the link to learn more.