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 void
parse
(PHYLIPFileListener listener, BufferedReader reader) static void
parseFile
(PHYLIPFileListener listener, File inputFile) static void
parseInputStream
(PHYLIPFileListener listener, InputStream inputStream) static void
parseReader
(PHYLIPFileListener listener, Reader inputReader) static void
Writes the given Alignment in PHYLIP format to a file.static void
writeStream
(OutputStream os, Alignment alignment) Writes the given Alignment in PHYLIP format to a stream.static void
writeWriter
(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:
IOException
ParseException
-
parseInputStream
public static void parseInputStream(PHYLIPFileListener listener, InputStream inputStream) throws IOException, ParseException - Throws:
IOException
ParseException
-
parseReader
public static void parseReader(PHYLIPFileListener listener, Reader inputReader) throws IOException, ParseException - Throws:
IOException
ParseException
-
parse
public static void parse(PHYLIPFileListener listener, BufferedReader reader) throws IOException, ParseException - Throws:
IOException
ParseException
-
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.
-