Products & Services Solutions Academia Support User Community Company

Learn more about Bioinformatics Toolbox   

Multiple Sequence Alignment Viewer

Overview of the Multiple Sequence Alignment Viewer

The Multiple Sequence Alignment Viewer is a graphical user interface (GUI) that integrates many sequence and multiple alignment functions in the toolbox. Instead of entering commands in the MATLAB Command Window, you can use this interface to visually inspect a multiple alignment and make manual adjustments.

Loading Sequence Data and Viewing the Phylogenetic Tree

Load unaligned sequence data into the MATLAB environment and view it in a phylogenetic tree.

  1. Load sequence data.

    load primatesdemodata
  2. Create a phylogenetic tree.

    tree = seqlinkage(seqpdist(primates),'single', primates);
  3. View the phylogenetic tree.

    view(tree)

    The MATLAB software creates a phytree object in the workspace and loads the sequence data into the Phylogenetic Tree Tool.

Selecting a Subset of Data from the Phylogenetic Tree

Select the human and chimp branches.

  1. From the toolbar, click the Prune icon.

  2. Click the branches to prune (remove) from the tree. For this example, click the branch nodes for gorillas, orangutans, and Neanderthals.

  3. Export the selected branches to a second tree. Select File > Export to Workspace, and then select Only Displayed.

  4. In the Export to dialog box, enter the name of a variable. For example, enter tree2, and then click OK.

  5. Extract sequences from the tree object.

    primates2 = primates(seqmatch(get(tree2, 'Leafnames'),{primates.Header}));

Aligning Multiple Sequences

After selecting a set of related sequences, you can multiply align them and view the results.

  1. Align multiple sequences.

    ma = multialign(primates2);
  2. Load aligned sequences in the Multiple Alignment Viewer.

    multialignviewer(ma);

    The aligned sequences appear in the Multiple Sequence Alignment Viewer.

Adjusting Multiple Sequence Alignments Manually

Algorithms for aligning multiple sequences do not always produce an optimal result. By visually inspecting the alignment, you can identify areas that could use a manual adjustment to improve the alignment.

  1. Identify an area where you could improve the alignment.

  2. Click a letter to select it, and then move the cursor over the red direction bar. The cursor changes to a hand.

  3. Click and drag the sequence to the right to insert a gap. If there is a gap to the left, you can also move the sequence to the left and eliminate the gap.

    Alternately, to insert a gap, select a character, and then click the Insert Gap icon on the toolbar or press the spacebar.

      Note   You cannot delete or add letters to a sequence, but you can add or delete gaps. If all of the sequences at one alignment position have gaps, you can delete that column of gaps.

  4. Continue adding gaps and moving sequences to improve the alignment.

Closing the Multiple Sequence Alignment Viewer

You can close the Multiple Sequence Alignment Viewer window from the MATLAB command line by using the following syntax:

multialignviewer('close')
  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS