From: westcott Date: Mon, 23 Aug 2010 12:32:48 +0000 (+0000) Subject: numSeqs passing fix X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=b45e6f3d505a212cebad5ca22e2611b1466bca48 numSeqs passing fix --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 9966314..71436b7 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -490,8 +490,6 @@ 08FB7794FE84155DC02AAC07 /* mothur */ = { isa = PBXGroup; children = ( - 7E5B28DC121FEFCC0005339C /* shannoneven.h */, - 7E5B28DD121FEFCC0005339C /* shannoneven.cpp */, A7639F8D1175DF35008F5578 /* makefile */, A7DA1FF0113FECD400BF472F /* alignment.cpp */, A7DA1FF1113FECD400BF472F /* alignment.hpp */, @@ -582,12 +580,6 @@ A7CB593B11402EF90010EB83 /* calculators */ = { isa = PBXGroup; children = ( - 7E4EBD43122018FB00D85E7B /* simpsoneven.h */, - 7E4EBD44122018FB00D85E7B /* simpsoneven.cpp */, - 7E5B294A121FFADC0005339C /* smithwilson.h */, - 7E5B294B121FFADC0005339C /* smithwilson.cpp */, - 7E962A40121F76B1007464B5 /* invsimpson.h */, - 7E962A41121F76B1007464B5 /* invsimpson.cpp */, A7DA200B113FECD400BF472F /* calculator.cpp */, A7DA200C113FECD400BF472F /* calculator.h */, A7DA1FED113FECD400BF472F /* ace.h */, @@ -614,7 +606,11 @@ A7DA2059113FECD400BF472F /* geom.h */, A7DA206C113FECD400BF472F /* goodscoverage.cpp */, A7DA206D113FECD400BF472F /* goodscoverage.h */, + 7E5B2917121FF53C0005339C /* heip.h */, + 7E5B2918121FF53C0005339C /* heip.cpp */, A7DA2080113FECD400BF472F /* ignoregaps.h */, + 7E962A40121F76B1007464B5 /* invsimpson.h */, + 7E962A41121F76B1007464B5 /* invsimpson.cpp */, A7DA2083113FECD400BF472F /* jackknife.cpp */, A7DA2084113FECD400BF472F /* jackknife.h */, A7DA2093113FECD400BF472F /* logsd.cpp */, @@ -632,6 +628,8 @@ A7DA20CF113FECD400BF472F /* qstat.h */, A7DA2104113FECD400BF472F /* shannon.cpp */, A7DA2105113FECD400BF472F /* shannon.h */, + 7E5B28DC121FEFCC0005339C /* shannoneven.h */, + 7E5B28DD121FEFCC0005339C /* shannoneven.cpp */, A7DA2106113FECD400BF472F /* sharedace.cpp */, A7DA2107113FECD400BF472F /* sharedace.h */, A7DA2108113FECD400BF472F /* sharedanderberg.h */, @@ -680,6 +678,10 @@ A7DA213D113FECD400BF472F /* sharedthetayc.h */, A7DA2140113FECD400BF472F /* shen.cpp */, A7DA2141113FECD400BF472F /* shen.h */, + 7E4EBD43122018FB00D85E7B /* simpsoneven.h */, + 7E4EBD44122018FB00D85E7B /* simpsoneven.cpp */, + 7E5B294A121FFADC0005339C /* smithwilson.h */, + 7E5B294B121FFADC0005339C /* smithwilson.cpp */, A7DA2142113FECD400BF472F /* simpson.cpp */, A7DA2143113FECD400BF472F /* simpson.h */, A7DA2149113FECD400BF472F /* sobs.h */, @@ -702,8 +704,6 @@ A7CB593E11402F110010EB83 /* commands */ = { isa = PBXGroup; children = ( - 7E5B2917121FF53C0005339C /* heip.h */, - 7E5B2918121FF53C0005339C /* heip.cpp */, A7DA202B113FECD400BF472F /* command.hpp */, A7DA1FEF113FECD400BF472F /* aligncommand.h */, A7DA1FEE113FECD400BF472F /* aligncommand.cpp */, diff --git a/aligncommand.cpp b/aligncommand.cpp index 3f70e2d..ed6b45d 100644 --- a/aligncommand.cpp +++ b/aligncommand.cpp @@ -768,7 +768,7 @@ int AlignCommand::createProcesses(string alignFileName, string reportFileName, s //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = alignFileName + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -785,7 +785,7 @@ int AlignCommand::createProcesses(string alignFileName, string reportFileName, s for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = alignFileName + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/aligncommand.h b/aligncommand.h index b58c3f2..1167c93 100644 --- a/aligncommand.h +++ b/aligncommand.h @@ -43,7 +43,7 @@ private: void appendReportFiles(string, string); #ifdef USE_MPI - int driverMPI(MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector&); + int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector&); #endif string candidateFileName, templateFileName, distanceFileName, search, align, outputDir; diff --git a/chimeraccodecommand.cpp b/chimeraccodecommand.cpp index 8ea91e5..7a9431e 100644 --- a/chimeraccodecommand.cpp +++ b/chimeraccodecommand.cpp @@ -522,7 +522,7 @@ int ChimeraCcodeCommand::createProcesses(string outputFileName, string filename, //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = outputFileName + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -539,7 +539,7 @@ int ChimeraCcodeCommand::createProcesses(string outputFileName, string filename, for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = outputFileName + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/chimeracheckcommand.cpp b/chimeracheckcommand.cpp index 0ec5f4b..de6f438 100644 --- a/chimeracheckcommand.cpp +++ b/chimeracheckcommand.cpp @@ -483,7 +483,7 @@ int ChimeraCheckCommand::createProcesses(string outputFileName, string filename) //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = outputFileName + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -500,7 +500,7 @@ int ChimeraCheckCommand::createProcesses(string outputFileName, string filename) for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = outputFileName + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/chimerapintailcommand.cpp b/chimerapintailcommand.cpp index d9368cc..9e1bfe1 100644 --- a/chimerapintailcommand.cpp +++ b/chimerapintailcommand.cpp @@ -551,7 +551,7 @@ int ChimeraPintailCommand::createProcesses(string outputFileName, string filenam //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = outputFileName + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -568,7 +568,7 @@ int ChimeraPintailCommand::createProcesses(string outputFileName, string filenam for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = outputFileName + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/chimeraslayercommand.cpp b/chimeraslayercommand.cpp index 1de7021..35f3b98 100644 --- a/chimeraslayercommand.cpp +++ b/chimeraslayercommand.cpp @@ -538,7 +538,7 @@ int ChimeraSlayerCommand::createProcesses(string outputFileName, string filename //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = outputFileName + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -555,7 +555,7 @@ int ChimeraSlayerCommand::createProcesses(string outputFileName, string filename for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = outputFileName + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/classifyseqscommand.cpp b/classifyseqscommand.cpp index 4c1a025..c8c0d72 100644 --- a/classifyseqscommand.cpp +++ b/classifyseqscommand.cpp @@ -668,7 +668,7 @@ int ClassifySeqsCommand::createProcesses(string taxFileName, string tempTaxFile, //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = filename + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -685,7 +685,7 @@ int ClassifySeqsCommand::createProcesses(string taxFileName, string tempTaxFile, for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = filename + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/filterseqscommand.cpp b/filterseqscommand.cpp index f3b543c..e91d32b 100644 --- a/filterseqscommand.cpp +++ b/filterseqscommand.cpp @@ -527,7 +527,7 @@ int FilterSeqsCommand::createProcessesRunFilter(string F, string filename) { //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = filename + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -544,7 +544,7 @@ int FilterSeqsCommand::createProcessesRunFilter(string F, string filename) { for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = filename + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); @@ -881,7 +881,7 @@ int FilterSeqsCommand::createProcessesCreateFilter(Filters& F, string filename) for (int k = 0; k < alignmentLength; k++) { out << F.c[k] << '\t'; } out << endl; for (int k = 0; k < alignmentLength; k++) { out << F.gap[k] << '\t'; } out << endl; - cout << F.getFilter() << endl; + //cout << F.getFilter() << endl; out.close(); exit(0); diff --git a/preclustercommand.cpp b/preclustercommand.cpp index cfa91bf..c5b66a8 100644 --- a/preclustercommand.cpp +++ b/preclustercommand.cpp @@ -115,6 +115,8 @@ int PreClusterCommand::execute(){ if (abort == true) { return 0; } + int start = time(NULL); + //reads fasta file and return number of seqs int numSeqs = readFASTA(); //fills alignSeqs and makes all seqs active @@ -182,7 +184,8 @@ int PreClusterCommand::execute(){ outNames.close(); if (m->control_pressed) { remove(newFastaFile.c_str()); remove(newNamesFile.c_str()); return 0; } - + + m->mothurOut("It took " + toString(time(NULL) - start) + " secs to cluster " + toString(numSeqs) + " sequences."); m->mothurOut("Total number of sequences before precluster was " + toString(numSeqs) + "."); m->mothurOutEndLine(); m->mothurOut("pre.cluster removed " + toString(count) + " sequences."); m->mothurOutEndLine(); diff --git a/screenseqscommand.cpp b/screenseqscommand.cpp index fb97c0a..b02b751 100644 --- a/screenseqscommand.cpp +++ b/screenseqscommand.cpp @@ -828,7 +828,7 @@ int ScreenSeqsCommand::createProcesses(string goodFileName, string badFileName, //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = filename + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -845,7 +845,7 @@ int ScreenSeqsCommand::createProcesses(string goodFileName, string badFileName, for (int i = 0; i < processIDS.size(); i++) { ifstream in; - string tempFile = toString(processIDS[i]) + ".temp"; + string tempFile = filename + toString(processIDS[i]) + ".num.temp"; openInputFile(tempFile, in); if (!in.eof()) { int tempNum = 0; in >> tempNum; num += tempNum; } in.close(); remove(tempFile.c_str()); diff --git a/seqsummarycommand.cpp b/seqsummarycommand.cpp index 7362c1b..4077619 100644 --- a/seqsummarycommand.cpp +++ b/seqsummarycommand.cpp @@ -436,7 +436,7 @@ int SeqSummaryCommand::createProcessesCreateSummary(vector& startPosition, //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".temp"; + string tempFile = fastafile + toString(getpid()) + ".num.temp"; openOutputFile(tempFile, out); out << num << endl; @@ -460,7 +460,7 @@ int SeqSummaryCommand::createProcessesCreateSummary(vector& startPosition, //parent reads in and combine Filter info for (int i = 0; i < processIDS.size(); i++) { - string tempFilename = toString(processIDS[i]) + ".temp"; + string tempFilename = fastafile + toString(processIDS[i]) + ".num.temp"; ifstream in; openInputFile(tempFilename, in);