30 if (format == FASTA_FORMAT)
31 return make_unique<Fasta>();
32 else if (format == MASE_FORMAT)
33 return make_unique<Mase>();
34 else if (format == CLUSTAL_FORMAT)
35 return make_unique<Clustal>();
36 else if (format == DCSE_FORMAT)
37 return make_unique<DCSE>();
38 else if (format == PHYLIP_FORMAT_INTERLEAVED)
39 return make_unique<Phylip>(
false,
false);
40 else if (format == PHYLIP_FORMAT_SEQUENTIAL)
41 return make_unique<Phylip>(
false,
true);
42 else if (format == PAML_FORMAT_INTERLEAVED)
43 return make_unique<Phylip>(
true,
false);
44 else if (format == PAML_FORMAT_SEQUENTIAL)
45 return make_unique<Phylip>(
true,
true);
46 else if (format == GENBANK_FORMAT)
47 return make_unique<GenBank>();
48 else if (format == NEXUS_FORMAT)
49 return make_unique<NexusIOSequence>();
51 throw Exception(
"Format " + format +
" is not supported for sequences input.");
56 if (format == FASTA_FORMAT)
57 return make_unique<Fasta>();
58 else if (format == MASE_FORMAT)
59 return make_unique<Mase>();
60 else if (format == CLUSTAL_FORMAT)
61 return make_unique<Clustal>();
62 else if (format == DCSE_FORMAT)
63 return make_unique<DCSE>();
64 else if (format == PHYLIP_FORMAT_INTERLEAVED)
65 return make_unique<Phylip>(
false,
false);
66 else if (format == PHYLIP_FORMAT_SEQUENTIAL)
67 return make_unique<Phylip>(
false,
true);
68 else if (format == PAML_FORMAT_INTERLEAVED)
69 return make_unique<Phylip>(
true,
false);
70 else if (format == PAML_FORMAT_SEQUENTIAL)
71 return make_unique<Phylip>(
true,
true);
72 else if (format == NEXUS_FORMAT)
73 return make_unique<NexusIOSequence>();
75 throw Exception(
"Format " + format +
" is not supported for alignment input.");
80 if (format == FASTA_FORMAT)
81 return make_unique<Fasta>();
82 else if (format == MASE_FORMAT)
83 return make_unique<Mase>();
85 throw Exception(
"Format " + format +
" is not supported for output.");
90 if (format == FASTA_FORMAT)
91 return make_unique<Fasta>();
92 else if (format == MASE_FORMAT)
93 return make_unique<Mase>();
94 else if (format == PHYLIP_FORMAT_INTERLEAVED)
95 return make_unique<Phylip>(
false,
false);
96 else if (format == PHYLIP_FORMAT_SEQUENTIAL)
97 return make_unique<Phylip>(
false,
true);
98 else if (format == PAML_FORMAT_INTERLEAVED)
99 return make_unique<Phylip>(
true,
false);
100 else if (format == PAML_FORMAT_SEQUENTIAL)
101 return make_unique<Phylip>(
true,
true);
103 throw Exception(
"Format " + format +
" is not supported for output.");
static const std::string DCSE_FORMAT
static const std::string PHYLIP_FORMAT_SEQUENTIAL
static const std::string GENBANK_FORMAT
virtual std::unique_ptr< IAlignment > createAlignmentReader(const std::string &format)
Get a new dynamically created IAlignment object.
static const std::string PAML_FORMAT_INTERLEAVED
static const std::string CLUSTAL_FORMAT
virtual std::unique_ptr< OSequence > createWriter(const std::string &format)
Get a new dynamically created OSequence object.
virtual std::unique_ptr< OAlignment > createAlignmentWriter(const std::string &format)
Get a new dynamically created OAlignment object.
static const std::string NEXUS_FORMAT
static const std::string PHYLIP_FORMAT_INTERLEAVED
static const std::string MASE_FORMAT
static const std::string FASTA_FORMAT
static const std::string PAML_FORMAT_SEQUENTIAL
virtual std::unique_ptr< ISequence > createReader(const std::string &format)
Get a new dynamically created ISequence object.
This alphabet is used to deal NumericAlphabet.