pal.alignment
Class AlignmentTool

java.lang.Object
  extended by pal.alignment.AlignmentTool

public final class AlignmentTool
extends java.lang.Object

Simple access for alignment functions. The purpose of this class is to provide a set interface for doing basic alignment operations. History

Version:
$Id: AlignmentTool.java,v 1.2 2004/01/13 22:04:49 matt Exp $
Author:
Matthew Goode

Constructor Summary
AlignmentTool()
           
 
Method Summary
static Alignment convertToUniversalAminoAcids(Alignment base, int startingIndex)
          Convert an alignment to one of amino acids (using Universal Translation)
static Alignment createBootstrapReplicate(Alignment base)
          A simple approach to creating a bootstrap replicate
static Alignment createGapBalanced(Alignment base, int startingIndex)
          Create a gap balanced alignment.
static Alignment readAlignment(java.io.Reader r, DataType dt)
          Attempt to read a file from a reader object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlignmentTool

public AlignmentTool()
Method Detail

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(java.io.Reader r,
                                            DataType dt)
                                     throws java.io.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:
java.io.IOException - if there is a problem reading the alignment