bpp-seq3
3.0.0
|
Distance matrix I/O in Phylip format. More...
#include <Bpp/Seq/Io/PhylipDistanceMatrixFormat.h>
Public Member Functions | |
PhylipDistanceMatrixFormat (bool extended=false) | |
virtual | ~PhylipDistanceMatrixFormat () |
const std::string | getFormatName () const |
const std::string | getFormatDescription () const |
std::unique_ptr< DistanceMatrix > | readDistanceMatrix (const std::string &path) const |
Read a distance matrix from a file. More... | |
std::unique_ptr< DistanceMatrix > | readDistanceMatrix (std::istream &in) const |
Read a distance matrix from a stream. More... | |
void | writeDistanceMatrix (const DistanceMatrix &dist, const std::string &path, bool overwrite=true) const |
Write a distance matrix to a file. More... | |
void | writeDistanceMatrix (const DistanceMatrix &dist, std::ostream &out) const |
Write a distance matrix to a stream. More... | |
virtual const std::string | getDataType () const |
Private Attributes | |
bool | extended_ |
Distance matrix I/O in Phylip format.
Entry names must be 10 characters long. If 'extended' is set to true, then entry names can be of any size, and should be separated from the data by at least two spaces. Names should therefore not contain more than one consecutive space.
Definition at line 20 of file PhylipDistanceMatrixFormat.h.
|
inline |
Definition at line 28 of file PhylipDistanceMatrixFormat.h.
|
inlinevirtual |
Definition at line 29 of file PhylipDistanceMatrixFormat.h.
|
inlinevirtualinherited |
Implements bpp::IOFormat.
Definition at line 28 of file IoDistanceMatrix.h.
|
inlinevirtual |
Implements bpp::IOFormat.
Definition at line 34 of file PhylipDistanceMatrixFormat.h.
|
inlinevirtual |
Implements bpp::IOFormat.
Definition at line 32 of file PhylipDistanceMatrixFormat.h.
|
inlinevirtual |
Read a distance matrix from a file.
path | The file path. |
Exception | If an error occurred. |
Reimplemented from bpp::AbstractIDistanceMatrix.
Definition at line 36 of file PhylipDistanceMatrixFormat.h.
References bpp::AbstractIDistanceMatrix::readDistanceMatrix().
|
virtual |
Read a distance matrix from a stream.
in | The input stream. |
Exception | If an error occurred. |
Implements bpp::AbstractIDistanceMatrix.
Definition at line 21 of file PhylipDistanceMatrixFormat.cpp.
References bpp::FileTools::getNextLine(), bpp::StringTokenizer::hasMoreToken(), and bpp::StringTokenizer::nextToken().
|
inlinevirtual |
Write a distance matrix to a file.
dist | A distance matrix object. |
path | The file path. |
overwrite | Tell if existing file must be overwritten. Otherwise append to the file. |
Exception | If an error occurred. |
Reimplemented from bpp::AbstractODistanceMatrix.
Definition at line 43 of file PhylipDistanceMatrixFormat.h.
References bpp::AbstractODistanceMatrix::writeDistanceMatrix().
|
virtual |
Write a distance matrix to a stream.
dist | A distance matrix object. |
out | The output stream. |
Exception | If an error occurred. |
Implements bpp::AbstractODistanceMatrix.
Definition at line 64 of file PhylipDistanceMatrixFormat.cpp.
References bpp::DistanceMatrix::getName(), bpp::TextTools::resizeRight(), and bpp::DistanceMatrix::size().
|
private |
Definition at line 25 of file PhylipDistanceMatrixFormat.h.