Package pal.alignment
Class AlignmentTool
- java.lang.Object
-
- 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- 15/09/2003 - Created
- Version:
- $Id: AlignmentTool.java,v 1.2 2004/01/13 22:04:49 matt Exp $
- Author:
- Matthew Goode
-
-
Constructor Summary
Constructors Constructor Description AlignmentTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 replicatestatic 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
-
-
-
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 alignmentstartingIndex
- 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 objectdt
- The datatype of the resulting alignment- Returns:
- A loaded alignment
- Throws:
java.io.IOException
- if there is a problem reading the alignment
-
-