org.biojava.bio.structure.align.ce
Class OptimalCECPMain

java.lang.Object
  extended by org.biojava.bio.structure.align.AbstractStructureAlignment
      extended by org.biojava.bio.structure.align.ce.CeMain
          extended by org.biojava.bio.structure.align.ce.OptimalCECPMain
All Implemented Interfaces:
StructureAlignment

public class OptimalCECPMain
extends CeMain

A wrapper for CeMain which sets default parameters to be appropriate for finding circular permutations.

A circular permutation consists of a single cleavage point and rearrangement between two structures, for example:

 ABCDEFG
 DEFGABC
 

Author:
Spencer Bliven.

Field Summary
static String algorithmName
           
protected  OptimalCECPParameters params
           
static String version
           
 
Fields inherited from class org.biojava.bio.structure.align.ce.CeMain
calculator
 
Fields inherited from class org.biojava.bio.structure.align.AbstractStructureAlignment
newline
 
Constructor Summary
OptimalCECPMain()
           
 
Method Summary
 AFPChain align(Atom[] ca1, Atom[] ca2, Object param)
          Finds the optimal alignment between two proteins allowing for a circular permutation (CP).
 AFPChain alignOptimal(Atom[] ca1, Atom[] ca2, Object param, AFPChain[] alignments)
          Finds the optimal alignment between two proteins allowing for a circular permutation (CP).
 AFPChain alignPermuted(Atom[] ca1, Atom[] ca2, Object param, int cp)
          Aligns ca1 with ca2 permuted by cp residues.
 String getAlgorithmName()
          Get the name of the Algorithm
 ConfigStrucAligParams getParameters()
          Return the paramers for this algorithm.
 String getVersion()
          Get the Version information for this Algorithm.
static void main(String[] args)
           
 void setParameters(ConfigStrucAligParams params)
          Set the default parameters for this algorithm to use
 
Methods inherited from class org.biojava.bio.structure.align.ce.CeMain
align, getCECalculator
 
Methods inherited from class org.biojava.bio.structure.align.AbstractStructureAlignment
printHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biojava.bio.structure.align.StructureAlignment
printHelp
 

Field Detail

algorithmName

public static final String algorithmName
See Also:
Constant Field Values

version

public static final String version
See Also:
Constant Field Values

params

protected OptimalCECPParameters params
Constructor Detail

OptimalCECPMain

public OptimalCECPMain()
Method Detail

getAlgorithmName

public String getAlgorithmName()
Description copied from interface: StructureAlignment
Get the name of the Algorithm

Specified by:
getAlgorithmName in interface StructureAlignment
Overrides:
getAlgorithmName in class CeMain
Returns:
the name of the algorithm

getVersion

public String getVersion()
Description copied from interface: StructureAlignment
Get the Version information for this Algorithm.

Specified by:
getVersion in interface StructureAlignment
Overrides:
getVersion in class CeMain
Returns:
the version of the algorithm

getParameters

public ConfigStrucAligParams getParameters()
Description copied from interface: StructureAlignment
Return the paramers for this algorithm.

Specified by:
getParameters in interface StructureAlignment
Overrides:
getParameters in class CeMain
Returns:
an OptimalCECPParameters object

setParameters

public void setParameters(ConfigStrucAligParams params)
Description copied from interface: StructureAlignment
Set the default parameters for this algorithm to use

Specified by:
setParameters in interface StructureAlignment
Overrides:
setParameters in class CeMain
Parameters:
params - Should be an OptimalCECPParameters object specifying alignment options

alignPermuted

public AFPChain alignPermuted(Atom[] ca1,
                              Atom[] ca2,
                              Object param,
                              int cp)
                       throws StructureException
Aligns ca1 with ca2 permuted by cp residues.

WARNING: Modifies ca2 during the permutation. Be sure to make a copy before calling this method.

Parameters:
ca1 -
ca2 -
param -
cp -
Returns:
Throws:
StructureException

align

public AFPChain align(Atom[] ca1,
                      Atom[] ca2,
                      Object param)
               throws StructureException
Finds the optimal alignment between two proteins allowing for a circular permutation (CP). The precise algorithm is controlled by the parameters. If the parameter tryAllCPs is true, all possible CP sites are tried and the optimal site is returned. Otherwise, the cpPoint parameter is used to determine the CP point, greatly reducing the computation required.

Specified by:
align in interface StructureAlignment
Overrides:
align in class CeMain
Parameters:
ca1 - CA atoms of the first protein
ca2 - CA atoms of the second protein
param - CeParameters object
Returns:
The best-scoring alignment
Throws:
StructureException
See Also:
alignOptimal(Atom[], Atom[], Object, AFPChain[])

alignOptimal

public AFPChain alignOptimal(Atom[] ca1,
                             Atom[] ca2,
                             Object param,
                             AFPChain[] alignments)
                      throws StructureException
Finds the optimal alignment between two proteins allowing for a circular permutation (CP). This algorithm performs a CE alignment for each possible CP site. This is quite slow. Use #alignHeuristic(Atom[], Atom[], Object) for a faster algorithm.

Parameters:
ca1 - CA atoms of the first protein
ca2 - CA atoms of the second protein
param - CeParameters object
alignments - If not null, should be an empty array of the same length as ca2. This will be filled with the alignments from permuting ca2 by 0 to n-1 residues.
Returns:
The best-scoring alignment
Throws:
StructureException

main

public static void main(String[] args)