multialignwrite - Write multiple alignment to file using ClustalW ALN format

Syntax

multialignwrite(File, Alignment)

multialignwrite(..., 'Header', HeaderValue, ...)
multialignwrite(..., 'WriteCount', WriteCountValue, ...)

Arguments

FileString specifying either a file name or a path and file name for saving the ClustalW ALN-formatted data. If you specify only a file name, the file is saved to the MATLAB Current Directory.
Alignment

An alignment, such as returned by the multialign function, represented by either a:

  • Vector of structures, each containing the fields Header and Sequence.

  • Character array

HeaderValueString that specifies the first line of the file. Default is 'MATLAB multiple sequence alignment'.

    Tip   Use the 'Header' property if your file header needs to be a specific format for a third-party software application.

WriteCountValueDetermines whether to add the residue counts to the end of each line. Choices are true (default) or false.

Description

multialignwrite(File, Alignment) writes the contents of Alignment to File, a ClustalW ALN-formatted file.

multialignwrite(..., 'PropertyName', PropertyValue, ...) calls multialignwrite with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:


multialignwrite(..., 'Header', HeaderValue, ...)
specifies the first line of the file. Default is 'MATLAB multiple sequence alignment'.

multialignwrite(..., 'WriteCount', WriteCountValue, ...) determines whether to add the residue counts to the end of each line. Choices are true (default) or false.

Examples

  1. Use the fastaread function to read p53samples.txt, a FASTA-formatted file included with the Bioinformatics Toolbox software, which contains seven cellular tumor antigen p53 sequences.

    p53 = fastaread('p53samples.txt')
    
    p53 = 
    
    7x1 struct array with fields:
        Header
        Sequence
  2. Use the multialign function to align the seven cellular tumor antigen p53 sequences.

    ma = multialign(p53,'verbose',true);
  3. Write the alignment to a file named p53.aln.

    multialignwrite('p53.aln',ma)

See Also

Bioinformatics Toolbox functions: fastawrite, gethmmalignment, multialign, multialignread, multialignviewer, phytreewrite, seqconsensus, seqdisp, seqprofile

  


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