Class AFPChain

java.lang.Object
org.biojava.nbio.structure.align.model.AFPChain
All Implemented Interfaces:
Serializable, Cloneable

public class AFPChain extends Object implements Serializable, Cloneable
A bean to contain the core of a structure alignment. The FatCat aligner class is working on the AFPChain class.
Author:
Andreas Prlic, Aleix Lafita
See Also:
  • Field Details Link icon

  • Constructor Details Link icon

    • AFPChain Link icon

      public AFPChain(String algorithmName)
      Construction of an AFPChain needs the algorithm name, since downstream analysis methods (scores, display, etc) behave differently if the alignment is flexible (created with FatCat).
      Parameters:
      algorithmName -
    • AFPChain Link icon

      public AFPChain(AFPChain o)
      Copy constructor
      Parameters:
      o - AFPChain to duplicate
  • Method Details Link icon

    • clone Link icon

      public Object clone()
      Creates and returns a copy of this object.
      Overrides:
      clone in class Object
    • getId Link icon

      public long getId()
    • setId Link icon

      public void setId(long id)
    • toCE Link icon

      public String toCE(Atom[] ca1, Atom[] ca2)
    • toRotMat Link icon

      public String toRotMat()
    • toFatcat Link icon

      public String toFatcat(Atom[] ca1, Atom[] ca2)
    • toDBSearchResult Link icon

    • calcSimilarity Link icon

      protected void calcSimilarity()
    • getNrEQR Link icon

      public int getNrEQR()
      Get the number of structurally equivalent residues
      Returns:
      nr of EQR
    • getCoverage1 Link icon

      public int getCoverage1()
      Get the coverage of protein 1 with the alignment
      Returns:
      percentage of coverage, between 0 and 100.
    • getCoverage2 Link icon

      public int getCoverage2()
      Get the coverage of protein 2 with the alignment
      Returns:
      percentage of coverage, between 0 and 100.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • isSignificantResult Link icon

      public boolean isSignificantResult()
    • getPdbAln Link icon

      public String[][][] getPdbAln()
      used temporarily during XML serialization to track the PDB positions of the alignmnet
      Returns:
      String array
    • setPdbAln Link icon

      public void setPdbAln(String[][][] pdbAln)
    • getConn Link icon

      public Double getConn()
    • setConn Link icon

      public void setConn(Double conn)
    • getDVar Link icon

      public Double getDVar()
    • setDVar Link icon

      public void setDVar(Double dvar)
    • getMaxTra Link icon

      public int getMaxTra()
      get the maximum nr of Twists that are allowed...
      Returns:
      maxTra, the max nr of twists
    • setMaxTra Link icon

      public void setMaxTra(int maxTra)
      Set the maximum number of Twists that are allowed...
      Parameters:
      maxTra -
    • getAlignScore Link icon

      public double getAlignScore()
    • setAlignScore Link icon

      public void setAlignScore(double alignScore)
    • getAlignScoreUpdate Link icon

      public double getAlignScoreUpdate()
    • setAlignScoreUpdate Link icon

      public void setAlignScoreUpdate(double alignScoreUpdate)
    • getAfpChainTwiNum Link icon

      public int getAfpChainTwiNum()
    • setAfpChainTwiNum Link icon

      public void setAfpChainTwiNum(int afpChainTwiNum)
    • getMinLen Link icon

      public int getMinLen()
    • setMinLen Link icon

      public void setMinLen(int minLen)
    • getAfpSet Link icon

      public List<AFP> getAfpSet()
      Get the set of AFPs for this alignment. An AFP is a local ungapped alignment between the two peptides. AFPs are set before the final optimization step. To get the final alignment, look at the aligned pairs from getOptAln().
      Returns:
      The optimal set of AFPs
      See Also:
    • setAfpSet Link icon

      public void setAfpSet(List<AFP> afpSet)
      Set the set of AFPs for this alignment. An AFP is a local ungapped alignment between the two peptides. AFPs are set before the final optimization step. To get the final alignment, look at the aligned pairs from getOptAln().
    • getAfpIndex Link icon

      public int[][] getAfpIndex()
    • setAfpIndex Link icon

      public void setAfpIndex(int[][] afpIndex)
    • getAfpAftIndex Link icon

      public int[][] getAfpAftIndex()
    • setAfpAftIndex Link icon

      public void setAfpAftIndex(int[][] afpAftIndex)
    • getAfpBefIndex Link icon

      public int[][] getAfpBefIndex()
    • setAfpBefIndex Link icon

      public void setAfpBefIndex(int[][] afpBefIndex)
    • getDisTable1 Link icon

      public Matrix getDisTable1()
    • setDisTable1 Link icon

      public void setDisTable1(Matrix disTable1)
    • getDisTable2 Link icon

      public Matrix getDisTable2()
    • setDisTable2 Link icon

      public void setDisTable2(Matrix disTable2)
    • getTwi Link icon

      public int[] getTwi()
    • setTwi Link icon

      public void setTwi(int[] twi)
    • getAfpChainLen Link icon

      public int getAfpChainLen()
    • setAfpChainLen Link icon

      public void setAfpChainLen(int afpChainLen)
    • getAfpChainList Link icon

      public int[] getAfpChainList()
    • setAfpChainList Link icon

      public void setAfpChainList(int[] afpChainList)
    • getAfpChainTwiBin Link icon

      public double[] getAfpChainTwiBin()
    • setAfpChainTwiBin Link icon

      public void setAfpChainTwiBin(double[] afpChainTwiBin)
    • getAfpChainTwiList Link icon

      public double[] getAfpChainTwiList()
    • setAfpChainTwiList Link icon

      public void setAfpChainTwiList(double[] afpChainTwiList)
    • getChainRmsd Link icon

      public double getChainRmsd()
    • setChainRmsd Link icon

      public void setChainRmsd(double chainRmsd)
      The RMSD of the chain of AFPs. Set during AFPCHainer.traceBack();
      Parameters:
      chainRmsd -
    • getChainLen Link icon

      public int getChainLen()
    • setChainLen Link icon

      public void setChainLen(int chainLen)
    • getMisLen Link icon

      public int getMisLen()
    • setMisLen Link icon

      public void setMisLen(int misLen)
    • getGapLen Link icon

      public int getGapLen()
    • setGapLen Link icon

      public void setGapLen(int gapLen)
    • getBlockNum Link icon

      public int getBlockNum()
      The number of blocks in the alignment
      Returns:
      the nr of blocks in alignment
    • setBlockNum Link icon

      public void setBlockNum(int blockNum)
    • getBlockNumIni Link icon

      public int getBlockNumIni()
    • setBlockNumIni Link icon

      public void setBlockNumIni(int blockNumIni)
    • getBlockNumClu Link icon

      public int getBlockNumClu()
    • setBlockNumClu Link icon

      public void setBlockNumClu(int blockNumClu)
    • getBlockNumSpt Link icon

      public int getBlockNumSpt()
    • setBlockNumSpt Link icon

      public void setBlockNumSpt(int blockNumSpt)
    • getBlockRmsd Link icon

      public double[] getBlockRmsd()
    • setBlockRmsd Link icon

      public void setBlockRmsd(double[] blockRmsd)
    • getBlock2Afp Link icon

      public int[] getBlock2Afp()
    • setBlock2Afp Link icon

      public void setBlock2Afp(int[] block2Afp)
    • getBlockSize Link icon

      public int[] getBlockSize()
    • setBlockSize Link icon

      public void setBlockSize(int[] blockSize)
    • getBlockScore Link icon

      public double[] getBlockScore()
    • setBlockScore Link icon

      public void setBlockScore(double[] blockScore)
    • getBlockGap Link icon

      public int[] getBlockGap()
    • setBlockGap Link icon

      public void setBlockGap(int[] blockGap)
    • getBlockResSize Link icon

      public int[] getBlockResSize()
    • setBlockResSize Link icon

      public void setBlockResSize(int[] blockResSize)
    • getBlockResList Link icon

      public int[][][] getBlockResList()
      tracks the residues of the initial blocks (before optimization)
      Returns:
      list of block residues
    • setBlockResList Link icon

      public void setBlockResList(int[][][] blockResList)
    • getFocusResn Link icon

      public int getFocusResn()
    • setFocusResn Link icon

      public void setFocusResn(int focusResn)
    • getFocusRes1 Link icon

      public int[] getFocusRes1()
    • setFocusRes1 Link icon

      public void setFocusRes1(int[] focusRes1)
    • getFocusRes2 Link icon

      public int[] getFocusRes2()
    • setFocusRes2 Link icon

      public void setFocusRes2(int[] focusRes2)
    • getFocusAfpn Link icon

      public int getFocusAfpn()
    • setFocusAfpn Link icon

      public void setFocusAfpn(int focusAfpn)
    • getFocusAfpList Link icon

      public int[] getFocusAfpList()
    • setFocusAfpList Link icon

      public void setFocusAfpList(int[] focusAfpList)
    • isShortAlign Link icon

      public boolean isShortAlign()
    • setShortAlign Link icon

      public void setShortAlign(boolean shortAlign)
    • getOptAln Link icon

      public int[][][] getOptAln()
      Tracks the Atom positions in the optimal alignment. Note: only considers the equivalent positions, gaps are ignored... first dimension is the block nr second dimension is 0 or 1 (the alignment chain index) third is the position
      Returns:
      int array
    • setOptAln Link icon

      public void setOptAln(int[][][] optAln)
    • getOptLen Link icon

      public int[] getOptLen()
      The length of each block
      Returns:
      lengths
    • setOptLen Link icon

      public void setOptLen(int[] optLen)
    • getOptRmsd Link icon

      public double[] getOptRmsd()
    • setOptRmsd Link icon

      public void setOptRmsd(double[] optRmsd)
    • getOptLength Link icon

      public int getOptLength()
      The number of aligned residues in the final alignment.
      Returns:
    • setOptLength Link icon

      public void setOptLength(int optLength)
      The length of the optimal alignment. Set by AFPOptimizer.optimizeAln(). This should be the sum of the elements in optLen
      Parameters:
      optLength -
    • getAlnsymb Link icon

      public char[] getAlnsymb()
    • setAlnsymb Link icon

      public void setAlnsymb(char[] alnsymb)
    • getAlnseq1 Link icon

      public char[] getAlnseq1()
    • setAlnseq1 Link icon

      public void setAlnseq1(char[] alnseq1)
    • getAlnseq2 Link icon

      public char[] getAlnseq2()
    • setAlnseq2 Link icon

      public void setAlnseq2(char[] alnseq2)
    • getAlnLength Link icon

      public int getAlnLength()
      Returns:
      The total length of the alignment, including gaps
      See Also:
    • setAlnLength Link icon

      public void setAlnLength(int alnLength)
    • getAlnbeg1 Link icon

      public int getAlnbeg1()
      Returns:
      The index of the first aligned residue in protein 1
    • setAlnbeg1 Link icon

      public void setAlnbeg1(int alnbeg1)
    • getAlnbeg2 Link icon

      public int getAlnbeg2()
      Returns:
      The index of the first aligned residue in protein 2
    • setAlnbeg2 Link icon

      public void setAlnbeg2(int alnbeg2)
    • getTotalLenIni Link icon

      public int getTotalLenIni()
    • setTotalLenIni Link icon

      public void setTotalLenIni(int totalLenIni)
    • getTotalLenOpt Link icon

      public int getTotalLenOpt()
    • setTotalLenOpt Link icon

      public void setTotalLenOpt(int totalLenOpt)
    • getTotalRmsdIni Link icon

      public double getTotalRmsdIni()
      this is the init-RMSD, not the final RMSD after refinement.
      Returns:
      totalRmsdIni
    • setTotalRmsdIni Link icon

      public void setTotalRmsdIni(double totalRmsdIni)
      this is the init-RMSD, not the final RMSD after refinement.
      Parameters:
      totalRmsdIni -
    • getTotalRmsdOpt Link icon

      public double getTotalRmsdOpt()
      The RMSD of the final alignment. Use this to print overal alignment RMSD.
      Returns:
      total RMSD of the optimal alignment.
    • setTotalRmsdOpt Link icon

      public void setTotalRmsdOpt(double totalRmsdOpt)
      The RMSD of the final alignment. Use this to print overal alignment RMSD.
      Parameters:
      totalRmsdOpt - : total RMSD of the optimal alignment
    • getName1 Link icon

      public String getName1()
    • setName1 Link icon

      public void setName1(String name1)
    • getName2 Link icon

      public String getName2()
    • setName2 Link icon

      public void setName2(String name2)
    • getCalculationTime Link icon

      public long getCalculationTime()
    • setCalculationTime Link icon

      public void setCalculationTime(long calculationTime)
    • getCa1Length Link icon

      public int getCa1Length()
    • setCa1Length Link icon

      public void setCa1Length(int ca1Length)
    • getCa2Length Link icon

      public int getCa2Length()
    • setCa2Length Link icon

      public void setCa2Length(int ca2Length)
    • getIoTime Link icon

      public long getIoTime()
    • setIoTime Link icon

      public void setIoTime(long ioTime)
    • getProbability Link icon

      public double getProbability()
      The probability (FATCAT) or Z-score (CE) of the alignment.
      Returns:
      either the probability (FATCAT) or the Z-score (CE) of the alignment.
    • setProbability Link icon

      public void setProbability(double probability)
    • getIdentity Link icon

      public double getIdentity()
      The percent of residues that are sequence-identical in the alignment.
      Returns:
      a value between 0 and 1
    • setIdentity Link icon

      public void setIdentity(double identity)
    • getSimilarity Link icon

      public double getSimilarity()
      Returns the similarity score for the alignment. This gives the percent of sequence similar residues in the alignment.
      Returns:
      a double between 0 and 1
    • setSimilarity Link icon

      public void setSimilarity(double similarity)
    • getNormAlignScore Link icon

      public double getNormAlignScore()
    • setNormAlignScore Link icon

      public void setNormAlignScore(double normAlignScore)
    • getBlockRotationMatrix Link icon

    • setBlockRotationMatrix Link icon

      public void setBlockRotationMatrix(Matrix[] blockRotationMatrix)
    • getBlockShiftVector Link icon

    • setBlockShiftVector Link icon

      public void setBlockShiftVector(Atom[] blockShiftVector)
    • getAlgorithmName Link icon

    • setAlgorithmName Link icon

      public void setAlgorithmName(String algorithmName)
      Caution has to be made when changing the algorithmName of an AFPChain, since downstream analysis methods (scores, display, etc) behave differently if the alignment is flexible (created with FatCat).
      Parameters:
      algorithmName -
    • getVersion Link icon

      public String getVersion()
    • setVersion Link icon

      public void setVersion(String version)
    • isSequentialAlignment Link icon

      public boolean isSequentialAlignment()
      Get whether this alignment has the normal topology, ie the residues aligned in each block increase sequentially over the original protein. This will be false if a circular permutation was detected.
      Returns:
      true if the alignment is sequential
    • setSequentialAlignment Link icon

      public void setSequentialAlignment(boolean sequentialAlignment)
      Set whether this alignment has the normal topology, ie the residues aligned in each block increase sequentially over the original protein. This will be false if a circular permutation was detected.
    • getDistanceMatrix Link icon

      A matrix with ca1length rows and ca2length columns. For CE this is the distance matrix, but the exact interpretation is left up to the alignment algorithm.

      Note: The org.biojava.nbio.structure.gui.JMatrixPanel, used in the structure-gui package to display distance matrices, will display the transpose of this matrix. Be sure to take that into account when debugging visually.

      Returns:
      A matrix with dimensions ca1length x ca2length, or null
    • setDistanceMatrix Link icon

      public void setDistanceMatrix(Matrix distanceMatrix)
      A matrix with ca1length rows and ca2length columns. For CE this is the distance matrix, but the exact interpretation is left up to the alignment algorithm.
      Parameters:
      distanceMatrix - A matrix with dimensions ca1length x ca2length
    • setTMScore Link icon

      public void setTMScore(double tmScore)
    • getTMScore Link icon

      public double getTMScore()
      Returns the tmScore of the alignment. If the score has not been calcualted yet, returns -1. To calculate it call AFPChainScorer.getTMScore(afpChain, ca1, ca2);
      Returns:
      -1, if not calculated, or the TM-score, a score between 0 and 1
    • getDescription2 Link icon

      Get a textual description for the protein 2 of the alignment.
      Returns:
    • setDescription2 Link icon

      public void setDescription2(String desc)
      Set the textual description for protein 2.
      Parameters:
      desc -
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals Link icon

      public boolean equals(Object obj)
      A week equality metric. Checks if the optAlign is the same, and if the objects being compared seem to be the same (same names, lengths). Does not check properties of the alignment such as scores or superposition matrices.
      Overrides:
      equals in class Object
      See Also: