Package pal.alignment

Class AlignmentTool

java.lang.Object
pal.alignment.AlignmentTool

public final class AlignmentTool extends Object
Simple access for alignment functions. The purpose of this class is to provide a set interface for doing basic alignment operations. History
  • 15/09/2003 - Created
Version:
$Id: AlignmentTool.java,v 1.2 2004/01/13 22:04:49 matt Exp $
Author:
Matthew Goode
  • Constructor Details

    • AlignmentTool

      public AlignmentTool()
  • Method Details

    • createBootstrapReplicate

      public static final Alignment createBootstrapReplicate(Alignment base)
      A simple approach to creating a bootstrap replicate
      Parameters:
      base - The original alignment
      Returns:
      A bootstrap replicate of the input alignment
    • createGapBalanced

      public static final Alignment createGapBalanced(Alignment base, int startingIndex)
      Create a gap balanced alignment. That is one that removes sites where sequences are out of frame from other sequences in the site.
      Parameters:
      base - The original alignment
      startingIndex - The nucleotide position at which to start the translating (counting from zero)
      Returns:
      The gap balanced version
    • convertToUniversalAminoAcids

      public static final Alignment convertToUniversalAminoAcids(Alignment base, int startingIndex)
      Convert an alignment to one of amino acids (using Universal Translation)
      Parameters:
      base - The base alignment (in any datatype, but for best results a Nucleotide alignment)
      startingIndex - The nucleotide position at which to start the translating (counting from zero)
      Returns:
      The converted alignment
    • readAlignment

      public static final Alignment readAlignment(Reader r, DataType dt) throws IOException
      Attempt to read a file from a reader object
      Parameters:
      r - A reader object
      dt - The datatype of the resulting alignment
      Returns:
      A loaded alignment
      Throws:
      IOException - if there is a problem reading the alignment