Package org.biojavax.bio.phylo.io.phylip
Class PHYLIPFileBuilder
java.lang.Object
org.biojavax.bio.phylo.io.phylip.PHYLIPFileBuilder
- All Implemented Interfaces:
PHYLIPFileListener
Builds a PHYLIP file by listening to events.
- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
endFile()
Finished reading a file.void
receiveSequence
(String sequence) Receive sequence data for the current sequence.void
setCurrentSequenceName
(String name) Set the name of the sequence which is about to be received.void
setSequenceCount
(int count) Set the number of sequences in the alignment.void
setSitesCount
(int count) Set the number of sites in the alignmentvoid
About to start a new file.
-
Constructor Details
-
PHYLIPFileBuilder
public PHYLIPFileBuilder()
-
-
Method Details
-
startFile
Description copied from interface:PHYLIPFileListener
About to start a new file.- Specified by:
startFile
in interfacePHYLIPFileListener
-
endFile
Description copied from interface:PHYLIPFileListener
Finished reading a file.- Specified by:
endFile
in interfacePHYLIPFileListener
- Throws:
ParseException
-
setSequenceCount
Description copied from interface:PHYLIPFileListener
Set the number of sequences in the alignment.- Specified by:
setSequenceCount
in interfacePHYLIPFileListener
- Parameters:
count
- the expected number of sequences
-
setSitesCount
Description copied from interface:PHYLIPFileListener
Set the number of sites in the alignment- Specified by:
setSitesCount
in interfacePHYLIPFileListener
- Parameters:
count
- the expected number of sites
-
setCurrentSequenceName
Description copied from interface:PHYLIPFileListener
Set the name of the sequence which is about to be received. If the name has already been seen, the sequence should be appended.- Specified by:
setCurrentSequenceName
in interfacePHYLIPFileListener
- Parameters:
name
- the label for the current sequence
-
receiveSequence
Description copied from interface:PHYLIPFileListener
Receive sequence data for the current sequence.- Specified by:
receiveSequence
in interfacePHYLIPFileListener
- Parameters:
sequence
- sequence text for the current sequence
-
getAlignment
-