X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=classifyseqscommand.cpp;h=0504e6635802c3f6e3e186e4568675906774b3ff;hb=36cea83f926066127bf856e7eae1a70ce7e796d0;hp=72acd2265a06af1b77dc525f3627e51c458e6aed;hpb=a626c629e4d4840cd2ce04d98055dcfef1f8593a;p=mothur.git diff --git a/classifyseqscommand.cpp b/classifyseqscommand.cpp index 72acd22..0504e66 100644 --- a/classifyseqscommand.cpp +++ b/classifyseqscommand.cpp @@ -457,10 +457,14 @@ ClassifySeqsCommand::ClassifySeqsCommand(string option) { search = "kmer"; } - if (namefileNames.size() == 0){ - vector files; files.push_back(fastaFileNames[fastaFileNames.size()-1]); - parser.getNameFile(files); - } + if (!abort) { + if (namefileNames.size() == 0){ + if (fastaFileNames.size() != 0) { + vector files; files.push_back(fastaFileNames[fastaFileNames.size()-1]); + parser.getNameFile(files); + } + } + } } @@ -615,7 +619,7 @@ int ClassifySeqsCommand::execute(){ #else vector positions; -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) positions = m->divideFile(fastaFileNames[s], processors); for (int i = 0; i < (positions.size()-1); i++) { lines.push_back(new linePair(positions[i], positions[(i+1)])); } #else @@ -623,6 +627,7 @@ int ClassifySeqsCommand::execute(){ lines.push_back(new linePair(0, 1000)); }else { positions = m->setFilePosFasta(fastaFileNames[s], numFastaSeqs); + if (positions.size() < processors) { processors = positions.size(); } //figure out how many sequences you have to process int numSeqsPerProcessor = numFastaSeqs / processors; @@ -821,7 +826,7 @@ int ClassifySeqsCommand::createProcesses(string taxFileName, string tempTaxFile, int num = 0; processIDS.clear(); -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) int process = 1; //loop through and create all the processes you want @@ -1021,7 +1026,7 @@ int ClassifySeqsCommand::driver(linePair* filePos, string taxFName, string tempT } delete candidateSeq; - #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) + #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) unsigned long long pos = inFASTA.tellg(); if ((pos == -1) || (pos >= filePos->end)) { break; } #else