//**********************************************************************************************************************
BinSeqCommand::BinSeqCommand(){
try {
- abort = true;
- //initialize outputTypes
+ abort = true; calledHelp = true;
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
}
BinSeqCommand::BinSeqCommand(string option) {
try {
globaldata = GlobalData::getInstance();
- abort = false;
+ abort = false; calledHelp = false;
allLines = 1;
labels.clear();
//allow user to run help
- if(option == "help") { help(); abort = true; }
+ if(option == "help") { help(); abort = true; calledHelp = true; }
else {
//valid paramters for this command
int BinSeqCommand::execute(){
try {
- if (abort == true) { return 0; }
+ if (abort == true) { if (calledHelp) { return 0; } return 2; }
int error = 0;
if (sequence != "not found") {
//if you don't have groups
if (groupfile == "") {
- name = name + "|" + toString(i+1);
+ name = name + "\t" + toString(i+1);
out << ">" << name << endl;
out << sequence << endl;
}else {//if you do have groups
m->mothurOut(name + " is missing from your group file. Please correct. "); m->mothurOutEndLine();
return 1;
}else{
- name = name + "|" + group + "|" + toString(i+1);
+ name = name + "\t" + group + "\t" + toString(i+1);
out << ">" << name << endl;
out << sequence << endl;
}
if (sequence != "not found") {
//if you don't have groups
if (groupfile == "") {
- binnames = binnames + "|" + toString(i+1);
+ binnames = binnames + "\t" + toString(i+1);
out << ">" << binnames << endl;
out << sequence << endl;
}else {//if you do have groups
m->mothurOut(binnames + " is missing from your group file. Please correct. "); m->mothurOutEndLine();
return 1;
}else{
- binnames = binnames + "|" + group + "|" + toString(i+1);
+ binnames = binnames + "\t" + group + "\t" + toString(i+1);
out << ">" << binnames << endl;
out << sequence << endl;
}