[med-svn] [Git][med-team/mothur][master] 4 commits: New upstream version 1.44.3

Tomasz Buchert gitlab at salsa.debian.org
Fri Sep 4 09:04:13 BST 2020



Tomasz Buchert pushed to branch master at Debian Med / mothur


Commits:
ddca3f10 by Tomasz Buchert at 2020-09-04T09:29:54+02:00
New upstream version 1.44.3
- - - - -
d88d3843 by Tomasz Buchert at 2020-09-04T09:30:00+02:00
Update upstream source from tag 'upstream/1.44.3'

Update to upstream version '1.44.3'
with Debian dir 215e8a0d6abd66274215758679482a3318d06023
- - - - -
98c339a7 by Tomasz Buchert at 2020-09-04T09:33:35+02:00
remove fix_makefile

- - - - -
23b882e7 by Tomasz Buchert at 2020-09-04T09:50:07+02:00
release

- - - - -


9 changed files:

- Makefile
- Mothur.xcodeproj/project.pbxproj
- debian/changelog
- debian/patches/0002-Fix-include.patch
- − debian/patches/fix_makefile.patch
- debian/patches/series
- source/commands/makecontigscommand.cpp
- source/commands/trimseqscommand.cpp
- source/commands/trimseqscommand.h


Changes:

=====================================
Makefile
=====================================
@@ -37,7 +37,7 @@ GSL_LIBRARY_DIR ?= "\"Enter_your_GSL_library_path_here\""
 GSL_INCLUDE_DIR ?= "\"Enter_your_GSL_include_path_here\""
 MOTHUR_FILES="\"Enter_your_default_path_here\""
 MOTHUR_TOOLS="\"Enter_your_mothur_tools_path_here\""
-VERSION = "\"1.44.2\""
+VERSION = "\"1.44.3\""
 
 
 # Set a static logfile name
@@ -124,7 +124,7 @@ mothur : $(OBJECTS) uchime
 	$(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
 
 uchime :
-	cd source/uchime_src && export CXX=$(CXX) && ./make clean && ./make && mv uchime ../../ && cd ..
+	cd source/uchime_src && export CXX=$(CXX) && make clean && make && mv uchime ../../ && cd ..
 
 install : mothur
 


=====================================
Mothur.xcodeproj/project.pbxproj
=====================================
@@ -3944,7 +3944,7 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
-					"VERSION=\"\\\"1.44.0\\\"\"",
+					"VERSION=\"\\\"1.44.3\\\"\"",
 					"LOGFILE_NAME=\"\\\"silent\\\"\"",
 					"MOTHUR_TOOLS=\"\\\"/Users/sarahwestcott/desktop/mothur/TARGET_BUILD_DIRTARGET_BUILD_DIR/tools/\\\"\"",
 				);
@@ -3995,7 +3995,7 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
-					"VERSION=\"\\\"1.44.0\\\"\"",
+					"VERSION=\"\\\"1.44.3\\\"\"",
 					"LOGFILE_NAME=\"\\\"./mothur.logfile\\\"\"",
 					"MOTHUR_TOOLS=\"\\\"/Users/sarahwestcott/desktop/mothur/TARGET_BUILD_DIRTARGET_BUILD_DIR/tools/\\\"\"",
 				);
@@ -4061,7 +4061,7 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
-					"VERSION=\"\\\"1.44.0\\\"\"",
+					"VERSION=\"\\\"1.44.3\\\"\"",
 					"LOGFILE_NAME=\"\\\"./mothur.logfile\\\"\"",
 					"MOTHUR_TOOLS=\"\\\"/Users/sarahwestcott/desktop/mothur/TARGET_BUILD_DIRTARGET_BUILD_DIR/tools/\\\"\"",
 				);
@@ -4146,7 +4146,7 @@
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"VERSION=\"\\\"1.44.0\\\"\"",
+					"VERSION=\"\\\"1.44.3\\\"\"",
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
 					"LOGFILE_NAME=\"\\\"./mothur.logfile\\\"\"",
 					"MOTHUR_TOOLS=\"\\\"/Users/sarahwestcott/desktop/mothur/TARGET_BUILD_DIRTARGET_BUILD_DIR/tools/\\\"\"",


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+mothur (1.44.3-1) unstable; urgency=medium
+
+  * New upstream version 1.44.3
+  * Remove fix_makefile patch
+
+ -- Tomasz Buchert <tomasz at debian.org>  Fri, 04 Sep 2020 09:34:50 +0200
+
 mothur (1.44.2-1) unstable; urgency=medium
 
   * New upstream version


=====================================
debian/patches/0002-Fix-include.patch
=====================================
@@ -1,7 +1,14 @@
-Author: Andreas Tille <tille at debian.org>
+From: Andreas Tille <tille at debian.org>
+Date: Fri, 4 Sep 2020 09:33:17 +0200
+Subject: Fix include
+
 Last-Update: Tue, 09 Jun 2020 16:15:15 +0200
-Description: Fix include
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/Makefile b/Makefile
+index 12997aa..9ceea24 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -108,7 +108,7 @@ endif


=====================================
debian/patches/fix_makefile.patch deleted
=====================================
@@ -1,15 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Wed, 22 Jul 2020 10:10:14 +0200
-Description: fix make call
-
---- a/Makefile
-+++ b/Makefile
-@@ -124,7 +124,7 @@ mothur : $(OBJECTS) uchime
- 	$(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
- 
- uchime :
--	cd source/uchime_src && export CXX=$(CXX) && ./make clean && ./make && mv uchime ../../ && cd ..
-+	cd source/uchime_src && export CXX=$(CXX) && $(MAKE) clean && $(MAKE) && mv uchime ../../ && cd ..
- 
- install : mothur
- 


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
 0002-Fix-include.patch
-fix_makefile.patch


=====================================
source/commands/makecontigscommand.cpp
=====================================
@@ -34,7 +34,9 @@ double convertProbToQ(double prob){
 
 double convertQToProb(double Q){
 		try {
-        return pow(10,(-Q/10));
+            double value = pow(10,(-Q/10));
+            if (isnan(value) || isinf(value)) { value = 0.0; }
+            return value;
     }
     catch(exception& e) {
         MothurOut* m; m = MothurOut::getInstance();
@@ -758,7 +760,7 @@ struct contigsData {
         kmerSize = km;
         align = al;
         deltaq = delt;
-				maxee = maxe;
+        maxee = maxe;
         format = form;
         trimOverlap = to;
     }
@@ -1610,8 +1612,8 @@ vector<int> trimBarCodesAndPrimers(Sequence& fSeq, Sequence& rSeq, QualityScores
                     savedFSeq.reverseComplement();
                     savedRSeq.reverseComplement();
                 }
-                fSeq.setAligned(savedFSeq.getAligned());
-                rSeq.setAligned(savedRSeq.getAligned());
+                fSeq.setAligned(savedFSeq.getUnaligned());
+                rSeq.setAligned(savedRSeq.getUnaligned());
                 if(hasQuality){
                     if (i > 0) { //checkOrient trimOligos - reoriented and reversed
                         savedFQual->flipQScores();


=====================================
source/commands/trimseqscommand.cpp
=====================================
@@ -13,40 +13,40 @@
 
 
 //**********************************************************************************************************************
-vector<string> TrimSeqsCommand::setParameters(){	
-	try {
-		CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none","fasta",false,true,true); parameters.push_back(pfasta);
-		CommandParameter poligos("oligos", "InputTypes", "", "", "none", "none", "none","group",false,false,true); parameters.push_back(poligos);
-		CommandParameter pqfile("qfile", "InputTypes", "", "", "none", "none", "none","qfile",false,false,true); parameters.push_back(pqfile);
-		CommandParameter pname("name", "InputTypes", "", "", "namecount", "none", "none","name",false,false,true); parameters.push_back(pname);
+vector<string> TrimSeqsCommand::setParameters(){
+    try {
+        CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none","fasta",false,true,true); parameters.push_back(pfasta);
+        CommandParameter poligos("oligos", "InputTypes", "", "", "none", "none", "none","group",false,false,true); parameters.push_back(poligos);
+        CommandParameter pqfile("qfile", "InputTypes", "", "", "none", "none", "none","qfile",false,false,true); parameters.push_back(pqfile);
+        CommandParameter pname("name", "InputTypes", "", "", "namecount", "none", "none","name",false,false,true); parameters.push_back(pname);
         CommandParameter pcount("count", "InputTypes", "", "", "namecount", "none", "none","count",false,false,true); parameters.push_back(pcount);
-		CommandParameter pflip("flip", "Boolean", "", "F", "", "", "","",false,false,true); parameters.push_back(pflip);
+        CommandParameter pflip("flip", "Boolean", "", "F", "", "", "","",false,false,true); parameters.push_back(pflip);
         CommandParameter preorient("checkorient", "Boolean", "", "F", "", "", "","",false,false,true); parameters.push_back(preorient);
-		CommandParameter pmaxambig("maxambig", "Number", "", "-1", "", "", "","",false,false); parameters.push_back(pmaxambig);
-		CommandParameter pmaxhomop("maxhomop", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pmaxhomop);
-		CommandParameter pminlength("minlength", "Number", "", "1", "", "", "","",false,false); parameters.push_back(pminlength);
-		CommandParameter pmaxlength("maxlength", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pmaxlength);
-		CommandParameter ppdiffs("pdiffs", "Number", "", "0", "", "", "","",false,false,true); parameters.push_back(ppdiffs);
-		CommandParameter pbdiffs("bdiffs", "Number", "", "0", "", "", "","",false,false,true); parameters.push_back(pbdiffs);
+        CommandParameter pmaxambig("maxambig", "Number", "", "-1", "", "", "","",false,false); parameters.push_back(pmaxambig);
+        CommandParameter pmaxhomop("maxhomop", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pmaxhomop);
+        CommandParameter pminlength("minlength", "Number", "", "1", "", "", "","",false,false); parameters.push_back(pminlength);
+        CommandParameter pmaxlength("maxlength", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pmaxlength);
+        CommandParameter ppdiffs("pdiffs", "Number", "", "0", "", "", "","",false,false,true); parameters.push_back(ppdiffs);
+        CommandParameter pbdiffs("bdiffs", "Number", "", "0", "", "", "","",false,false,true); parameters.push_back(pbdiffs);
         CommandParameter pldiffs("ldiffs", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pldiffs);
-		CommandParameter psdiffs("sdiffs", "Number", "", "0", "", "", "","",false,false); parameters.push_back(psdiffs);
+        CommandParameter psdiffs("sdiffs", "Number", "", "0", "", "", "","",false,false); parameters.push_back(psdiffs);
         CommandParameter ptdiffs("tdiffs", "Number", "", "0", "", "", "","",false,false); parameters.push_back(ptdiffs);
-		CommandParameter pprocessors("processors", "Number", "", "1", "", "", "","",false,false,true); parameters.push_back(pprocessors);
-		CommandParameter pallfiles("allfiles", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pallfiles);
-		CommandParameter pkeepforward("keepforward", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pkeepforward);
+        CommandParameter pprocessors("processors", "Number", "", "1", "", "", "","",false,false,true); parameters.push_back(pprocessors);
+        CommandParameter pallfiles("allfiles", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pallfiles);
+        CommandParameter pkeepforward("keepforward", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pkeepforward);
         CommandParameter plogtransform("logtransform", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(plogtransform);
-		CommandParameter pqtrim("qtrim", "Boolean", "", "T", "", "", "","",false,false); parameters.push_back(pqtrim);
-		CommandParameter pqthreshold("qthreshold", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pqthreshold);
-		CommandParameter pqaverage("qaverage", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pqaverage);
-		CommandParameter prollaverage("rollaverage", "Number", "", "0", "", "", "","",false,false); parameters.push_back(prollaverage);
-		CommandParameter pqwindowaverage("qwindowaverage", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pqwindowaverage);
-		CommandParameter pqstepsize("qstepsize", "Number", "", "1", "", "", "","",false,false); parameters.push_back(pqstepsize);
-		CommandParameter pqwindowsize("qwindowsize", "Number", "", "50", "", "", "","",false,false); parameters.push_back(pqwindowsize);
-		CommandParameter pkeepfirst("keepfirst", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pkeepfirst);
-		CommandParameter premovelast("removelast", "Number", "", "0", "", "", "","",false,false); parameters.push_back(premovelast);
-		CommandParameter pseed("seed", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pseed);
+        CommandParameter pqtrim("qtrim", "Boolean", "", "T", "", "", "","",false,false); parameters.push_back(pqtrim);
+        CommandParameter pqthreshold("qthreshold", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pqthreshold);
+        CommandParameter pqaverage("qaverage", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pqaverage);
+        CommandParameter prollaverage("rollaverage", "Number", "", "0", "", "", "","",false,false); parameters.push_back(prollaverage);
+        CommandParameter pqwindowaverage("qwindowaverage", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pqwindowaverage);
+        CommandParameter pqstepsize("qstepsize", "Number", "", "1", "", "", "","",false,false); parameters.push_back(pqstepsize);
+        CommandParameter pqwindowsize("qwindowsize", "Number", "", "50", "", "", "","",false,false); parameters.push_back(pqwindowsize);
+        CommandParameter pkeepfirst("keepfirst", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pkeepfirst);
+        CommandParameter premovelast("removelast", "Number", "", "0", "", "", "","",false,false); parameters.push_back(premovelast);
+        CommandParameter pseed("seed", "Number", "", "0", "", "", "","",false,false); parameters.push_back(pseed);
         CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir);
-		CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir);
+        CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir);
         
         vector<string> tempOutNames;
         outputTypes["fasta"] = tempOutNames;
@@ -56,70 +56,70 @@ vector<string> TrimSeqsCommand::setParameters(){
         outputTypes["count"] = tempOutNames;
         
         abort = false; calledHelp = false;  comboStarts = 0;
-			
-		vector<string> myArray;
-		for (int i = 0; i < parameters.size(); i++) {	myArray.push_back(parameters[i].name);		}
-		return myArray;
-	}
-	catch(exception& e) {
-		m->errorOut(e, "TrimSeqsCommand", "setParameters");
-		exit(1);
-	}
+            
+        vector<string> myArray;
+        for (int i = 0; i < parameters.size(); i++) {    myArray.push_back(parameters[i].name);        }
+        return myArray;
+    }
+    catch(exception& e) {
+        m->errorOut(e, "TrimSeqsCommand", "setParameters");
+        exit(1);
+    }
 }
 //**********************************************************************************************************************
-string TrimSeqsCommand::getHelpString(){	
-	try {
-		string helpString = "";
-		helpString += "The trim.seqs command reads a fastaFile and creates 2 new fasta files, .trim.fasta and scrap.fasta, as well as group files if you provide and oligos file.\n";
-		helpString += "The .trim.fasta contains sequences that meet your requirements, and the .scrap.fasta contains those which don't.\n";
-		helpString += "The trim.seqs command parameters are fasta, name, count, flip, checkorient, oligos, maxambig, maxhomop, minlength, maxlength, qfile, qthreshold, qaverage, diffs, qtrim, keepfirst, removelast, logtransform and allfiles.\n";
-		helpString += "The fasta parameter is required.\n";
-		helpString += "The flip parameter will output the reverse compliment of your trimmed sequence. The default is false.\n";
+string TrimSeqsCommand::getHelpString(){
+    try {
+        string helpString = "";
+        helpString += "The trim.seqs command reads a fastaFile and creates 2 new fasta files, .trim.fasta and scrap.fasta, as well as group files if you provide and oligos file.\n";
+        helpString += "The .trim.fasta contains sequences that meet your requirements, and the .scrap.fasta contains those which don't.\n";
+        helpString += "The trim.seqs command parameters are fasta, name, count, flip, checkorient, oligos, maxambig, maxhomop, minlength, maxlength, qfile, qthreshold, qaverage, diffs, qtrim, keepfirst, removelast, logtransform and allfiles.\n";
+        helpString += "The fasta parameter is required.\n";
+        helpString += "The flip parameter will output the reverse compliment of your trimmed sequence. The default is false.\n";
         helpString += "The checkorient parameter will check the reverse compliment of the sequence if the barcodes and primers cannot be found in the forward. The default is false.\n";
-		helpString += "The oligos parameter allows you to provide an oligos file.\n";
-		helpString += "The name parameter allows you to provide a names file with your fasta file.\n";
+        helpString += "The oligos parameter allows you to provide an oligos file.\n";
+        helpString += "The name parameter allows you to provide a names file with your fasta file.\n";
         helpString += "The count parameter allows you to provide a count file with your fasta file.\n";
-		helpString += "The maxambig parameter allows you to set the maximum number of ambiguous bases allowed. The default is -1.\n";
-		helpString += "The maxhomop parameter allows you to set a maximum homopolymer length. \n";
-		helpString += "The minlength parameter allows you to set and minimum sequence length. \n";
-		helpString += "The maxlength parameter allows you to set and maximum sequence length. \n";
-		helpString += "The tdiffs parameter is used to specify the total number of differences allowed in the sequence. The default is pdiffs + bdiffs + sdiffs + ldiffs.\n";
-		helpString += "The bdiffs parameter is used to specify the number of differences allowed in the barcode. The default is 0.\n";
-		helpString += "The pdiffs parameter is used to specify the number of differences allowed in the primer. The default is 0.\n";
+        helpString += "The maxambig parameter allows you to set the maximum number of ambiguous bases allowed. The default is -1.\n";
+        helpString += "The maxhomop parameter allows you to set a maximum homopolymer length. \n";
+        helpString += "The minlength parameter allows you to set and minimum sequence length. \n";
+        helpString += "The maxlength parameter allows you to set and maximum sequence length. \n";
+        helpString += "The tdiffs parameter is used to specify the total number of differences allowed in the sequence. The default is pdiffs + bdiffs + sdiffs + ldiffs.\n";
+        helpString += "The bdiffs parameter is used to specify the number of differences allowed in the barcode. The default is 0.\n";
+        helpString += "The pdiffs parameter is used to specify the number of differences allowed in the primer. The default is 0.\n";
         helpString += "The ldiffs parameter is used to specify the number of differences allowed in the linker. The default is 0.\n";
-		helpString += "The sdiffs parameter is used to specify the number of differences allowed in the spacer. The default is 0.\n";
-		helpString += "The qfile parameter allows you to provide a quality file.\n";
-		helpString += "The qthreshold parameter allows you to set a minimum quality score allowed. \n";
-		helpString += "The qaverage parameter allows you to set a minimum average quality score allowed. \n";
-		helpString += "The qwindowsize parameter allows you to set a number of bases in a window. Default=50.\n";
-		helpString += "The qwindowaverage parameter allows you to set a minimum average quality score allowed over a window. \n";
-		helpString += "The rollaverage parameter allows you to set a minimum rolling average quality score allowed over a window. \n";
-		helpString += "The qstepsize parameter allows you to set a number of bases to move the window over. Default=1.\n";
+        helpString += "The sdiffs parameter is used to specify the number of differences allowed in the spacer. The default is 0.\n";
+        helpString += "The qfile parameter allows you to provide a quality file.\n";
+        helpString += "The qthreshold parameter allows you to set a minimum quality score allowed. \n";
+        helpString += "The qaverage parameter allows you to set a minimum average quality score allowed. \n";
+        helpString += "The qwindowsize parameter allows you to set a number of bases in a window. Default=50.\n";
+        helpString += "The qwindowaverage parameter allows you to set a minimum average quality score allowed over a window. \n";
+        helpString += "The rollaverage parameter allows you to set a minimum rolling average quality score allowed over a window. \n";
+        helpString += "The qstepsize parameter allows you to set a number of bases to move the window over. Default=1.\n";
         helpString += "The logtransform parameter allows you to indicate you want the averages for the qwindowaverage, rollaverage and qaverage to be calculated using a logtransform. Default=F.\n";
-		helpString += "The allfiles parameter will create separate group and fasta file for each grouping. The default is F.\n";
-		helpString += "The keepforward parameter allows you to indicate whether you want the forward primer removed or not. The default is F, meaning remove the forward primer.\n";
-		helpString += "The qtrim parameter will trim sequence from the point that they fall below the qthreshold and put it in the .trim file if set to true. The default is T.\n";
-		helpString += "The keepfirst parameter trims the sequence to the first keepfirst number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements. \n";
-		helpString += "The removelast removes the last removelast number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements.\n";
-		helpString += "The trim.seqs command should be in the following format: \n";
-		helpString += "trim.seqs(fasta=yourFastaFile, flip=yourFlip, oligos=yourOligos, maxambig=yourMaxambig,  \n";
-		helpString += "maxhomop=yourMaxhomop, minlength=youMinlength, maxlength=yourMaxlength)  \n";	
-		helpString += "Example trim.seqs(fasta=abrecovery.fasta, flip=..., oligos=..., maxambig=..., maxhomop=..., minlength=..., maxlength=...).\n";
-		helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.seqs .\n";
-		return helpString;
-	}
-	catch(exception& e) {
-		m->errorOut(e, "TrimSeqsCommand", "getHelpString");
-		exit(1);
-	}
+        helpString += "The allfiles parameter will create separate group and fasta file for each grouping. The default is F.\n";
+        helpString += "The keepforward parameter allows you to indicate whether you want the forward primer removed or not. The default is F, meaning remove the forward primer.\n";
+        helpString += "The qtrim parameter will trim sequence from the point that they fall below the qthreshold and put it in the .trim file if set to true. The default is T.\n";
+        helpString += "The keepfirst parameter trims the sequence to the first keepfirst number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements. \n";
+        helpString += "The removelast removes the last removelast number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements.\n";
+        helpString += "The trim.seqs command should be in the following format: \n";
+        helpString += "trim.seqs(fasta=yourFastaFile, flip=yourFlip, oligos=yourOligos, maxambig=yourMaxambig,  \n";
+        helpString += "maxhomop=yourMaxhomop, minlength=youMinlength, maxlength=yourMaxlength)  \n";
+        helpString += "Example trim.seqs(fasta=abrecovery.fasta, flip=..., oligos=..., maxambig=..., maxhomop=..., minlength=..., maxlength=...).\n";
+        helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.seqs .\n";
+        return helpString;
+    }
+    catch(exception& e) {
+        m->errorOut(e, "TrimSeqsCommand", "getHelpString");
+        exit(1);
+    }
 }
 //**********************************************************************************************************************
 string TrimSeqsCommand::getOutputPattern(string type) {
     try {
         string pattern = "";
         
-        if (type == "qfile") {  pattern = "[filename],[tag],qual"; } 
-        else if (type == "fasta") {  pattern = "[filename],[tag],fasta"; } 
+        if (type == "qfile") {  pattern = "[filename],[tag],qual"; }
+        else if (type == "fasta") {  pattern = "[filename],[tag],fasta"; }
         else if (type == "group") {  pattern = "[filename],groups"; }
         else if (type == "name") {  pattern = "[filename],[tag],names"; }
         else if (type == "count") {  pattern = "[filename],[tag],count_table-[filename],count_table"; }
@@ -134,265 +134,265 @@ string TrimSeqsCommand::getOutputPattern(string type) {
 }
 //***************************************************************************************************************
 TrimSeqsCommand::TrimSeqsCommand(string option)  {
-	try {
+    try {
 
-		if(option == "help") { help(); abort = true; calledHelp = true; }
-		else if(option == "citation") { citation(); abort = true; calledHelp = true;}
+        if(option == "help") { help(); abort = true; calledHelp = true; }
+        else if(option == "citation") { citation(); abort = true; calledHelp = true;}
         else if(option == "category") {  abort = true; calledHelp = true;  }
-		
-		else {
-			OptionParser parser(option, setParameters());
-			map<string,string> parameters = parser.getParameters();
-			
-			ValidParameters validParameter;
-			fastaFile = validParameter.validFile(parameters, "fasta");
-			if (fastaFile == "not found") { 				
-				fastaFile = current->getFastaFile(); 
-				if (fastaFile != "") { m->mothurOut("Using " + fastaFile + " as input file for the fasta parameter.\n");  }
-				else { 	m->mothurOut("You have no current fastafile and the fasta parameter is required.\n");  abort = true; }
-			}else if (fastaFile == "not open") { abort = true; }	
-			else { current->setFastaFile(fastaFile); }
-			
-			if (outputdir == ""){ outputdir += util.hasPath(fastaFile);  }
-			
-			//check for optional parameter and set defaults
-			// ...at some point should added some additional type checking...
-			string temp = validParameter.valid(parameters, "flip");
-			if (temp == "not found")    {	flip = 0;	}
-			else {  flip = util.isTrue(temp);		}
-		
-			temp = validParameter.validFile(parameters, "oligos");
-			if (temp == "not found"){	oligoFile = "";		}
-			else if(temp == "not open"){	abort = true;	} 
-			else					{	oligoFile = temp; current->setOligosFile(oligoFile);		}
-			
-			
-			temp = validParameter.valid(parameters, "maxambig");		if (temp == "not found") { temp = "-1"; }
-			util.mothurConvert(temp, maxAmbig);  
+        
+        else {
+            OptionParser parser(option, setParameters());
+            map<string,string> parameters = parser.getParameters();
+            
+            ValidParameters validParameter;
+            fastaFile = validParameter.validFile(parameters, "fasta");
+            if (fastaFile == "not found") {
+                fastaFile = current->getFastaFile();
+                if (fastaFile != "") { m->mothurOut("Using " + fastaFile + " as input file for the fasta parameter.\n");  }
+                else {     m->mothurOut("You have no current fastafile and the fasta parameter is required.\n");  abort = true; }
+            }else if (fastaFile == "not open") { abort = true; }
+            else { current->setFastaFile(fastaFile); }
+            
+            if (outputdir == ""){ outputdir += util.hasPath(fastaFile);  }
+            
+            //check for optional parameter and set defaults
+            // ...at some point should added some additional type checking...
+            string temp = validParameter.valid(parameters, "flip");
+            if (temp == "not found")    {    flip = 0;    }
+            else {  flip = util.isTrue(temp);        }
+        
+            temp = validParameter.validFile(parameters, "oligos");
+            if (temp == "not found"){    oligoFile = "";        }
+            else if(temp == "not open"){    abort = true;    }
+            else                    {    oligoFile = temp; current->setOligosFile(oligoFile);        }
+            
+            
+            temp = validParameter.valid(parameters, "maxambig");        if (temp == "not found") { temp = "-1"; }
+            util.mothurConvert(temp, maxAmbig);
 
-			temp = validParameter.valid(parameters, "maxhomop");		if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, maxHomoP);  
+            temp = validParameter.valid(parameters, "maxhomop");        if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, maxHomoP);
 
-			temp = validParameter.valid(parameters, "minlength");	if (temp == "not found") { temp = "1"; }
-			util.mothurConvert(temp, minLength); 
-			
-			temp = validParameter.valid(parameters, "maxlength");	if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, maxLength);
-			
-			temp = validParameter.valid(parameters, "bdiffs");		if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, bdiffs);
-			
-			temp = validParameter.valid(parameters, "pdiffs");		if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, pdiffs);
+            temp = validParameter.valid(parameters, "minlength");    if (temp == "not found") { temp = "1"; }
+            util.mothurConvert(temp, minLength);
+            
+            temp = validParameter.valid(parameters, "maxlength");    if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, maxLength);
+            
+            temp = validParameter.valid(parameters, "bdiffs");        if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, bdiffs);
+            
+            temp = validParameter.valid(parameters, "pdiffs");        if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, pdiffs);
+            
+            temp = validParameter.valid(parameters, "ldiffs");        if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, ldiffs);
             
-            temp = validParameter.valid(parameters, "ldiffs");		if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, ldiffs);
+            temp = validParameter.valid(parameters, "sdiffs");        if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, sdiffs);
             
-            temp = validParameter.valid(parameters, "sdiffs");		if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, sdiffs);
-			
-			temp = validParameter.valid(parameters, "tdiffs");		if (temp == "not found") { int tempTotal = pdiffs + bdiffs + ldiffs + sdiffs;  temp = toString(tempTotal); }
-			util.mothurConvert(temp, tdiffs);
-			
-			if(tdiffs == 0){	tdiffs = bdiffs + pdiffs + ldiffs + sdiffs;	}
-			
-			temp = validParameter.validFile(parameters, "qfile");	
-			if (temp == "not found")	{	qFileName = "";		}
-			else if(temp == "not open")	{	abort = true;		}
-			else						{	qFileName = temp;	current->setQualFile(qFileName); }
-			
-			temp = validParameter.validFile(parameters, "name");	
-			if (temp == "not found")	{	nameFile = "";		}
-			else if(temp == "not open")	{	nameFile = "";	abort = true;		}
-			else						{	nameFile = temp;	current->setNameFile(nameFile); }
+            temp = validParameter.valid(parameters, "tdiffs");        if (temp == "not found") { int tempTotal = pdiffs + bdiffs + ldiffs + sdiffs;  temp = toString(tempTotal); }
+            util.mothurConvert(temp, tdiffs);
+            
+            if(tdiffs == 0){    tdiffs = bdiffs + pdiffs + ldiffs + sdiffs;    }
+            
+            temp = validParameter.validFile(parameters, "qfile");
+            if (temp == "not found")    {    qFileName = "";        }
+            else if(temp == "not open")    {    abort = true;        }
+            else                        {    qFileName = temp;    current->setQualFile(qFileName); }
+            
+            temp = validParameter.validFile(parameters, "name");
+            if (temp == "not found")    {    nameFile = "";        }
+            else if(temp == "not open")    {    nameFile = "";    abort = true;        }
+            else                        {    nameFile = temp;    current->setNameFile(nameFile); }
             
             countfile = validParameter.validFile(parameters, "count");
-			if (countfile == "not open") { abort = true; countfile = ""; }	
-			else if (countfile == "not found") { countfile = ""; }
-			else { current->setCountFile(countfile); }
-			
+            if (countfile == "not open") { abort = true; countfile = ""; }
+            else if (countfile == "not found") { countfile = ""; }
+            else { current->setCountFile(countfile); }
+            
             if ((countfile != "") && (nameFile != "")) { m->mothurOut("You must enter ONLY ONE of the following: count or name.\n");  abort = true; }
-			
-			temp = validParameter.valid(parameters, "qthreshold");	if (temp == "not found") { temp = "0"; }
-			util.mothurConvert(temp, qThreshold);
-			
-			temp = validParameter.valid(parameters, "qtrim");		if (temp == "not found") { temp = "t"; }
-			qtrim = util.isTrue(temp);
+            
+            temp = validParameter.valid(parameters, "qthreshold");    if (temp == "not found") { temp = "0"; }
+            util.mothurConvert(temp, qThreshold);
+            
+            temp = validParameter.valid(parameters, "qtrim");        if (temp == "not found") { temp = "t"; }
+            qtrim = util.isTrue(temp);
 
-			temp = validParameter.valid(parameters, "rollaverage");	if (temp == "not found") { temp = "0"; }
-			convert(temp, qRollAverage);
+            temp = validParameter.valid(parameters, "rollaverage");    if (temp == "not found") { temp = "0"; }
+            convert(temp, qRollAverage);
 
-			temp = validParameter.valid(parameters, "qwindowaverage");if (temp == "not found") { temp = "0"; }
-			convert(temp, qWindowAverage);
+            temp = validParameter.valid(parameters, "qwindowaverage");if (temp == "not found") { temp = "0"; }
+            convert(temp, qWindowAverage);
 
-			temp = validParameter.valid(parameters, "qwindowsize");	if (temp == "not found") { temp = "50"; }
-			convert(temp, qWindowSize);
+            temp = validParameter.valid(parameters, "qwindowsize");    if (temp == "not found") { temp = "50"; }
+            convert(temp, qWindowSize);
 
-			temp = validParameter.valid(parameters, "qstepsize");	if (temp == "not found") { temp = "1"; }
-			convert(temp, qWindowStep);
+            temp = validParameter.valid(parameters, "qstepsize");    if (temp == "not found") { temp = "1"; }
+            convert(temp, qWindowStep);
 
-			temp = validParameter.valid(parameters, "qaverage");		if (temp == "not found") { temp = "0"; }
-			convert(temp, qAverage);
+            temp = validParameter.valid(parameters, "qaverage");        if (temp == "not found") { temp = "0"; }
+            convert(temp, qAverage);
 
-			temp = validParameter.valid(parameters, "keepfirst");	if (temp == "not found") { temp = "0"; }
-			convert(temp, keepFirst);
+            temp = validParameter.valid(parameters, "keepfirst");    if (temp == "not found") { temp = "0"; }
+            convert(temp, keepFirst);
 
-			temp = validParameter.valid(parameters, "removelast");	if (temp == "not found") { temp = "0"; }
-			convert(temp, removeLast);
-			
-			temp = validParameter.valid(parameters, "allfiles");		if (temp == "not found") { temp = "F"; }
-			allFiles = util.isTrue(temp);
+            temp = validParameter.valid(parameters, "removelast");    if (temp == "not found") { temp = "0"; }
+            convert(temp, removeLast);
+            
+            temp = validParameter.valid(parameters, "allfiles");        if (temp == "not found") { temp = "F"; }
+            allFiles = util.isTrue(temp);
+            
+            temp = validParameter.valid(parameters, "keepforward");        if (temp == "not found") { temp = "F"; }
+            keepforward = util.isTrue(temp);
+            
+            temp = validParameter.valid(parameters, "logtransform");        if (temp == "not found") { temp = "F"; }
+            logtransform = util.isTrue(temp);
             
-            temp = validParameter.valid(parameters, "keepforward");		if (temp == "not found") { temp = "F"; }
-			keepforward = util.isTrue(temp);
+            temp = validParameter.valid(parameters, "checkorient");        if (temp == "not found") { temp = "F"; }
+            reorient = util.isTrue(temp);
             
-            temp = validParameter.valid(parameters, "logtransform");		if (temp == "not found") { temp = "F"; }
-			logtransform = util.isTrue(temp);
+            temp = validParameter.valid(parameters, "processors");    if (temp == "not found"){    temp = current->getProcessors();    }
+            processors = current->setProcessors(temp);
+            
+            if(allFiles && (oligoFile == "")){
+                m->mothurOut("You selected allfiles, but didn't enter an oligos.  Ignoring the allfiles request.\n");
+            }
+            if((qAverage != 0 && qThreshold != 0) && qFileName == ""){
+                m->mothurOut("You didn't provide a quality file name, quality criteria will be ignored.\n");
+                qAverage=0;
+                qThreshold=0;
+            }
+            if(!flip && oligoFile=="" && !maxLength && !minLength && (maxAmbig==-1) && !maxHomoP && qFileName == ""){
+                m->mothurOut("You didn't set any options... quiting command.\n");
+                abort = true;
+            }
             
-            temp = validParameter.valid(parameters, "checkorient");		if (temp == "not found") { temp = "F"; }
-			reorient = util.isTrue(temp);
-			
-			temp = validParameter.valid(parameters, "processors");	if (temp == "not found"){	temp = current->getProcessors();	}
-			processors = current->setProcessors(temp);
-			
-			if(allFiles && (oligoFile == "")){
-				m->mothurOut("You selected allfiles, but didn't enter an oligos.  Ignoring the allfiles request.\n"); 
-			}
-			if((qAverage != 0 && qThreshold != 0) && qFileName == ""){
-				m->mothurOut("You didn't provide a quality file name, quality criteria will be ignored.\n"); 
-				qAverage=0;
-				qThreshold=0;
-			}
-			if(!flip && oligoFile=="" && !maxLength && !minLength && (maxAmbig==-1) && !maxHomoP && qFileName == ""){		
-				m->mothurOut("You didn't set any options... quiting command.\n"); 
-				abort = true;
-			}
-			
             if (countfile == "") {
                 if (nameFile == "") {
                     vector<string> files; files.push_back(fastaFile);
                     if (!current->getMothurCalling())  {  parser.getNameFile(files);  }
                 }
             }
-		}
+        }
         
         pairedOligos = false;
         createGroup = false;
 
-	}
-	catch(exception& e) {
-		m->errorOut(e, "TrimSeqsCommand", "TrimSeqsCommand");
-		exit(1);
-	}
+    }
+    catch(exception& e) {
+        m->errorOut(e, "TrimSeqsCommand", "TrimSeqsCommand");
+        exit(1);
+    }
 }
 //***************************************************************************************************************
 
 int TrimSeqsCommand::execute(){
-	try{
-	
-		if (abort) { if (calledHelp) { return 0; }  return 2;	}
-		
-        map<string, string> variables; 
-		variables["[filename]"] = outputdir + util.getRootName(util.getSimpleName(fastaFile));
+    try{
+    
+        if (abort) { if (calledHelp) { return 0; }  return 2;    }
+        
+        map<string, string> variables;
+        variables["[filename]"] = outputdir + util.getRootName(util.getSimpleName(fastaFile));
         variables["[tag]"] = "trim";
-		string trimSeqFile = getOutputFileName("fasta",variables);
+        string trimSeqFile = getOutputFileName("fasta",variables);
         string trimQualFile = getOutputFileName("qfile",variables);
-		outputNames.push_back(trimSeqFile); outputTypes["fasta"].push_back(trimSeqFile);
+        outputNames.push_back(trimSeqFile); outputTypes["fasta"].push_back(trimSeqFile);
         
         variables["[tag]"] = "scrap";
-		string scrapSeqFile = getOutputFileName("fasta",variables);
+        string scrapSeqFile = getOutputFileName("fasta",variables);
         string scrapQualFile = getOutputFileName("qfile",variables);
-		outputNames.push_back(scrapSeqFile); outputTypes["fasta"].push_back(scrapSeqFile);
-		
-		if (qFileName != "") {
-			outputNames.push_back(trimQualFile); outputNames.push_back(scrapQualFile);
-			outputTypes["qfile"].push_back(trimQualFile); outputTypes["qfile"].push_back(scrapQualFile);
-		}
-		
+        outputNames.push_back(scrapSeqFile); outputTypes["fasta"].push_back(scrapSeqFile);
+        
+        if (qFileName != "") {
+            outputNames.push_back(trimQualFile); outputNames.push_back(scrapQualFile);
+            outputTypes["qfile"].push_back(trimQualFile); outputTypes["qfile"].push_back(scrapQualFile);
+        }
+        
         variables["[filename]"] = outputdir + util.getRootName(util.getSimpleName(nameFile));
         variables["[tag]"] = "trim";
-		string trimNameFile = getOutputFileName("name",variables);
+        string trimNameFile = getOutputFileName("name",variables);
         variables["[tag]"] = "scrap";
-		string scrapNameFile = getOutputFileName("name",variables);
-		
-		if (nameFile != "") {
-			util.readNames(nameFile, nameMap);
-			outputNames.push_back(trimNameFile); outputNames.push_back(scrapNameFile);
-			outputTypes["name"].push_back(trimNameFile); outputTypes["name"].push_back(scrapNameFile);
-		}
+        string scrapNameFile = getOutputFileName("name",variables);
+        
+        if (nameFile != "") {
+            util.readNames(nameFile, nameMap);
+            outputNames.push_back(trimNameFile); outputNames.push_back(scrapNameFile);
+            outputTypes["name"].push_back(trimNameFile); outputTypes["name"].push_back(scrapNameFile);
+        }
         
         variables["[filename]"] = outputdir + util.getRootName(util.getSimpleName(countfile));
         variables["[tag]"] = "trim";
         string trimCountFile = getOutputFileName("count",variables);
         variables["[tag]"] = "scrap";
-		string scrapCountFile = getOutputFileName("count",variables);
-		
-		if (countfile != "") {
+        string scrapCountFile = getOutputFileName("count",variables);
+        
+        if (countfile != "") {
             CountTable ct;
             ct.readTable(countfile, true, false);
             nameCount = ct.getNameMap();
-			outputNames.push_back(trimCountFile); outputNames.push_back(scrapCountFile);
-			outputTypes["count"].push_back(trimCountFile); outputTypes["count"].push_back(scrapCountFile);
-		}
+            outputNames.push_back(trimCountFile); outputNames.push_back(scrapCountFile);
+            outputTypes["count"].push_back(trimCountFile); outputTypes["count"].push_back(scrapCountFile);
+        }
 
-		if (m->getControl_pressed()) { return 0; }
-		
+        if (m->getControl_pressed()) { return 0; }
+        
         int startTime = time(NULL);
         
         long long numSeqs = createProcessesCreateTrim(fastaFile, qFileName, trimSeqFile, scrapSeqFile, trimQualFile, scrapQualFile, trimNameFile, scrapNameFile, trimCountFile, scrapCountFile);
         
         m->mothurOut("It took " + toString(time(NULL) - startTime) + " secs to trim " + toString(numSeqs) + " sequences.\n");
-		
-		if (m->getControl_pressed()) {	for (int i = 0; i < outputNames.size(); i++) {	util.mothurRemove(outputNames[i]); } return 0;	}
+        
+        if (m->getControl_pressed()) {    for (int i = 0; i < outputNames.size(); i++) {    util.mothurRemove(outputNames[i]); } return 0;    }
 
-		//output group counts
-		m->mothurOutEndLine();
-		int total = 0;
-		if (groupCounts.size() != 0) {  m->mothurOut("Group count: \n");  }
-		for (map<string, int>::iterator it = groupCounts.begin(); it != groupCounts.end(); it++) {
-			 total += it->second; m->mothurOut(it->first + "\t" + toString(it->second)); m->mothurOutEndLine(); 
-		}
-		if (total != 0) { m->mothurOut("Total of all groups is " + toString(total)); m->mothurOutEndLine(); }
-		
-		if (m->getControl_pressed()) {	for (int i = 0; i < outputNames.size(); i++) {	util.mothurRemove(outputNames[i]); } return 0;	}
+        //output group counts
+        m->mothurOutEndLine();
+        int total = 0;
+        if (groupCounts.size() != 0) {  m->mothurOut("Group count: \n");  }
+        for (map<string, int>::iterator it = groupCounts.begin(); it != groupCounts.end(); it++) {
+             total += it->second; m->mothurOut(it->first + "\t" + toString(it->second)); m->mothurOutEndLine();
+        }
+        if (total != 0) { m->mothurOut("Total of all groups is " + toString(total)); m->mothurOutEndLine(); }
+        
+        if (m->getControl_pressed()) {    for (int i = 0; i < outputNames.size(); i++) {    util.mothurRemove(outputNames[i]); } return 0;    }
 
-		//set fasta file as new current fastafile
-		string currentName = "";
-		itTypes = outputTypes.find("fasta");
-		if (itTypes != outputTypes.end()) {
-			if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setFastaFile(currentName); }
-		}
-		
-		itTypes = outputTypes.find("name");
-		if (itTypes != outputTypes.end()) {
-			if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setNameFile(currentName); }
-		}
-		
-		itTypes = outputTypes.find("qfile");
-		if (itTypes != outputTypes.end()) {
-			if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setQualFile(currentName); }
-		}
-		
-		itTypes = outputTypes.find("group");
-		if (itTypes != outputTypes.end()) {
-			if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setGroupFile(currentName); }
-		}
+        //set fasta file as new current fastafile
+        string currentName = "";
+        itTypes = outputTypes.find("fasta");
+        if (itTypes != outputTypes.end()) {
+            if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setFastaFile(currentName); }
+        }
+        
+        itTypes = outputTypes.find("name");
+        if (itTypes != outputTypes.end()) {
+            if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setNameFile(currentName); }
+        }
+        
+        itTypes = outputTypes.find("qfile");
+        if (itTypes != outputTypes.end()) {
+            if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setQualFile(currentName); }
+        }
+        
+        itTypes = outputTypes.find("group");
+        if (itTypes != outputTypes.end()) {
+            if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setGroupFile(currentName); }
+        }
         
         itTypes = outputTypes.find("count");
-		if (itTypes != outputTypes.end()) {
-			if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setCountFile(currentName); }
-		}
+        if (itTypes != outputTypes.end()) {
+            if ((itTypes->second).size() != 0) { currentName = (itTypes->second)[0]; current->setCountFile(currentName); }
+        }
 
-		m->mothurOut("\nOutput File Names: \n"); 
-		for (int i = 0; i < outputNames.size(); i++) {	m->mothurOut(outputNames[i] +"\n"); 	} m->mothurOutEndLine();
-		
-		return 0;	
-			
-	}
-	catch(exception& e) {
-		m->errorOut(e, "TrimSeqsCommand", "execute");
-		exit(1);
-	}
+        m->mothurOut("\nOutput File Names: \n");
+        for (int i = 0; i < outputNames.size(); i++) {    m->mothurOut(outputNames[i] +"\n");     } m->mothurOutEndLine();
+        
+        return 0;
+            
+    }
+    catch(exception& e) {
+        m->errorOut(e, "TrimSeqsCommand", "execute");
+        exit(1);
+    }
 }
 //***************************************************************************************************************
 
@@ -423,31 +423,31 @@ bool removeLastTrim(Sequence& sequence, QualityScores& qscores, int removeLast){
 //***************************************************************************************************************
 bool cullLength(Sequence& seq, int minLength, int maxLength){
     int length = seq.getNumBases();
-    bool success = 0;	//guilty until proven innocent
+    bool success = 0;    //guilty until proven innocent
         
-    if(length >= minLength && maxLength == 0)			{	success = 1;	}
-    else if(length >= minLength && length <= maxLength)	{	success = 1;	}
-    else												{	success = 0;	}
+    if(length >= minLength && maxLength == 0)            {    success = 1;    }
+    else if(length >= minLength && length <= maxLength)    {    success = 1;    }
+    else                                                {    success = 0;    }
         
     return success;
 }
 //***************************************************************************************************************
 bool cullHomoP(Sequence& seq, int maxHomoP){
     int longHomoP = seq.getLongHomoPolymer();
-    bool success = 0;	//guilty until proven innocent
+    bool success = 0;    //guilty until proven innocent
         
-    if(longHomoP <= maxHomoP){	success = 1;	}
-    else					{	success = 0;	}
+    if(longHomoP <= maxHomoP){    success = 1;    }
+    else                    {    success = 0;    }
         
     return success;
 }
 //***************************************************************************************************************
 bool cullAmbigs(Sequence& seq, int maxAmbig){
     int numNs = seq.getAmbigBases();
-    bool success = 0;	//guilty until proven innocent
+    bool success = 0;    //guilty until proven innocent
         
-    if(numNs <= maxAmbig)	{	success = 1;	}
-    else					{	success = 0;	}
+    if(numNs <= maxAmbig)    {    success = 1;    }
+    else                    {    success = 0;    }
         
     return success;
 }
@@ -541,27 +541,27 @@ struct trimData {
 /**************************************************************************************/
 //string filename, string qFileName, string trimFileName, string scrapFileName, string trimQFileName, string scrapQFileName, string trimNFileName, string scrapNFileName, string trimCFileName, string scrapCFileName, string groupFileName, vector<vector<string> > fastaFileNames, vector<vector<string> > qualFileNames, vector<vector<string> > nameFileNames, linePair line, linePair qline
 int driverTrim(trimData* params) {
-		
-	try {
+        
+    try {
         int numFPrimers, numRPrimers, numLinkers, numSpacers;
         numFPrimers = params->primers.size();
         numRPrimers = params->revPrimer.size();
         numLinkers = params->linker.size();
         numSpacers = params->spacer.size();
-		
-		ifstream inFASTA;
-		params->util.openInputFile(params->filename, inFASTA);
-		inFASTA.seekg(params->lineStart);
-		
-		ifstream qFile;
-		if(params->qFileName != "")	{
-			params->util.openInputFile(params->qFileName, qFile);
-			qFile.seekg(params->qlineStart);
-		}
-		
-		bool moreSeqs = 1;
+        
+        ifstream inFASTA;
+        params->util.openInputFile(params->filename, inFASTA);
+        inFASTA.seekg(params->lineStart);
+        
+        ifstream qFile;
+        if(params->qFileName != "")    {
+            params->util.openInputFile(params->qFileName, qFile);
+            qFile.seekg(params->qlineStart);
+        }
+        
+        bool moreSeqs = 1;
         int numBarcodes = params->barcodes.size();
-		TrimOligos* trimOligos = NULL;
+        TrimOligos* trimOligos = NULL;
         if (params->pairedOligos)   {   trimOligos = new TrimOligos(params->pdiffs, params->bdiffs, 0, 0, params->pairedPrimers, params->pairedBarcodes, false); numBarcodes = params->pairedBarcodes.size(); numFPrimers = params->pairedPrimers.size(); }
         else                {   trimOligos = new TrimOligos(params->pdiffs, params->bdiffs, params->ldiffs, params->sdiffs, params->primers, params->barcodes, params->revPrimer, params->linker, params->spacer);  }
         
@@ -594,42 +594,42 @@ int driverTrim(trimData* params) {
         
         if(numBarcodes == 0){ params->createGroup = false; }
         
-		while (moreSeqs) {
-				
+        while (moreSeqs) {
+                
             int obsBDiffs = 0;
             int obsPDiffs = 0;
             
-			if (params->m->getControl_pressed()) { break; }
-			
-			int success = 1;
-			string trashCode = "";
+            if (params->m->getControl_pressed()) { break; }
+            
+            int success = 1;
+            string trashCode = "";
             string commentString = "";
-			int currentSeqsDiffs = 0;
+            int currentSeqsDiffs = 0;
 
-			Sequence currSeq(inFASTA); params->util.gobble(inFASTA);
+            Sequence currSeq(inFASTA); params->util.gobble(inFASTA);
             Sequence savedSeq(currSeq.getName(), currSeq.getAligned());
             
-			QualityScores currQual; QualityScores savedQual;
-			if(params->qFileName != ""){
-				currQual = QualityScores(qFile);  params->util.gobble(qFile);
+            QualityScores currQual; QualityScores savedQual;
+            if(params->qFileName != ""){
+                currQual = QualityScores(qFile);  params->util.gobble(qFile);
                 savedQual.setName(currQual.getName()); savedQual.setScores(currQual.getScores());
-			}
-			  
-			string origSeq = currSeq.getUnaligned();
-			if (origSeq != "") {
-				
-				int barcodeIndex = 0;
-				int primerIndex = 0;
+            }
+              
+            string origSeq = currSeq.getUnaligned();
+            if (origSeq != "") {
+                
+                int barcodeIndex = 0;
+                int primerIndex = 0;
                
                 if(numLinkers != 0){
-					success = trimOligos->stripLinker(currSeq, currQual);
-					if(success > params->ldiffs)		{	trashCode += 'k';	}
-					else{ currentSeqsDiffs += success;  }
+                    success = trimOligos->stripLinker(currSeq, currQual);
+                    if(success > params->ldiffs)        {    trashCode += 'k';    }
+                    else{ currentSeqsDiffs += success;  }
 
-				}
+                }
                 
-				if(numBarcodes != 0){
-					vector<int> results = trimOligos->stripBarcode(currSeq, currQual, barcodeIndex);
+                if(numBarcodes != 0){
+                    vector<int> results = trimOligos->stripBarcode(currSeq, currQual, barcodeIndex);
                     if (params->pairedOligos) {
                         success = results[0] + results[2];
                         commentString += "fbdiffs=" + toString(results[0]) + "(" + trimOligos->getCodeValue(results[1], params->bdiffs) + "), rbdiffs=" + toString(results[2]) + "(" + trimOligos->getCodeValue(results[3], params->bdiffs) + ") ";
@@ -638,20 +638,20 @@ int driverTrim(trimData* params) {
                         success = results[0];
                         commentString += "bdiffs=" + toString(results[0]) + "(" + trimOligos->getCodeValue(results[1], params->bdiffs) + ") ";
                     }
-					if(success > params->bdiffs)		{  trashCode += 'b'; }
-					else{ currentSeqsDiffs += success;  }
-				}
+                    if(success > params->bdiffs)        {  trashCode += 'b'; }
+                    else{ currentSeqsDiffs += success;  }
+                }
                 obsBDiffs = success;
                 
                if(numSpacers != 0){
-					success = trimOligos->stripSpacer(currSeq, currQual);
-					if(success > params->sdiffs)		{	trashCode += 's';	}
-					else{ currentSeqsDiffs += success;  }
+                    success = trimOligos->stripSpacer(currSeq, currQual);
+                    if(success > params->sdiffs)        {    trashCode += 's';    }
+                    else{ currentSeqsDiffs += success;  }
 
-				}
+                }
                 
-				if(numFPrimers != 0){
-					vector<int> results = trimOligos->stripForward(currSeq, currQual, primerIndex, params->keepforward);
+                if(numFPrimers != 0){
+                    vector<int> results = trimOligos->stripForward(currSeq, currQual, primerIndex, params->keepforward);
                     if (params->pairedOligos) {
                         success = results[0] + results[2];
                         commentString += "fpdiffs=" + toString(results[0]) + "(" + trimOligos->getCodeValue(results[1], params->pdiffs) + "), rpdiffs=" + toString(results[2]) + "(" + trimOligos->getCodeValue(results[3], params->pdiffs) + ") ";
@@ -660,20 +660,20 @@ int driverTrim(trimData* params) {
                         success = results[0];
                         commentString += "fpdiffs=" + toString(results[0]) + "(" + trimOligos->getCodeValue(results[1], params->pdiffs) + ") ";
                     }
-					if(success > params->pdiffs)		{  trashCode += 'f';  }
-					else{ currentSeqsDiffs += success;  }
-				}
+                    if(success > params->pdiffs)        {  trashCode += 'f';  }
+                    else{ currentSeqsDiffs += success;  }
+                }
                 obsPDiffs = success;
                 
-				if(numRPrimers != 0){
-					vector<int> results =  trimOligos->stripReverse(currSeq, currQual);
+                if(numRPrimers != 0){
+                    vector<int> results =  trimOligos->stripReverse(currSeq, currQual);
                     success = results[0];
                     commentString += "rpdiffs=" + toString(results[0]) + "(" + trimOligos->getCodeValue(results[1], params->pdiffs) + ") ";
-                    if(success > params->pdiffs)		{	trashCode += 'r';	}
+                    if(success > params->pdiffs)        {    trashCode += 'r';    }
                     else{ currentSeqsDiffs += success;  }
-				}
+                }
                 
-                if (currentSeqsDiffs > params->tdiffs)	{	trashCode += 't';   }
+                if (currentSeqsDiffs > params->tdiffs)    {    trashCode += 't';   }
                 
                 if (params->reorient && (trashCode != "")) { //if you failed and want to check the reverse
                     int thisSuccess = 0;
@@ -694,7 +694,7 @@ int driverTrim(trimData* params) {
                             thisSuccess = results[0];
                             thiscommentString += "bdiffs=" + toString(results[0]) + "(" + rtrimOligos->getCodeValue(results[1], params->bdiffs) + ") ";
                         }
-                        if(thisSuccess > params->bdiffs)		{ thisTrashCode += "b"; }
+                        if(thisSuccess > params->bdiffs)        { thisTrashCode += "b"; }
                         else{ thisCurrentSeqsDiffs += thisSuccess;  }
                     }
                     
@@ -710,12 +710,12 @@ int driverTrim(trimData* params) {
                             thisSuccess = results[0];
                             thiscommentString += "pdiffs=" + toString(results[0]) + "(" + rtrimOligos->getCodeValue(results[1], params->pdiffs) + ") ";
                         }
-                        if(thisSuccess > params->pdiffs)		{ thisTrashCode += "f"; }
+                        if(thisSuccess > params->pdiffs)        { thisTrashCode += "f"; }
                         else{ thisCurrentSeqsDiffs += thisSuccess;  }
                     }
                     int revPDiffs = thisSuccess;
 
-                    if (thisCurrentSeqsDiffs > params->tdiffs)	{	thisTrashCode += 't';   }
+                    if (thisCurrentSeqsDiffs > params->tdiffs)    {    thisTrashCode += 't';   }
                     
                     if (thisTrashCode == "") {
                         obsPDiffs = revPDiffs;
@@ -736,46 +736,46 @@ int driverTrim(trimData* params) {
                     }else { trashCode += "(" + thisTrashCode + ")";  }
                 }
                 
-				if(params->keepFirst != 0){ success = keepFirstTrim(currSeq, currQual, params->keepFirst); }
-				
-				if(params->removeLast != 0){
-					success = removeLastTrim(currSeq, currQual, params->removeLast);
-					if(!success)				{	trashCode += 'l';	}
-				}
-				
-				if(params->qFileName != ""){
-					int origLength = currSeq.getNumBases();
-					
-					if(!params->util.isEqual(params->qThreshold,0))			{	success = currQual.stripQualThreshold(currSeq, params->qThreshold);			}
-					else if(!params->util.isEqual(params->qAverage, 0))		{	success = currQual.cullQualAverage(currSeq, params->qAverage, params->logtransform);				}
-					else if(!params->util.isEqual(params->qRollAverage, 0))	{	success = currQual.stripQualRollingAverage(currSeq, params->qRollAverage, params->logtransform);	}
-					else if(!params->util.isEqual(params->qWindowAverage, 0)){	success = currQual.stripQualWindowAverage(currSeq, params->qWindowStep, params->qWindowSize, params->qWindowAverage, params->logtransform);	}
-					else						{	success = 1;				}
-					
-					//you don't want to trim, if it fails above then scrap it
-					if ((!params->qtrim) && (origLength != currSeq.getNumBases())) {  success = 0; }
-					
-					if(!success)				{	trashCode += 'q';	}
-				}				
-		
-				if(params->minLength > 0 || params->maxLength > 0){
-					success = cullLength(currSeq, params->minLength, params->maxLength);
-					if(!success)				{	trashCode += 'l';	}
-				}
-				if(params->maxHomoP > 0){
-					success = cullHomoP(currSeq, params->maxHomoP);
-					if(!success)				{	trashCode += 'h';	}
-				}
-				if(params->maxAmbig != -1){
-					success = cullAmbigs(currSeq, params->maxAmbig);
-					if(!success)				{	trashCode += 'n';	}
-				}
-				
-				if(params->flip){		// should go last
-					currSeq.reverseComplement();
-					if(params->qFileName != ""){ currQual.flipQScores();	 }
-				}
-				
+                if(params->keepFirst != 0){ success = keepFirstTrim(currSeq, currQual, params->keepFirst); }
+                
+                if(params->removeLast != 0){
+                    success = removeLastTrim(currSeq, currQual, params->removeLast);
+                    if(!success)                {    trashCode += 'l';    }
+                }
+                
+                if(params->qFileName != ""){
+                    int origLength = currSeq.getNumBases();
+                    
+                    if(!params->util.isEqual(params->qThreshold,0))            {    success = currQual.stripQualThreshold(currSeq, params->qThreshold);            }
+                    else if(!params->util.isEqual(params->qAverage, 0))        {    success = currQual.cullQualAverage(currSeq, params->qAverage, params->logtransform);                }
+                    else if(!params->util.isEqual(params->qRollAverage, 0))    {    success = currQual.stripQualRollingAverage(currSeq, params->qRollAverage, params->logtransform);    }
+                    else if(!params->util.isEqual(params->qWindowAverage, 0)){    success = currQual.stripQualWindowAverage(currSeq, params->qWindowStep, params->qWindowSize, params->qWindowAverage, params->logtransform);    }
+                    else                        {    success = 1;                }
+                    
+                    //you don't want to trim, if it fails above then scrap it
+                    if ((!params->qtrim) && (origLength != currSeq.getNumBases())) {  success = 0; }
+                    
+                    if(!success)                {    trashCode += 'q';    }
+                }
+        
+                if(params->minLength > 0 || params->maxLength > 0){
+                    success = cullLength(currSeq, params->minLength, params->maxLength);
+                    if(!success)                {    trashCode += 'l';    }
+                }
+                if(params->maxHomoP > 0){
+                    success = cullHomoP(currSeq, params->maxHomoP);
+                    if(!success)                {    trashCode += 'h';    }
+                }
+                if(params->maxAmbig != -1){
+                    success = cullAmbigs(currSeq, params->maxAmbig);
+                    if(!success)                {    trashCode += 'n';    }
+                }
+                
+                if(params->flip){        // should go last
+                    currSeq.reverseComplement();
+                    if(params->qFileName != ""){ currQual.flipQScores();     }
+                }
+                
                 if (params->m->getDebug()) { params->m->mothurOut("[DEBUG]: " + currSeq.getName() + ", trashcode= " + trashCode + "\n");  }
 
                 string seqComment = currSeq.getComment();
@@ -797,7 +797,7 @@ int driverTrim(trimData* params) {
                             params->groupMap[currSeq.getName()] = thisGroup;
                             
                             map<string, int>::iterator it = params->groupCounts.find(thisGroup);
-                            if (it == params->groupCounts.end()) {	params->groupCounts[thisGroup] = 1; }
+                            if (it == params->groupCounts.end()) {    params->groupCounts[thisGroup] = 1; }
                             else { params->groupCounts[it->first] += 1; }
                         }
                     }
@@ -810,39 +810,39 @@ int driverTrim(trimData* params) {
                     currSeq.printSequence(params->scrapFileName);
                     if(params->qFileName != ""){ currQual.printQScores(params->scrapQFileName); }
                 }
-				params->count++;
-			}
-			
-			#if defined NON_WINDOWS
-				unsigned long long pos = inFASTA.tellg();
-				if ((pos == -1) || (pos >= params->lineEnd)) { break; }
-			#else
-				if ((params->count == params->lineEnd) || (inFASTA.eof())) { break; }
-			#endif
-			
-			//report progress
-			if((params->count) % 1000 == 0){	params->m->mothurOutJustToScreen(toString(params->count)+"\n"); 		}
-			
-		}
-		//report progress
-		if((params->count) % 1000 != 0){	params->m->mothurOutJustToScreen(toString(params->count)+"\n");		}
-		
-		delete trimOligos;
+                params->count++;
+            }
+            
+            #if defined NON_WINDOWS
+                unsigned long long pos = inFASTA.tellg();
+                if ((pos == -1) || (pos >= params->lineEnd)) { break; }
+            #else
+                if ((params->count == params->lineEnd) || (inFASTA.eof())) { break; }
+            #endif
+            
+            //report progress
+            if((params->count) % 1000 == 0){    params->m->mothurOutJustToScreen(toString(params->count)+"\n");         }
+            
+        }
+        //report progress
+        if((params->count) % 1000 != 0){    params->m->mothurOutJustToScreen(toString(params->count)+"\n");        }
+        
+        delete trimOligos;
         if (params->reorient) { delete rtrimOligos; }
-		inFASTA.close();
-		if(params->qFileName != "")	{	qFile.close();		}
+        inFASTA.close();
+        if(params->qFileName != "")    {    qFile.close();        }
         
         return params->count;
     }
-	catch(exception& e) {
-		params->m->errorOut(e, "TrimSeqsCommand", "driverTrim");
-		exit(1);
-	}
+    catch(exception& e) {
+        params->m->errorOut(e, "TrimSeqsCommand", "driverTrim");
+        exit(1);
+    }
 }
 
 /**************************************************************************************************/
 long long TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFileName, string trimFASTAFileName, string scrapFASTAFileName, string trimQualFileName, string scrapQualFileName, string trimNameFileName, string scrapNameFileName, string trimCountFileName, string scrapCountFileName) {
-	try {
+    try {
         string groupFile;
         Oligos oligos;
         if(oligoFile != ""){
@@ -917,7 +917,7 @@ long long TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFi
         
         set<string> badNames = dataBundle->badNames;
         groupCounts = dataBundle->groupCounts;
-        groupMap = dataBundle->groupMap;
+        map<string, string> groupMap = dataBundle->groupMap;
 
         for (int i = 0; i < processors-1; i++) {
             workerThreads[i]->join();
@@ -953,11 +953,11 @@ long long TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFi
         processNamesCountFiles(trimFASTAFileName, badNames, groupMap, trimNameFileName, scrapNameFileName, trimCountFileName, scrapCountFileName, groupFile);
         
         return num;
-	}
-	catch(exception& e) {
-		m->errorOut(e, "TrimSeqsCommand", "createProcessesCreateTrim");
-		exit(1);
-	}
+    }
+    catch(exception& e) {
+        m->errorOut(e, "TrimSeqsCommand", "createProcessesCreateTrim");
+        exit(1);
+    }
 }
 /**************************************************************************************************/
 int TrimSeqsCommand::processNamesCountFiles(string trimFasta, set<string> badNames, map<string, string> groupMap, string trimNameFileName, string scrapNameFileName, string trimCountFileName, string scrapCountFileName, string groupFile) {
@@ -1007,7 +1007,7 @@ int TrimSeqsCommand::processNamesCountFiles(string trimFasta, set<string> badNam
                 outGroup << itGroup->first << '\t' << itGroup->second << endl;
             }
             outGroup.close();
-        }else {
+        }else if (countfile != "") {
             map<string, int> justTrimmedNames;
             map<string, int> justScrappedNames;
             for (map<string, int>::iterator itCount = nameCount.begin(); itCount != nameCount.end(); itCount++) {
@@ -1015,25 +1015,42 @@ int TrimSeqsCommand::processNamesCountFiles(string trimFasta, set<string> badNam
                 else { justScrappedNames[itCount->first] = itCount->second; }
             }
             
-            CountTable newCt; //trimmed file
-            for (map<string, int>::iterator itCount = groupCounts.begin(); itCount != groupCounts.end(); itCount++) { newCt.addGroup(itCount->first); }
-            vector<int> tempCounts; tempCounts.resize(groupCounts.size(), 0);
-            for (map<string, int>::iterator itNames = justTrimmedNames.begin(); itNames != justTrimmedNames.end(); itNames++) {
-                newCt.push_back(itNames->first, tempCounts); //add it to the table with no abundance so we can set the groups abundance
-                map<string, string>::iterator it2 = groupMap.find(itNames->first);
-                if (it2 != groupMap.end()) { newCt.setAbund(itNames->first, it2->second, itNames->second); }
-                else { m->mothurOut("[ERROR]: missing group info for " + itNames->first + ".\n");  m->setControl_pressed(true); }
-            }
-            newCt.printTable(trimCountFileName);
-            
-            CountTable newScrapCt; //scrap file
-            newScrapCt.addGroup("scrap");
-            vector<int> myCounts; tempCounts.resize(1, 0);
-            for (map<string, int>::iterator itNames = justScrappedNames.begin(); itNames != justScrappedNames.end(); itNames++) {
-                newScrapCt.push_back(itNames->first, myCounts); //add it to the table with no abundance so we can set the groups abundance
-                newScrapCt.setAbund(itNames->first, "scrap", itNames->second);
+            //create a count table with group info
+            if (groupCounts.size() != 0) {
+                
+                cout << groupCounts.size() << endl;
+                CountTable newCt; //trimmed file
+                for (map<string, int>::iterator itCount = groupCounts.begin(); itCount != groupCounts.end(); itCount++) { newCt.addGroup(itCount->first); }
+                
+                vector<int> tempCounts; tempCounts.resize(groupCounts.size(), 0);
+                for (map<string, int>::iterator itNames = justTrimmedNames.begin(); itNames != justTrimmedNames.end(); itNames++) {
+                    newCt.push_back(itNames->first, tempCounts); //add it to the table with no abundance so we can set the groups abundance
+                    map<string, string>::iterator it2 = groupMap.find(itNames->first);
+                    if (it2 != groupMap.end()) { newCt.setAbund(itNames->first, it2->second, itNames->second); }
+                    else { m->mothurOut("[ERROR]: missing group info for " + itNames->first + ".\n");  m->setControl_pressed(true); }
+                }
+                newCt.printTable(trimCountFileName);
+                
+                CountTable newScrapCt; //scrap file
+                newScrapCt.addGroup("scrap");
+                vector<int> myCounts; tempCounts.resize(1, 0);
+                for (map<string, int>::iterator itNames = justScrappedNames.begin(); itNames != justScrappedNames.end(); itNames++) {
+                    newScrapCt.push_back(itNames->first, myCounts); //add it to the table with no abundance so we can set the groups abundance
+                    newScrapCt.setAbund(itNames->first, "scrap", itNames->second);
+                }
+                newScrapCt.printTable(scrapCountFileName);
+                
+            }else { //create a count file without groups
+                CountTable newCt; //trimmed file
+                CountTable newScrapCt; //scrap file
+                
+                for (map<string, int>::iterator itCount = nameCount.begin(); itCount != nameCount.end(); itCount++) {
+                    if (badNames.count(itCount->first) != 0) { newCt.push_back(itCount->first, itCount->second); }
+                    else { newScrapCt.push_back(itCount->first, itCount->second); }
+                }
+                newCt.printTable(trimCountFileName);
+                newScrapCt.printTable(scrapCountFileName);
             }
-            newScrapCt.printTable(scrapCountFileName);
         }
 
         if(allFiles){
@@ -1067,38 +1084,38 @@ int TrimSeqsCommand::processNamesCountFiles(string trimFasta, set<string> badNam
 /**************************************************************************************************/
 
 int TrimSeqsCommand::setLines(string filename, string qfilename) {
-	try {
+    try {
         
         vector<double> fastaFilePos;
-		vector<double> qfileFilePos;
-		
-		#if defined NON_WINDOWS
-		//set file positions for fasta file
-		fastaFilePos = util.divideFile(filename, processors);
-		
-		//get name of first sequence in each chunk
-		map<string, int> firstSeqNames;
-		for (int i = 0; i < (fastaFilePos.size()-1); i++) {
-			ifstream in;
-			util.openInputFile(filename, in);
-			in.seekg(fastaFilePos[i]);
+        vector<double> qfileFilePos;
+        
+        #if defined NON_WINDOWS
+        //set file positions for fasta file
+        fastaFilePos = util.divideFile(filename, processors);
+        
+        //get name of first sequence in each chunk
+        map<string, int> firstSeqNames;
+        for (int i = 0; i < (fastaFilePos.size()-1); i++) {
+            ifstream in;
+            util.openInputFile(filename, in);
+            in.seekg(fastaFilePos[i]);
             
             //adjust start if null strings
             if (i == 0) {  util.zapGremlins(in); util.gobble(in);  }
-		
-			Sequence temp(in); 
-			firstSeqNames[temp.getName()] = i;
-		
-			in.close();
-		}
-		
-		if(qfilename != "")	{
+        
+            Sequence temp(in);
+            firstSeqNames[temp.getName()] = i;
+        
+            in.close();
+        }
+        
+        if(qfilename != "")    {
             //seach for filePos of each first name in the qfile and save in qfileFilePos
             ifstream inQual;
             util.openInputFile(qfilename, inQual);
             
             string input;
-            while(!inQual.eof()){	
+            while(!inQual.eof()){
                 input = util.getline(inQual);
                 
                 if (input.length() != 0) {
@@ -1114,7 +1131,7 @@ int TrimSeqsCommand::setLines(string filename, string qfilename) {
                         
                         if(it != firstSeqNames.end()) { //this is the start of a new chunk
                             double pos = inQual.tellg();
-                            qfileFilePos.push_back(pos - input.length() - 1);	
+                            qfileFilePos.push_back(pos - input.length() - 1);
                             firstSeqNames.erase(it);
                         }
                     }
@@ -1125,9 +1142,9 @@ int TrimSeqsCommand::setLines(string filename, string qfilename) {
             inQual.close();
             
             
-            if (firstSeqNames.size() != 0) { 
+            if (firstSeqNames.size() != 0) {
                 for (map<string, int>::iterator it = firstSeqNames.begin(); it != firstSeqNames.end(); it++) {
-                    m->mothurOut(it->first + " is in your fasta file and not in your quality file, not using quality file.\n"); 
+                    m->mothurOut(it->first + " is in your fasta file and not in your quality file, not using quality file.\n");
                 }
                 qFileName = "";
                 return processors;
@@ -1152,25 +1169,25 @@ int TrimSeqsCommand::setLines(string filename, string qfilename) {
         
         for (int i = 0; i < (fastaFilePos.size()-1); i++) {
             if (m->getDebug()) { m->mothurOut("[DEBUG]: " + toString(i) +'\t' + toString(fastaFilePos[i]) + '\t' + toString(fastaFilePos[i+1]) + '\n'); }
-			lines.push_back(linePair(fastaFilePos[i], fastaFilePos[(i+1)]));
-			if (qfilename != "") {  qLines.push_back(linePair(qfileFilePos[i], qfileFilePos[(i+1)]));  }
-		}	
-		if(qfilename == "")	{	qLines = lines;	} //files with duds
-		
-		return processors;
-		
-		#else
+            lines.push_back(linePair(fastaFilePos[i], fastaFilePos[(i+1)]));
+            if (qfilename != "") {  qLines.push_back(linePair(qfileFilePos[i], qfileFilePos[(i+1)]));  }
+        }
+        if(qfilename == "")    {    qLines = lines;    } //files with duds
+        
+        return processors;
+        
+        #else
         
             long long numFastaSeqs = 0;
-            fastaFilePos = util.setFilePosFasta(filename, numFastaSeqs); 
+            fastaFilePos = util.setFilePosFasta(filename, numFastaSeqs);
             if (numFastaSeqs < processors) { processors = numFastaSeqs; }
         
-            if (qfilename != "") { 
+            if (qfilename != "") {
                 long long numQualSeqs = 0;
-                qfileFilePos = util.setFilePosFasta(qfilename, numQualSeqs); 
+                qfileFilePos = util.setFilePosFasta(qfilename, numQualSeqs);
                 
                 if (numFastaSeqs != numQualSeqs) {
-                    m->mothurOut("[ERROR]: You have " + toString(numFastaSeqs) + " sequences in your fasta file, but " + toString(numQualSeqs) + " sequences in your quality file.\n");  m->setControl_pressed(true); 
+                    m->mothurOut("[ERROR]: You have " + toString(numFastaSeqs) + " sequences in your fasta file, but " + toString(numQualSeqs) + " sequences in your quality file.\n");  m->setControl_pressed(true);
                 }
             }
         
@@ -1178,20 +1195,20 @@ int TrimSeqsCommand::setLines(string filename, string qfilename) {
             int numSeqsPerProcessor = numFastaSeqs / processors;
             for (int i = 0; i < processors; i++) {
                 int startIndex =  i * numSeqsPerProcessor;
-                if(i == (processors - 1)){	numSeqsPerProcessor = numFastaSeqs - i * numSeqsPerProcessor; 	}
+                if(i == (processors - 1)){    numSeqsPerProcessor = numFastaSeqs - i * numSeqsPerProcessor;     }
                 lines.push_back(linePair(fastaFilePos[startIndex], numSeqsPerProcessor));
                 if (qfilename != "") {  qLines.push_back(linePair(qfileFilePos[startIndex], numSeqsPerProcessor)); }
             }
         
-            if(qfilename == "")	{	qLines = lines;	} //files with duds
-			return 1;
-		
-		#endif
-	}
-	catch(exception& e) {
-		m->errorOut(e, "TrimSeqsCommand", "setLines");
-		exit(1);
-	}
+            if(qfilename == "")    {    qLines = lines;    } //files with duds
+            return 1;
+        
+        #endif
+    }
+    catch(exception& e) {
+        m->errorOut(e, "TrimSeqsCommand", "setLines");
+        exit(1);
+    }
 }
 //***************************************************************************************************************
 


=====================================
source/commands/trimseqscommand.h
=====================================
@@ -23,43 +23,42 @@
 
 class TrimSeqsCommand : public Command {
 public:
-	TrimSeqsCommand(string);
-	~TrimSeqsCommand(){}
-	
-	vector<string> setParameters();
-	string getCommandName()			{ return "trim.seqs";	}
-	string getCommandCategory()		{ return "Sequence Processing";		}
-	
-	string getHelpString();	
-    string getOutputPattern(string);	
-	string getCitation() { return "http://www.mothur.org/wiki/Trim.seqs"; }
-	string getDescription()		{ return "provides the preprocessing features needed to screen and sort pyrosequences"; }
+    TrimSeqsCommand(string);
+    ~TrimSeqsCommand(){}
+    
+    vector<string> setParameters();
+    string getCommandName()            { return "trim.seqs";    }
+    string getCommandCategory()        { return "Sequence Processing";        }
+    
+    string getHelpString();
+    string getOutputPattern(string);
+    string getCitation() { return "http://www.mothur.org/wiki/Trim.seqs"; }
+    string getDescription()        { return "provides the preprocessing features needed to screen and sort pyrosequences"; }
 
-	int execute(); 
-	void help() { m->mothurOut(getHelpString()); }	
-	
-private:    
-	bool abort, createGroup;
-	string fastaFile, oligoFile, qFileName, groupfile, nameFile, countfile;
-	
-	bool flip, allFiles, qtrim, keepforward, pairedOligos, reorient, logtransform;
-	int maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, ldiffs, sdiffs, comboStarts;
-	int qWindowSize, qWindowStep, keepFirst, removeLast;
-	double qRollAverage, qThreshold, qWindowAverage, qAverage;
-	vector<string> outputNames;
-	set<string> filesToRemove;
-	vector<string> groupVector;
-	map<string, int> groupCounts;  
-	map<string, string> nameMap;
+    int execute();
+    void help() { m->mothurOut(getHelpString()); }
+    
+private:
+    bool abort, createGroup;
+    string fastaFile, oligoFile, qFileName, groupfile, nameFile, countfile;
+    
+    bool flip, allFiles, qtrim, keepforward, pairedOligos, reorient, logtransform;
+    int maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, ldiffs, sdiffs, comboStarts;
+    int qWindowSize, qWindowStep, keepFirst, removeLast;
+    double qRollAverage, qThreshold, qWindowAverage, qAverage;
+    vector<string> outputNames;
+    set<string> filesToRemove;
+    vector<string> groupVector;
+    map<string, int> groupCounts;
+    map<string, string> nameMap;
     map<string, int> nameCount; //for countfile name -> repCount
-    map<string, string> groupMap; //for countfile name -> group
 
-	vector<linePair> lines;
-	vector<linePair> qLines;
-	
-	long long createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, string);
+    vector<linePair> lines;
+    vector<linePair> qLines;
+    
+    long long createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, string);
     int processNamesCountFiles(string trimFasta, set<string> badNames, map<string, string> groupMap, string trimNameFileName, string scrapNameFileName, string trimCountFileName, string scrapCountFileName, string groupFile);
-	int setLines(string, string);
+    int setLines(string, string);
 };
 
 /**************************************************************************************************/



View it on GitLab: https://salsa.debian.org/med-team/mothur/-/compare/2af3c2cc4a422f600cb4e061ad26913f3b1cb680...23b882e794830240fdd7d01153559b0de19ffb16

-- 
View it on GitLab: https://salsa.debian.org/med-team/mothur/-/compare/2af3c2cc4a422f600cb4e061ad26913f3b1cb680...23b882e794830240fdd7d01153559b0de19ffb16
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200904/2471865f/attachment-0001.html>


More information about the debian-med-commit mailing list