X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=pcoacommand.cpp;h=02e165e978dc071ba19808139060866d7e41388c;hb=2009a1a1f47e7467094d844e7c07ab8ddf7bb447;hp=5d917372e5f88a5a45b762efc57ab388d80a4ebc;hpb=e150b0b0664caec517485ee6d69dcdade6dcae77;p=mothur.git diff --git a/pcoacommand.cpp b/pcoacommand.cpp index 5d91737..02e165e 100644 --- a/pcoacommand.cpp +++ b/pcoacommand.cpp @@ -111,7 +111,7 @@ PCOACommand::PCOACommand(string option) { phylipfile = m->getPhylipFile(); if (phylipfile != "") { m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); } else { m->mothurOut("You have no current phylip file and the phylip parameter is required."); m->mothurOutEndLine(); abort = true; } - } + }else { m->setPhylipFile(phylipfile); } filename = phylipfile; @@ -172,7 +172,7 @@ int PCOACommand::execute(){ output(fbase, names, G, d); - if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; } + if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; } if (metric) { @@ -180,13 +180,13 @@ int PCOACommand::execute(){ vector< vector > EuclidDists = linearCalc.calculateEuclidianDistance(G, i); //G is the pcoa file - if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; } + if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; } double corr = linearCalc.calcPearson(EuclidDists, D); //G is the pcoa file, D is the users distance matrix m->mothurOut("Rsq " + toString(i) + " axis: " + toString(corr * corr)); m->mothurOutEndLine(); - if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; } + if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; } } }