19 #include "../../BasicAlleleInfo.h"
35 static const std::string
TAB;
36 static const std::string
COMA;
48 std::vector<std::string>
getValues_(std::string& param_line,
const std::string& delim);
52 void parseLoci_(
const std::vector<std::string>& in, std::vector<LocusInfo>& locus_info);
58 PopgenlibIO(
const std::string& missing_data_symbol,
const std::string& data_separator);
117 void read(
const std::string& path,
DataSet& data_set);
128 void write(std::ostream& os,
const DataSet& data_set)
const;
130 void write(
const std::string& path,
const DataSet& data_set,
bool overwrite)
const;
141 return "PopgenlibIO ver 0.1";
145 return "IO format used to store DataSets inspired from Arlequin and Fasta";
Partial implementation of the DataSet Input interface.
Partial implementation of the DataSet Output interface.
The native I/O format for popgenlib.
static const std::string UNKNOWN
void parseIndividual_(const std::vector< std::string > &in, DataSet &data_set, const VectorSequenceContainer &vsc)
static const std::string HAPLODIPLOID
void parseLocality_(const std::vector< std::string > &in, DataSet &data_set)
static const std::string COMA
void write(std::ostream &os, const DataSet &data_set) const
Write a DataSet on ostream.
char missing_data_symbol_
static const std::string TAB
const std::string getFormatDescription() const
static const std::string SEMICOLON
void read(std::istream &is, DataSet &data_set)
Read a DataSet on istream.
std::string getDataSeparator() const
Get the code for data separator.
static const std::string DIPLOID
std::string getMissingDataSymbol() const
Get the code for missing data.
static const std::string WHITESPACE
std::vector< std::string > getValues_(std::string ¶m_line, const std::string &delim)
char getMissingDataChar() const
Get the character for missing data.
const std::string getFormatName() const
void parseLoci_(const std::vector< std::string > &in, std::vector< LocusInfo > &locus_info)
void setDataSeparator(const std::string &data_separator)
Set the code for data separator.
static const std::string HAPLOID
void parseGeneral_(const std::vector< std::string > &in, DataSet &data_set)
void setMissingDataSymbol(const std::string &missing_data_symbol)
Set the code for missing data.
void parseSequence_(const std::vector< std::string > &in, VectorSequenceContainer &vsc)
char getDataSeparatorChar() const
Get the data separator char.