Class MultipleAlignmentWriter

  • public class MultipleAlignmentWriter
    extends Object
    This class contains functions for the conversion of MultipleAlignment to various String outputs.

    Supported formats: FASTA, FatCat, Aligned Residues, Transformation Matrices, XML, 3D format.

    Aleix Lafita
    • Method Detail

      • toAlignedResidues

        public static String toAlignedResidues​(MultipleAlignment multAln)
        Converts the alignment to its simplest form: a list of groups of aligned residues. Format is one line per residue group, tab delimited:
        • PDB number (includes insertion code)
        • Chain
        • Amino Acid (three letter code)
        Example: 52 A ALA 102 A VAL 154 A THR

        Note that this format loses information about blocks.

        multAln - MultipleAlignment object
        a String representation of the aligned residues.
      • toTransformMatrices

        public static String toTransformMatrices​(MultipleAlignment alignment)
        Converts the transformation Matrices of the alignment into a String output.
        afpChain -
        String transformation Matrices
      • to3DFormat

        public static String to3DFormat​(MultipleAlignment alignment,
                                        int queryIndex,
                                        int templateIndex)
                                 throws StructureException
        Outputs a pairwise alignment in I-TASSER's 3D Format for target-template alignment.

        The format is closely related to a standard PDB file, but contains only CA atoms and adds two columns for specifying the alignment:

         ATOM   2001  CA  MET     1      41.116 -30.727   6.866  129 THR
         ATOM   2002  CA  ALA     2      39.261 -27.408   6.496  130 ARG
         ATOM   2003  CA  ALA     3      35.665 -27.370   7.726  131 THR
         ATOM   2004  CA  ARG     4      32.662 -25.111   7.172  132 ARG
         ATOM   2005  CA  GLY     5      29.121 -25.194   8.602  133 ARG
         Column 1 -30: Atom & Residue records of query sequence.
         Column 31-54: Coordinates of atoms in query copied from corresponding atoms in template.
         Column 55-59: Corresponding residue number in template based on alignment
         Column 60-64: Corresponding residue name in template

        Note that the output is a pairwise alignment. Only the first and second rows in the MultipleAlignment will be used, others ignored.

        This method supports topology-independent alignments. The output will have sequence order matching the query, but include atoms from the template.

        alignment - A full multiple alignment between proteins
        queryIndex - index of the query within the multiple alignment
        templateIndex - index of the template within the multiple alignment
        The file contents as a string
        StructureException - If an error occurs parsing the alignment's structure names