Skip navigation links
org.biojava.nbio.structure.align.util

Class AlignmentTools

Parameters:
alignment - The input function, as a map (see alignmentAsMap(AFPChain))
identity - An identity-like function providing the isomorphism between the codomain of alignment (of type ) and the domain (type ).
Returns:
  • calculateBlockGap

    public static int[] calculateBlockGap(int[][][] optAln)
    Method that calculates the number of gaps in each subunit block of an optimal AFP alignment. INPUT: an optimal alignment in the format int[][][]. OUTPUT: an int[] array of length containing the gaps in each block as int[block].
  • alignmentToSIF

    public static void alignmentToSIF(Writer out,
                                      AFPChain afpChain,
                                      Atom[] ca1,
                                      Atom[] ca2,
                                      String backboneInteraction,
                                      String alignmentInteraction)
                               throws IOException
    Creates a simple interaction format (SIF) file for an alignment. The SIF file can be read by network software (eg Cytoscape) to analyze alignments as graphs. This function creates a graph with residues as nodes and two types of edges: 1. backbone edges, which connect adjacent residues in the aligned protein 2. alignment edges, which connect aligned residues
    Parameters:
    out - Stream to write to
    afpChain - alignment to write
    ca1 - First protein, used to generate node names
    ca2 - Second protein, used to generate node names
    backboneInteraction - Two-letter string used to identify backbone edges
    alignmentInteraction - Two-letter string used to identify alignment edges
    Throws:
    IOException
  • getAlignedModel

    public static final List<ChaingetAlignedModel(Atom[] ca)
    get an artificial List of chains containing the Atoms and groups. Does NOT rotate anything.
    Parameters:
    ca -
    Returns:
    a list of Chains that is built up from the Atoms in the ca array
    Throws:
    StructureException
  • fillAlignedAtomArrays

    public static void fillAlignedAtomArrays(AFPChain afpChain,
                                             Atom[] ca1,
                                             Atom[] ca2,
                                             Atom[] ca1aligned,
                                             Atom[] ca2aligned)
    Fill the aligned Atom arrays with the equivalent residues in the afpChain.
    Parameters:
    afpChain -
    ca1 -
    ca2 -
    ca1aligned -
    ca2aligned -
  • deleteHighestDistanceColumn

    public static AFPChain deleteHighestDistanceColumn(AFPChain afpChain,
                                                       Atom[] ca1,
                                                       Atom[] ca2)
                                                throws StructureException
    Find the alignment position with the highest atomic distance between the equivalent atomic positions of the arrays and remove it from the alignment.
    Parameters:
    afpChain - original alignment, will be modified
    ca1 - atom array, will not be modified
    ca2 - atom array, will not be modified
    Returns:
    the original alignment, with the alignment position at the highest distance removed
    Throws:
    StructureException
  • deleteColumn

    public static AFPChain deleteColumn(AFPChain afpChain,
                                        Atom[] ca1,
                                        Atom[] ca2,
                                        int block,
                                        int pos)
                                 throws StructureException
    Delete an alignment position from the original alignment object.
    Parameters:
    afpChain - original alignment, will be modified
    ca1 - atom array, will not be modified
    ca2 - atom array, will not be modified
    block - block of the alignment position
    pos - position index in the block
    Returns:
    the original alignment, with the alignment position removed
    Throws:
    StructureException

Copyright © 2000–2018 BioJava. All rights reserved.