]> git.donarmstrong.com Git - mothur.git/commitdiff
numSeqs passing fix
authorwestcott <westcott>
Mon, 23 Aug 2010 12:32:48 +0000 (12:32 +0000)
committerwestcott <westcott>
Mon, 23 Aug 2010 12:32:48 +0000 (12:32 +0000)
12 files changed:
Mothur.xcodeproj/project.pbxproj
aligncommand.cpp
aligncommand.h
chimeraccodecommand.cpp
chimeracheckcommand.cpp
chimerapintailcommand.cpp
chimeraslayercommand.cpp
classifyseqscommand.cpp
filterseqscommand.cpp
preclustercommand.cpp
screenseqscommand.cpp
seqsummarycommand.cpp

index 9966314ade99276d5d061a759be9c0fc01bc269c..71436b740ed32cdcbb984847f71ca81ea44da0ae 100644 (file)
                08FB7794FE84155DC02AAC07 /* mothur */ = {
                        isa = PBXGroup;
                        children = (
-                               7E5B28DC121FEFCC0005339C /* shannoneven.h */,
-                               7E5B28DD121FEFCC0005339C /* shannoneven.cpp */,
                                A7639F8D1175DF35008F5578 /* makefile */,
                                A7DA1FF0113FECD400BF472F /* alignment.cpp */,
                                A7DA1FF1113FECD400BF472F /* alignment.hpp */,
                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 */,
                                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 */,
                                A7DA20CF113FECD400BF472F /* qstat.h */,
                                A7DA2104113FECD400BF472F /* shannon.cpp */,
                                A7DA2105113FECD400BF472F /* shannon.h */,
+                               7E5B28DC121FEFCC0005339C /* shannoneven.h */,
+                               7E5B28DD121FEFCC0005339C /* shannoneven.cpp */,
                                A7DA2106113FECD400BF472F /* sharedace.cpp */,
                                A7DA2107113FECD400BF472F /* sharedace.h */,
                                A7DA2108113FECD400BF472F /* sharedanderberg.h */,
                                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 */,
                A7CB593E11402F110010EB83 /* commands */ = {
                        isa = PBXGroup;
                        children = (
-                               7E5B2917121FF53C0005339C /* heip.h */,
-                               7E5B2918121FF53C0005339C /* heip.cpp */,
                                A7DA202B113FECD400BF472F /* command.hpp */,
                                A7DA1FEF113FECD400BF472F /* aligncommand.h */,
                                A7DA1FEE113FECD400BF472F /* aligncommand.cpp */,
index 3f70e2d3733a2d40da2012d8ba31bff61c768b9b..ed6b45d229c233c99540adb43bb924bb6352ae75 100644 (file)
@@ -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());
index b58c3f29bcc653e48c2d30fc9ae4a57344c4330e..1167c938708bcce7bb54755229bfceef00379822 100644 (file)
@@ -43,7 +43,7 @@ private:
        void appendReportFiles(string, string);
        
        #ifdef USE_MPI
-       int driverMPI(MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
+       int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
        #endif
        
        string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
index 8ea91e53abe27cb75641bfc54c7ed293d2b17a65..7a9431ef914b8f1741bbfcdd7fb25b52c554a910 100644 (file)
@@ -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());
index 0ec5f4bcdba426acd22dd17f8e8e3b55f263c31a..de6f438d81f7fcd62e111d97a02e87d63aad1e66 100644 (file)
@@ -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());
index d9368cce2afee08e8d22c638a0df30b2ca6e2e4a..9e1bfe19e0fd82e82425f7d76e529238a10e28b6 100644 (file)
@@ -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());
index 1de7021098d834dc165b42bcc3da82480c6868dd..35f3b988f86ec2e868d8eb5a825efc853e1662e7 100644 (file)
@@ -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());
index 4c1a0251013afcd77a7137d09be0db5b1c60ffe3..c8c0d72ca2e74a0b08c36a93f6f3a382cc411a33 100644 (file)
@@ -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());
index f3b543c7636af24e333dcf301d897fa86beb9746..e91d32b1e781ec580900ea5053425950d220f090 100644 (file)
@@ -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);
index cfa91bfeedd4334adbe8bd262e476571f61f3ece..c5b66a81eaa7ec7381af79c4170f1efaf41e91d1 100644 (file)
@@ -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(); 
                
index fb97c0a4562ccf3bf887aae0ceafb2f529be65fa..b02b751c343c21e7198ec3a1190dcadf90078ab2 100644 (file)
@@ -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());
index 7362c1b6cfe9e8b11c03ff4c69d3e32b83531942..4077619b4a515495cc00489b3b403d74180feba4 100644 (file)
@@ -436,7 +436,7 @@ int SeqSummaryCommand::createProcessesCreateSummary(vector<int>& 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<int>& 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);