polish: rm extra endl
This commit is contained in:
parent
26e358ffef
commit
0cbec45015
1 changed files with 10 additions and 19 deletions
29
main.cpp
29
main.cpp
|
@ -269,16 +269,13 @@ void writeNex(class Sample sam, char* otn) {
|
||||||
ofstream matrixfile(otn);
|
ofstream matrixfile(otn);
|
||||||
string datatype;
|
string datatype;
|
||||||
datatype = checktype(sam.chars[0]);
|
datatype = checktype(sam.chars[0]);
|
||||||
matrixfile << "#NEXUS" << endl;
|
matrixfile << "#NEXUS\nBegin data;\n\tDimensions nchar=" << sam.nchar
|
||||||
matrixfile << "Begin data;" << endl
|
<< " ntax=" << sam.ntax << ";\n\tFormat datatype=" << datatype
|
||||||
<< "\tDimensions nchar=" << sam.nchar << " ntax=" << sam.ntax
|
<< " missing=? gap=-;\n\tMatrix" << endl;
|
||||||
<< ";" << endl
|
|
||||||
<< "\tFormat datatype=" << datatype << " missing=? gap=-;" << endl
|
|
||||||
<< "\tMatrix" << endl;
|
|
||||||
for (unsigned int i2 = 0; i2 < sam.ntax; i2++) {
|
for (unsigned int i2 = 0; i2 < sam.ntax; i2++) {
|
||||||
matrixfile << "\t\t" << sam.taxas[i2] << "\t" << sam.chars[i2] << endl;
|
matrixfile << "\t\t" << sam.taxas[i2] << "\t" << sam.chars[i2] << endl;
|
||||||
}
|
}
|
||||||
matrixfile << "\t;" << endl << "End;" << endl;
|
matrixfile << "\t;\nEnd;" << endl;
|
||||||
matrixfile.close();
|
matrixfile.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,8 +316,7 @@ int countfre(string str, char c) {
|
||||||
|
|
||||||
void writeTnt(class Sample sam, char* otn) {
|
void writeTnt(class Sample sam, char* otn) {
|
||||||
ofstream matrixfile(otn);
|
ofstream matrixfile(otn);
|
||||||
matrixfile << "xread" << endl << "\' \'" << endl;
|
matrixfile << "xread\n\' \'\n" << sam.nchar << " " << sam.ntax << endl;
|
||||||
matrixfile << sam.nchar << " " << sam.ntax << endl;
|
|
||||||
for (unsigned int i = 0; i < sam.ntax; i++) {
|
for (unsigned int i = 0; i < sam.ntax; i++) {
|
||||||
matrixfile << sam.taxas[i] << "\t" << sam.chars[i] << endl;
|
matrixfile << sam.taxas[i] << "\t" << sam.chars[i] << endl;
|
||||||
}
|
}
|
||||||
|
@ -410,16 +406,11 @@ void show_help(int help_num) {
|
||||||
<< endl;
|
<< endl;
|
||||||
} else {
|
} else {
|
||||||
cout << "\n /l、 \t. . . .\n(゚、 。 7 \t|\\/|*|\\/|*\n l ~ヽ "
|
cout << "\n /l、 \t. . . .\n(゚、 。 7 \t|\\/|*|\\/|*\n l ~ヽ "
|
||||||
" \t| ||| ||\n じしf_,)ノ\t| ||| ||\n"
|
" \t| ||| ||\n じしf_,)ノ\t| ||| ||\n\nMorphology into "
|
||||||
<< endl;
|
"Molecules into\nGPL;\tGuoyi "
|
||||||
cout << "Morphology into Molecules into\n"
|
"Zhang;\t2023\n\nArguments:\n-h\t--help;\n-i\t--input\t\t${"
|
||||||
<< "GPL;\tGuoyi Zhang;\t2023\n"
|
"filename};\n-o\t--output\t${filename};\n\nAccepted "
|
||||||
<< endl;
|
"formats:\nfas\tfasta;\nnex\tnexus;\nphy\tphylip;\ntnt\tss;"
|
||||||
cout << "-h\t--help;\n-i\t--input\t\t${filename};\n-o\t--output\t${"
|
|
||||||
"filename};\n"
|
|
||||||
<< endl;
|
|
||||||
cout
|
|
||||||
<< "Accepted formats:\nfas\tfasta;\nnex\tnexus;\nphy\tphylip;\ntnt\tss;"
|
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue