48 #include <Bpp/Text/KeyvalTools.h> 58 unparsedArguments_.clear();
60 KeyvalTools::parseProcedure(description, format, unparsedArguments_);
61 auto_ptr<IAlignment> iAln;
64 iAln.reset(
new Mase());
66 else if (format ==
"Phylip")
68 bool sequential =
true, extended =
true;
70 string order = ApplicationTools::getStringParameter(
"order", unparsedArguments_,
"sequential",
"",
true, warningLevel_);
71 if (order ==
"sequential")
73 else if (order ==
"interleaved")
76 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'order' for phylip format: " + order);
78 string type = ApplicationTools::getStringParameter(
"type", unparsedArguments_,
"extended",
"",
true, warningLevel_);
79 if (type ==
"extended")
82 split = ApplicationTools::getStringParameter(
"split", unparsedArguments_,
"spaces",
"",
true, warningLevel_);
83 if (split ==
"spaces")
85 else if (split ==
"tab")
88 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'split' for phylip format: " + split);
90 else if (type ==
"classic")
93 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'type' for phylip format: " + type);
95 iAln.reset(
new Phylip(extended, sequential, 100,
true, split));
97 else if (format ==
"Fasta")
99 bool strictNames = ApplicationTools::getBooleanParameter(
"strict_names", unparsedArguments_,
false,
"",
true, warningLevel_);
100 bool extended = ApplicationTools::getBooleanParameter(
"extended", unparsedArguments_,
false,
"",
true, warningLevel_);
101 iAln.reset(
new Fasta(100,
true, extended, strictNames));
103 else if (format ==
"Clustal")
105 unsigned int extraSpaces = ApplicationTools::getParameter<unsigned int>(
"extraSpaces", unparsedArguments_, 0,
"",
true, warningLevel_);
106 iAln.reset(
new Clustal(
true, extraSpaces));
108 else if (format ==
"Dcse")
110 iAln.reset(
new DCSE());
112 else if (format ==
"Nexus")
118 throw Exception(
"Sequence format '" + format +
"' unknown.");
121 return iAln.release();
The fasta sequence file format.
This alphabet is used to deal NumericAlphabet.
The clustal sequence file format.
The mase sequence file format.
The Nexus format reader for sequences.
Support for the Dedicated Comparative Sequence Editor format.
The IAlignment interface.