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 TypeMethodDescriptionvoidendFile()Finished reading a file.voidreceiveSequence(String sequence) Receive sequence data for the current sequence.voidsetCurrentSequenceName(String name) Set the name of the sequence which is about to be received.voidsetSequenceCount(int count) Set the number of sequences in the alignment.voidsetSitesCount(int count) Set the number of sites in the alignmentvoidAbout to start a new file.
-
Constructor Details
-
PHYLIPFileBuilder
public PHYLIPFileBuilder()
-
-
Method Details
-
startFile
Description copied from interface:PHYLIPFileListenerAbout to start a new file.- Specified by:
startFilein interfacePHYLIPFileListener
-
endFile
Description copied from interface:PHYLIPFileListenerFinished reading a file.- Specified by:
endFilein interfacePHYLIPFileListener- Throws:
ParseException
-
setSequenceCount
Description copied from interface:PHYLIPFileListenerSet the number of sequences in the alignment.- Specified by:
setSequenceCountin interfacePHYLIPFileListener- Parameters:
count- the expected number of sequences
-
setSitesCount
Description copied from interface:PHYLIPFileListenerSet the number of sites in the alignment- Specified by:
setSitesCountin interfacePHYLIPFileListener- Parameters:
count- the expected number of sites
-
setCurrentSequenceName
Description copied from interface:PHYLIPFileListenerSet 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:
setCurrentSequenceNamein interfacePHYLIPFileListener- Parameters:
name- the label for the current sequence
-
receiveSequence
Description copied from interface:PHYLIPFileListenerReceive sequence data for the current sequence.- Specified by:
receiveSequencein interfacePHYLIPFileListener- Parameters:
sequence- sequence text for the current sequence
-
getAlignment
-