Package org.biojavax.bio.phylo.io.phylip
Class PHYLIPFileFormat
java.lang.Object
org.biojavax.bio.phylo.io.phylip.PHYLIPFileFormat
Reads PHYLIP interleaved alignment files and fires events at a PHYLIPFileListener object.
- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidparse(PHYLIPFileListener listener, BufferedReader reader) static voidparseFile(PHYLIPFileListener listener, File inputFile) static voidparseInputStream(PHYLIPFileListener listener, InputStream inputStream) static voidparseReader(PHYLIPFileListener listener, Reader inputReader) static voidWrites the given Alignment in PHYLIP format to a file.static voidwriteStream(OutputStream os, Alignment alignment) Writes the given Alignment in PHYLIP format to a stream.static voidwriteWriter(Writer writer, Alignment alignment) Writes the given Alignment in PHYLIP format to a writer.
-
Method Details
-
parseFile
public static void parseFile(PHYLIPFileListener listener, File inputFile) throws IOException, ParseException - Throws:
IOExceptionParseException
-
parseInputStream
public static void parseInputStream(PHYLIPFileListener listener, InputStream inputStream) throws IOException, ParseException - Throws:
IOExceptionParseException
-
parseReader
public static void parseReader(PHYLIPFileListener listener, Reader inputReader) throws IOException, ParseException - Throws:
IOExceptionParseException
-
parse
public static void parse(PHYLIPFileListener listener, BufferedReader reader) throws IOException, ParseException - Throws:
IOExceptionParseException
-
writeFile
Writes the given Alignment in PHYLIP format to a file.- Parameters:
file- the file to write to.alignment- the Alignment object to write.- Throws:
IOException- if there is a problem during writing.
-
writeStream
Writes the given Alignment in PHYLIP format to a stream.- Parameters:
os- the stream to write to.alignment- the Alignment object to write.- Throws:
IOException- if there is a problem during writing.
-
writeWriter
Writes the given Alignment in PHYLIP format to a writer.- Parameters:
writer- the writer to write to.alignment- the Alignment object to write.- Throws:
IOException- if there is a problem during writing.
-