X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=summarysharedcommand.cpp;h=b5214448cd2a5e8f8af0b70bfc700ee05465d4af;hb=4169642e8a8d45f71a4a7241ee02f1b1aae29520;hp=029ca26638830f456179f5595b3fd8300f631c70;hpb=5694c92fbf646fe01abc87bde2af59e14a9a56b6;p=mothur.git diff --git a/summarysharedcommand.cpp b/summarysharedcommand.cpp index 029ca26..b521444 100644 --- a/summarysharedcommand.cpp +++ b/summarysharedcommand.cpp @@ -65,8 +65,7 @@ vector SummarySharedCommand::getValidParameters(){ //********************************************************************************************************************** SummarySharedCommand::SummarySharedCommand(){ try { - abort = true; - //initialize outputTypes + abort = true; calledHelp = true; vector tempOutNames; outputTypes["summary"] = tempOutNames; } @@ -103,13 +102,13 @@ vector SummarySharedCommand::getRequiredFiles(){ SummarySharedCommand::SummarySharedCommand(string option) { try { globaldata = GlobalData::getInstance(); - abort = false; + abort = false; calledHelp = false; allLines = 1; labels.clear(); Estimators.clear(); //allow user to run help - if(option == "help") { validCalculator = new ValidCalculators(); help(); abort = true; } + if(option == "help") { validCalculator = new ValidCalculators(); help(); abort = true; calledHelp = true; } else { //valid paramters for this command @@ -317,7 +316,7 @@ SummarySharedCommand::~SummarySharedCommand(){ int SummarySharedCommand::execute(){ try { - if (abort == true) { return 0; } + if (abort == true) { if (calledHelp) { return 0; } return 2; } ofstream outputFileHandle, outAll; string outputFileName = outputDir + m->getRootName(m->getSimpleName(globaldata->inputFileName)) + "shared.summary"; @@ -744,7 +743,7 @@ int SummarySharedCommand::driver(vector thisLookup, int sta outputFileHandle << '\t'; sumCalculators[i]->print(outputFileHandle); - seqDist temp(l, k, tempdata[0]); + seqDist temp(l, k, (1.0 - tempdata[0])); calcDists[i].push_back(temp); } outputFileHandle << endl;