Class AFPAlignmentDisplay


  • public class AFPAlignmentDisplay
    extends java.lang.Object
    • Constructor Detail

      • AFPAlignmentDisplay

        public AFPAlignmentDisplay()
    • Method Detail

      • getAlignedAtoms1

        public static Atom[] getAlignedAtoms1​(AFPChain afpChain,
                                              Atom[] ca1)
      • getAlignedAtoms2

        public static Atom[] getAlignedAtoms2​(AFPChain afpChain,
                                              Atom[] ca2)
      • getAlign

        public static void getAlign​(AFPChain afpChain,
                                    Atom[] ca1,
                                    Atom[] ca2)
        Extract the alignment output

        eg

         STWNTWACTWHLKQP--WSTILILA
         111111111111     22222222
         SQNNTYACSWKLKSWNNNSTILILG
         
        Those position pairs labeled by 1 and 2 are equivalent positions, belongs to two blocks 1 and 2. The residues between labeled residues are non-equivalent, with '-' filling in their resulting gaps.

        The three lines can be accessed using AFPChain.getAlnseq1(), AFPChain.getAlnsymb(), and AFPChain.getAlnseq2().

      • getAlign

        public static void getAlign​(AFPChain afpChain,
                                    Atom[] ca1,
                                    Atom[] ca2,
                                    boolean showSeq)
        Sets the following properties:

        Expects the following properties to be previously computed:

        Known Bugs
        Expects the alignment to have linear topology. May give odd results for circular permutations and other complicated topologies.
        Parameters:
        afpChain - Alignment between ca1 and ca2
        ca1 - CA atoms of the first protein
        ca2 - CA atoms of the second protein
        showSeq - Use symbols reflecting sequence similarity: '|' for identical, ':' for similar, '.' for dissimilar. Otherwise, use the block number to show aligned residues.
      • aaScore

        public static int aaScore​(char a,
                                  char b)
      • calcIdSimilarity

        public static java.util.Map<java.lang.String,​java.lang.Double> calcIdSimilarity​(char[] seq1,
                                                                                              char[] seq2,
                                                                                              int alnLength)
      • createArtificalStructure

        public static Structure createArtificalStructure​(AFPChain afpChain,
                                                         Atom[] ca1,
                                                         Atom[] ca2)
                                                  throws java.lang.ClassNotFoundException,
                                                         java.lang.NoSuchMethodException,
                                                         java.lang.reflect.InvocationTargetException,
                                                         java.lang.IllegalAccessException,
                                                         StructureException
        Parameters:
        afpChain -
        ca1 -
        ca2 -
        Returns:
        Throws:
        java.lang.ClassNotFoundException - If an error occurs when invoking jmol
        java.lang.NoSuchMethodException - If an error occurs when invoking jmol
        java.lang.reflect.InvocationTargetException - If an error occurs when invoking jmol
        java.lang.IllegalAccessException - If an error occurs when invoking jmol
        StructureException
      • getBlockNrForAlignPos

        public static int getBlockNrForAlignPos​(AFPChain afpChain,
                                                int aligPos)
        get the block number for an aligned position
        Parameters:
        afpChain -
        aligPos -
        Returns: