org.biojava.bio.structure.align.gui
Class DisplayAFP

java.lang.Object
  extended by org.biojava.bio.structure.align.gui.DisplayAFP

public class DisplayAFP
extends Object

A utility class for visualistion of structure alignments

Author:
Andreas Prlic

Field Summary
static boolean debug
           
 
Constructor Summary
DisplayAFP()
           
 
Method Summary
static Structure createArtificalStructure(AFPChain afpChain, Atom[] ca1, Atom[] ca2)
          Create a "fake" Structure objects that contains the two sets of atoms aligned on top of each other.
static StructureAlignmentJmol display(AFPChain afpChain, Group[] twistedGroups, Atom[] ca1, Atom[] ca2, List<Group> hetatms, List<Group> nucleotides, List<Group> hetatms2, List<Group> nucleotides2)
          Note: ca2, hetatoms2 and nucleotides2 should not be rotated.
static Structure getAlignedStructure(Atom[] ca1, Atom[] ca2)
          Get an artifical Structure containing both chains.
static Atom[] getAtomArray(Atom[] ca, List<Group> hetatms, List<Group> nucleotides)
           
static Atom getAtomForAligPos(AFPChain afpChain, int chainNr, int aligPos, Atom[] ca, boolean getPrevious)
          return the atom at alignment position aligPos.
static int getBlockNrForAlignPos(AFPChain afpChain, int aligPos)
          Deprecated. use AFPAlignmentDisplay.getBlockNrForAlignPos instead...
static List<Integer> getEQRAlignmentPos(AFPChain afpChain)
           
static List<String> getPDBresnum(int aligPos, AFPChain afpChain, Atom[] ca)
           
static void showAlignmentImage(AFPChain afpChain, Atom[] ca1, Atom[] ca2, StructureAlignmentJmol jmol)
           
static void showAlignmentImage(AFPChain afpChain, String result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static final boolean debug
See Also:
Constant Field Values
Constructor Detail

DisplayAFP

public DisplayAFP()
Method Detail

getEQRAlignmentPos

public static final List<Integer> getEQRAlignmentPos(AFPChain afpChain)

getPDBresnum

public static final List<String> getPDBresnum(int aligPos,
                                              AFPChain afpChain,
                                              Atom[] ca)

getBlockNrForAlignPos

public static int getBlockNrForAlignPos(AFPChain afpChain,
                                        int aligPos)
Deprecated. use AFPAlignmentDisplay.getBlockNrForAlignPos instead...

get the block number for an aligned position

Parameters:
afpChain -
aligPos -
Returns:

getAtomForAligPos

public static final Atom getAtomForAligPos(AFPChain afpChain,
                                           int chainNr,
                                           int aligPos,
                                           Atom[] ca,
                                           boolean getPrevious)
                                    throws StructureException
return the atom at alignment position aligPos. at the present only works with block 0

Parameters:
chainNr - the number of the aligned pair. 0... first chain, 1... second chain.
afpChain - an afpChain object
aligPos - position on the alignment
getPrevious - gives the previous position if false, gives the next posible atom
Returns:
a CA atom that is at a particular position of the alignment
Throws:
StructureException

getAlignedStructure

public static final Structure getAlignedStructure(Atom[] ca1,
                                                  Atom[] ca2)
                                           throws StructureException
Get an artifical Structure containing both chains. Does NOT rotate anything

Parameters:
ca1 -
ca2 -
Returns:
a structure object containing two models, one for each set of Atoms.
Throws:
StructureException

getAtomArray

public static final Atom[] getAtomArray(Atom[] ca,
                                        List<Group> hetatms,
                                        List<Group> nucleotides)
                                 throws StructureException
Throws:
StructureException

display

public static final StructureAlignmentJmol display(AFPChain afpChain,
                                                   Group[] twistedGroups,
                                                   Atom[] ca1,
                                                   Atom[] ca2,
                                                   List<Group> hetatms,
                                                   List<Group> nucleotides,
                                                   List<Group> hetatms2,
                                                   List<Group> nucleotides2)
                                            throws StructureException
Note: ca2, hetatoms2 and nucleotides2 should not be rotated. This will be done here...

Throws:
StructureException

showAlignmentImage

public static void showAlignmentImage(AFPChain afpChain,
                                      Atom[] ca1,
                                      Atom[] ca2,
                                      StructureAlignmentJmol jmol)

showAlignmentImage

public static void showAlignmentImage(AFPChain afpChain,
                                      String result)

createArtificalStructure

public static Structure createArtificalStructure(AFPChain afpChain,
                                                 Atom[] ca1,
                                                 Atom[] ca2)
                                          throws StructureException
Create a "fake" Structure objects that contains the two sets of atoms aligned on top of each other.

Parameters:
afpChain - the container of the alignment
ca1 - atoms for protein 1
ca2 - atoms for protein 2
Returns:
a protein structure with 2 models.
Throws:
StructureException