49 #include <Bpp/Text/KeyvalTools.h> 59 unparsedArguments_.clear();
61 KeyvalTools::parseProcedure(description, format, unparsedArguments_);
62 auto_ptr<ISequence> iSeq;
65 iSeq.reset(
new Mase());
67 else if (format ==
"Phylip")
69 bool sequential =
true, extended =
true;
71 string order = ApplicationTools::getStringParameter(
"order", unparsedArguments_,
"sequential",
"",
true, warningLevel_);
72 if (order ==
"sequential")
74 else if (order ==
"interleaved")
77 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'order' for phylip format: " + order);
79 string type = ApplicationTools::getStringParameter(
"type", unparsedArguments_,
"extended",
"",
true, warningLevel_);
80 if (type ==
"extended")
83 split = ApplicationTools::getStringParameter(
"split", unparsedArguments_,
"spaces",
"",
true, warningLevel_);
84 if (split ==
"spaces")
86 else if (split ==
"tab")
89 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'split' for phylip format: " + split);
91 else if (type ==
"classic")
94 throw Exception(
"BppOAlignmentReaderFormat::read. Invalid argument 'type' for phylip format: " + type);
96 iSeq.reset(
new Phylip(extended, sequential, 100,
true, split));
98 else if (format ==
"Fasta")
100 bool strictNames = ApplicationTools::getBooleanParameter(
"strict_names", unparsedArguments_,
false,
"",
true, warningLevel_);
101 bool extended = ApplicationTools::getBooleanParameter(
"extended", unparsedArguments_,
false,
"",
true, warningLevel_);
102 iSeq.reset(
new Fasta(100,
true, extended, strictNames));
104 else if (format ==
"Clustal")
106 unsigned int extraSpaces = ApplicationTools::getParameter<unsigned int>(
"extraSpaces", unparsedArguments_, 0,
"",
true, warningLevel_);
107 iSeq.reset(
new Clustal(
true, extraSpaces));
109 else if (format ==
"Dcse")
111 iSeq.reset(
new DCSE());
113 else if (format ==
"GenBank")
117 else if (format ==
"Nexus")
123 throw Exception(
"Sequence format '" + format +
"' unknown.");
126 return iSeq.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 GenBank sequence file format.