Alignments
Class SequenceAlignment
java.lang.Object
Alignments.Alignment
Alignments.SequenceAlignment
- All Implemented Interfaces:
- java.lang.Iterable<Site>
Deprecated. Replaced by PhylipAlignment
to allow for easier use of
multiple formats.
public class SequenceAlignment
- extends Alignment
Represents a sequence alignment
- Version:
- 1.2
Constructor Summary |
SequenceAlignment(java.io.File f)
Deprecated. Creates a sequence alignment from a file. |
SequenceAlignment(java.io.File f,
Ambiguous ambig)
Deprecated. Creates a sequence alignment from a file with ambiguouis data. |
Methods inherited from class Alignments.Alignment |
check, getCount, getLength, getNumber, getRawFreq, getSite, getTaxa, getUniqueSites, iterator, limitToTaxa, recode, recode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceAlignment
public SequenceAlignment(java.io.File f)
throws InputException,
AlignmentException
- Deprecated.
- Creates a sequence alignment from a file. File should be in a format similar
to Phylip. The first non-blank line, which normally gives the number and length
of the sequence, is ignored. Further non-blank lines represent each sequence, one
per line. Anything from the start of the line to the first white space is
considered the taxa's name. Anything after the first whitespace is the sequence.
Whitespace in the sequence is ignored. A taxa name of
*class*
is
assumed not to be a taxa but rather gfives the class of each site (which can be any
single character).
- Parameters:
f
- The input file
- Throws:
InputException
- Thrown if there is a problem reading the file
AlignmentException
- Thrown if there issomething wrong with the alignment, e.g.
different length sequences
SequenceAlignment
public SequenceAlignment(java.io.File f,
Ambiguous ambig)
throws InputException,
AlignmentException
- Deprecated.
- Creates a sequence alignment from a file with ambiguouis data. File should
be in
SequenceAlignment(java.io.File)
- Parameters:
f
- The input fileambig
- Desription o the ambiguous data
- Throws:
InputException
- Thrown if there is a problem with the input file
AlignmentException
- Thrown if there issomething wrong with the alignment, e.g.
different length sequences
writeFile
public static void writeFile(Alignment a,
java.io.File f)
throws OutputException
- Deprecated.
- Writes a alignment to a file in the format described in
SequenceAlignment(java.io.File)
.
- Parameters:
a
- The alignment to write to the file. Need not be a sequence alignmentf
- The file to write to
- Throws:
OutputException
- Thrown if there is a problem creating the file