]> git.donarmstrong.com Git - mothur.git/blobdiff - uchime_main.cpp
1.22.0
[mothur.git] / uchime_main.cpp
index 18bd8bb4fbb8cd7cde71c4044901ff4054e55f94..77266c05366a6240f0279453bfa98a7ffd389cb0 100644 (file)
@@ -1,5 +1,3 @@
-//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain.\r
-\r
 #include "myutils.h"\r
 #include "chime.h"\r
 #include "seqdb.h"\r
@@ -8,7 +6,6 @@
 #include "hspfinder.h"\r
 #include <algorithm>\r
 #include <set>\r
-#include "mothurout.h"\r
 \r
 bool SearchChime(Ultra &U, const SeqData &QSD, float QAb, \r
   const AlnParams &AP, const AlnHeuristics &AH, HSPFinder &HF,\r
@@ -21,16 +18,16 @@ bool g_UchimeDeNovo = false;
 \r
 void Usage()\r
        {\r
-       //printf("\n");\r
-       //printf("UCHIME %s by Robert C. Edgar\n", MY_VERSION);\r
-       //printf("http://www.drive5.com/uchime\n");\r
-       //printf("\n");\r
-       //printf("This software is donated to the public domain\n");\r
-       //printf("\n");\r
-\r
-       //printf(\r
-//#include "help.h"\r
-               //);\r
+       printf("\n");\r
+       printf("UCHIME %s by Robert C. Edgar\n", MY_VERSION);\r
+       printf("http://www.drive5.com/uchime\n");\r
+       printf("\n");\r
+       printf("This software is donated to the public domain\n");\r
+       printf("\n");\r
+\r
+       printf(\r
+#include "help.h"\r
+               );\r
        }\r
 \r
 void SetBLOSUM62()\r
@@ -92,8 +89,6 @@ float GetAbFromLabel(const string &Label)
 \r
 int uchime_main(int argc, char *argv[])\r
        {\r
-       MothurOut* m;\r
-       m = MothurOut::getInstance();\r
                \r
        MyCmdLine(argc, argv);\r
 \r
@@ -109,7 +104,11 @@ int uchime_main(int argc, char *argv[])
                return 0;\r
                }\r
 \r
-               \r
+       printf("uchime v" MY_VERSION ".%s\n", SVN_VERSION);\r
+       printf("by Robert C. Edgar\n");\r
+       printf("http://drive5.com/uchime\n");\r
+       printf("This code is donated to the public domain.\n");\r
+       printf("\n");\r
        if (!optset_w)\r
                opt_w = 8;\r
        \r
@@ -174,9 +173,6 @@ int uchime_main(int argc, char *argv[])
        unsigned HitCount = 0;\r
        for (unsigned i = 0; i < QuerySeqCount; ++i)\r
                {\r
-                       \r
-               if (m->control_pressed) { break; }\r
-                       \r
                unsigned QuerySeqIndex = Order[i];\r
 \r
                SeqData QSD;\r
@@ -201,13 +197,7 @@ int uchime_main(int argc, char *argv[])
 \r
                WriteChimeHit(g_fUChime, Hit);\r
 \r
-               //ProgressStep(i, QuerySeqCount, "%u/%u chimeras found (%.1f%%)", HitCount, i, Pct(HitCount, i+1));\r
-                       //report progress\r
-                       if((i+1) % 100 == 0){   m->mothurOut("Processing sequence: " + toString(i+1) + ", " + toString(HitCount) + " chimeras found."); m->mothurOutEndLine();          }\r
-               }\r
-               if (!m->control_pressed) { \r
-                       //report progress\r
-                       if((QuerySeqCount) % 100 != 0){ m->mothurOut("Processing sequence: " + toString(QuerySeqCount) + ", " + toString(HitCount) + " chimeras found."); m->mothurOutEndLine();                }\r
+               ProgressStep(i, QuerySeqCount, "%u/%u chimeras found (%.1f%%)", HitCount, i, Pct(HitCount, i+1));\r
                }\r
 \r
        Log("\n");\r