]> git.donarmstrong.com Git - mothur.git/blobdiff - deconvolutecommand.cpp
working of get.mimarkspackage and sra command
[mothur.git] / deconvolutecommand.cpp
index f33a1400721093ee642c90d35c70fed703fdb6a5..ec809730a036245f34dfc2bc0331b108c5d10b38 100644 (file)
@@ -198,17 +198,24 @@ int DeconvoluteCommand::execute() {
                map<string, string> nameMap;
                map<string, string>::iterator itNames;
                if (oldNameMapFName != "")  {  
-            m->readNames(oldNameMapFName, nameMap); 
-            if (oldNameMapFName == outNameFile){ 
-                variables["[tag]"] = "unique";
-                outNameFile = getOutputFileName("name", variables);   }
+            m->readNames(oldNameMapFName, nameMap);
+            if (oldNameMapFName == outNameFile){
+                //prepare filenames and open files
+                map<string, string> mvariables;
+                mvariables["[filename]"] = outputDir + m->getRootName(m->getSimpleName(inFastaName));
+                mvariables["[tag]"] = "unique";
+                outNameFile = getOutputFileName("name", mvariables);
+            }
         }
         CountTable ct;
         if (countfile != "")  {  
-            ct.readTable(countfile);
-            if (countfile == outCountFile){ 
-                variables["[tag]"] = "unique";
-                outCountFile = getOutputFileName("count", variables);   }
+            ct.readTable(countfile, true, false);
+            if (countfile == outCountFile){
+                //prepare filenames and open files
+                map<string, string> mvariables;
+                mvariables["[filename]"] = outputDir + m->getRootName(m->getSimpleName(inFastaName));
+                mvariables["[tag]"] = "unique";
+                outCountFile = getOutputFileName("count", mvariables);   }
         }
                
                if (m->control_pressed) { return 0; }
@@ -279,7 +286,7 @@ int DeconvoluteCommand::execute() {
                        
                        m->gobble(in);
                        
-                       if(count % 1000 == 0)   { m->mothurOut(toString(count) + "\t" + toString(sequenceStrings.size())); m->mothurOutEndLine();       }
+                       if(count % 1000 == 0)   { m->mothurOutJustToScreen(toString(count) + "\t" + toString(sequenceStrings.size()) + "\n");   }
                }
                
                if(count % 1000 != 0)   { m->mothurOut(toString(count) + "\t" + toString(sequenceStrings.size())); m->mothurOutEndLine();       }