Class AFPChainXMLParser


  • public class AFPChainXMLParser
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String flipAlignment​(java.lang.String xml)
      Takes an XML representation of the alignment and flips the positions of name1 and name2
      static AFPChain fromXML​(java.lang.String xml, java.lang.String name1, java.lang.String name2, Atom[] ca1, Atom[] ca2)
      new utility method that checks that the order of the pair in the XML alignment is correct and flips the direction if needed
      static AFPChain fromXML​(java.lang.String xml, Atom[] ca1, Atom[] ca2)  
      static boolean isErrorXML​(java.lang.String xml)
      returns true if the alignment XML contains an error message
      static AFPChain[] parseMultiXML​(java.lang.String xml)  
      static void rebuildAFPChain​(AFPChain afpChain, Atom[] ca1, Atom[] ca2)
      replace the PDB res nums with atom positions:
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_ALGORITHM_NAME

        public static final java.lang.String DEFAULT_ALGORITHM_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • AFPChainXMLParser

        public AFPChainXMLParser()
    • Method Detail

      • fromXML

        public static AFPChain fromXML​(java.lang.String xml,
                                       java.lang.String name1,
                                       java.lang.String name2,
                                       Atom[] ca1,
                                       Atom[] ca2)
                                throws java.io.IOException,
                                       StructureException
        new utility method that checks that the order of the pair in the XML alignment is correct and flips the direction if needed
        Parameters:
        xml -
        name1 -
        name1 -
        ca1 -
        ca2 -
        Returns:
        Throws:
        java.io.IOException
        StructureException
      • fromXML

        public static AFPChain fromXML​(java.lang.String xml,
                                       Atom[] ca1,
                                       Atom[] ca2)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • isErrorXML

        public static boolean isErrorXML​(java.lang.String xml)
        returns true if the alignment XML contains an error message
        Parameters:
        xml -
        Returns:
        flag if there was an Error while processing the alignment.
      • flipAlignment

        public static java.lang.String flipAlignment​(java.lang.String xml)
                                              throws java.io.IOException,
                                                     StructureException
        Takes an XML representation of the alignment and flips the positions of name1 and name2
        Parameters:
        xml - String representing the alignment
        Returns:
        XML representation of the flipped alignment
        Throws:
        java.io.IOException
        StructureException
      • rebuildAFPChain

        public static void rebuildAFPChain​(AFPChain afpChain,
                                           Atom[] ca1,
                                           Atom[] ca2)
        replace the PDB res nums with atom positions:
        Parameters:
        afpChain -
        ca1 -
        ca2 -
      • parseMultiXML

        public static AFPChain[] parseMultiXML​(java.lang.String xml)
                                        throws java.io.IOException
        Throws:
        java.io.IOException