5 #include <Bpp/Text/KeyvalTools.h> 23 unparsedArguments_.clear();
25 KeyvalTools::parseProcedure(description, format, unparsedArguments_);
26 unique_ptr<IAlignment> iAln;
29 iAln.reset(
new Mase());
31 else if (format ==
"Phylip")
33 bool sequential =
true, extended =
true;
35 string order = ApplicationTools::getStringParameter(
"order", unparsedArguments_,
"sequential",
"",
true, warningLevel_);
36 if (order ==
"sequential")
38 else if (order ==
"interleaved")
41 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'order' for phylip format: " + order);
43 string type = ApplicationTools::getStringParameter(
"type", unparsedArguments_,
"extended",
"",
true, warningLevel_);
44 if (type ==
"extended")
47 split = ApplicationTools::getStringParameter(
"split", unparsedArguments_,
"spaces",
"",
true, warningLevel_);
48 if (split ==
"spaces")
50 else if (split ==
"tab")
53 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'split' for phylip format: " + split);
55 else if (type ==
"classic")
58 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'type' for phylip format: " + type);
60 iAln.reset(
new Phylip(extended, sequential, 100, split));
62 else if (format ==
"Fasta")
64 bool strictNames = ApplicationTools::getBooleanParameter(
"strict_names", unparsedArguments_,
false,
"",
true, warningLevel_);
65 bool extended = ApplicationTools::getBooleanParameter(
"extended", unparsedArguments_,
false,
"",
true, warningLevel_);
66 iAln.reset(
new Fasta(100,
true, extended, strictNames));
68 else if (format ==
"Clustal")
70 unsigned int extraSpaces = ApplicationTools::getParameter<unsigned int>(
"extraSpaces", unparsedArguments_, 0,
"",
true, warningLevel_);
71 iAln.reset(
new Clustal(
true, extraSpaces));
73 else if (format ==
"Dcse")
75 iAln.reset(
new DCSE());
77 else if (format ==
"Nexus")
83 throw IOException(
"Sequence format '" + format +
"' unknown.");
92 unparsedArguments_.clear();
94 KeyvalTools::parseProcedure(description, format, unparsedArguments_);
95 unique_ptr<IProbabilisticAlignment> iAln;
97 if (format ==
"Pasta")
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 Pasta(100, extended, strictNames));
105 throw IOException(
"Probabilistic Sequence format '" + format +
"' unknown.");
The fasta sequence file format.
This alphabet is used to deal NumericAlphabet.
The clustal sequence file format.
The Pasta sequence file format.
The mase sequence file format.
The Nexus format reader for sequences.
Support for the Dedicated Comparative Sequence Editor format.