X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sensspeccommand.cpp;h=55d90bdd2ce1debc857ddb33a47969e0c3f66933;hb=2c97dd48b8e27ee0a6a86c7a082f4c504c3357c6;hp=2fb2efbc25ef434850f87115bc6d93a91a23dd6f;hpb=30910bfac62a1299cd20d99683c4fae68bfc2c1b;p=mothur.git diff --git a/sensspeccommand.cpp b/sensspeccommand.cpp index 2fb2efb..55d90bd 100644 --- a/sensspeccommand.cpp +++ b/sensspeccommand.cpp @@ -19,7 +19,7 @@ vector SensSpecCommand::setParameters(){ CommandParameter plabel("label", "String", "", "", "", "", "",false,false); parameters.push_back(plabel); CommandParameter pcutoff("cutoff", "Number", "", "-1.00", "", "", "",false,false); parameters.push_back(pcutoff); CommandParameter pprecision("precision", "Number", "", "100", "", "", "",false,false); parameters.push_back(pprecision); - CommandParameter phard("hard", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(phard); + CommandParameter phard("hard", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(phard); CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir); CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir); @@ -183,11 +183,11 @@ SensSpecCommand::SensSpecCommand(string option) { // cout << "name:\t" << nameFile << endl; temp = validParameter.validFile(parameters, "cutoff", false); if (temp == "not found") { temp = "-1.00"; } - convert(temp, cutoff); + m->mothurConvert(temp, cutoff); // cout << cutoff << endl; temp = validParameter.validFile(parameters, "precision", false); if (temp == "not found") { temp = "100"; } - convert(temp, precision); + m->mothurConvert(temp, precision); // cout << precision << endl; string label = validParameter.validFile(parameters, "label", false); @@ -256,7 +256,9 @@ int SensSpecCommand::processPhylip(){ while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) { - if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } delete list; return 0; } + if(m->control_pressed){ + for (int i = 0; i < outputNames.size(); i++){ m->mothurRemove(outputNames[i]); } delete list; return 0; + } if(allLines == 1 || labels.count(list->getLabel()) == 1){ @@ -324,7 +326,9 @@ int SensSpecCommand::processPhylip(){ exit(1); } } + //*************************************************************************************************************** + int SensSpecCommand::fillSeqMap(map& seqMap, ListVector*& list){ try { //for each otu @@ -387,7 +391,7 @@ int SensSpecCommand::fillSeqPairSet(set& seqPairSet, ListVector*& list){ return numSeqs; } catch(exception& e) { - m->errorOut(e, "SensSpecCommand", "fillSeqMap"); + m->errorOut(e, "SensSpecCommand", "fillSeqPairSet"); exit(1); } } @@ -401,7 +405,7 @@ int SensSpecCommand::process(map& seqMap, string label, bool& getCu ifstream phylipFile; m->openInputFile(distFile, phylipFile); phylipFile >> pNumSeqs; - if(pNumSeqs != lNumSeqs){ m->mothurOut("numSeq mismatch!\n"); m->control_pressed = true; } + if(pNumSeqs != lNumSeqs){ m->mothurOut("numSeq mismatch!\n"); /*m->control_pressed = true;*/ } string seqName; double distance; @@ -426,7 +430,7 @@ int SensSpecCommand::process(map& seqMap, string label, bool& getCu m->mothurOut(label); m->mothurOutEndLine(); - for(int i=0;icontrol_pressed) { return 0; }