Package org.biojava.bio.seq.io
Class FastaAlignmentFormat
- java.lang.Object
-
- org.biojava.bio.seq.io.FastaAlignmentFormat
-
- All Implemented Interfaces:
AlignmentFormat
public class FastaAlignmentFormat extends java.lang.Object implements AlignmentFormat
This class implements the AlignmentFormat interface to read FASTA alignments. It is modeled after the MSFAlignmentFormat class.- Author:
- Nimesh Singh
-
-
Constructor Summary
Constructors Constructor Description FastaAlignmentFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Alignmentread(java.io.BufferedReader br)Reads an alignment in FASTA format.voidwrite(java.io.OutputStream os, Alignment align, int fileType)Writes out the alignment to an FASTA file.voidwriteDna(java.io.OutputStream os, Alignment align)voidwriteProtein(java.io.OutputStream os, Alignment align)
-
-
-
Field Detail
-
DNA
public static final int DNA
- See Also:
- Constant Field Values
-
PROTEIN
public static final int PROTEIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
read
public Alignment read(java.io.BufferedReader br)
Reads an alignment in FASTA format.- Specified by:
readin interfaceAlignmentFormat- Parameters:
br- the reader from which to read in the alignment
-
write
public void write(java.io.OutputStream os, Alignment align, int fileType) throws BioException, IllegalSymbolExceptionWrites out the alignment to an FASTA file.- Throws:
BioExceptionIllegalSymbolException
-
writeDna
public void writeDna(java.io.OutputStream os, Alignment align) throws BioException, IllegalSymbolException- Throws:
BioExceptionIllegalSymbolException
-
writeProtein
public void writeProtein(java.io.OutputStream os, Alignment align) throws BioException, IllegalSymbolException- Throws:
BioExceptionIllegalSymbolException
-
-