X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=preclustercommand.cpp;h=f2fbc80088b1adf2927ee78d5b1e02fbf9691cb1;hb=9aa36ad8297141ef9fcab04fea10e96d2fed26fe;hp=8e4f3274a490679c85f992f8584605c877c84850;hpb=d6c0a11d1cecfac18b323285e7ffadb7f58e848f;p=mothur.git diff --git a/preclustercommand.cpp b/preclustercommand.cpp index 8e4f327..f2fbc80 100644 --- a/preclustercommand.cpp +++ b/preclustercommand.cpp @@ -217,17 +217,19 @@ int PreClusterCommand::execute(){ m->mothurOutEndLine(); m->mothurOut("/******************************************/"); m->mothurOutEndLine(); m->mothurOut("Running command: unique.seqs(" + inputString + ")"); m->mothurOutEndLine(); - + m->mothurCalling = true; + Command* uniqueCommand = new DeconvoluteCommand(inputString); uniqueCommand->execute(); map > filenames = uniqueCommand->getOutputFiles(); delete uniqueCommand; - + m->mothurCalling = false; m->mothurOut("/******************************************/"); m->mothurOutEndLine(); m->renameFile(filenames["fasta"][0], newFastaFile); + m->renameFile(filenames["name"][0], newNamesFile); m->mothurOut("It took " + toString(time(NULL) - start) + " secs to run pre.cluster."); m->mothurOutEndLine(); @@ -302,7 +304,7 @@ int PreClusterCommand::createProcessesGroups(SequenceParser* parser, string newF lines.push_back(linePair(startIndex, endIndex)); } -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) //loop through and create all the processes you want while (process != processors) { @@ -553,6 +555,7 @@ int PreClusterCommand::readFASTA(){ //inNames.close(); if (lengths.size() > 1) { m->control_pressed = true; m->mothurOut("[ERROR]: your sequences are not all the same length. pre.cluster requires sequences to be aligned."); m->mothurOutEndLine(); } + else if (lengths.size() == 1) { length = *(lengths.begin()); } return alignSeqs.size(); } @@ -598,6 +601,7 @@ int PreClusterCommand::loadSeqs(map& thisName, vector& } if (lengths.size() > 1) { error = true; m->mothurOut("[ERROR]: your sequences are not all the same length. pre.cluster requires sequences to be aligned."); m->mothurOutEndLine(); } + else if (lengths.size() == 1) { length = *(lengths.begin()); } //sanity check if (error) { m->control_pressed = true; }