[med-svn] [mothur] 03/06: New upstream version 1.39.3

Tomasz Buchert tomasz at moszumanska.debian.org
Sun Feb 26 15:29:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

tomasz pushed a commit to branch master
in repository mothur.

commit b7377f09685dde6baeb8f4ece88644f0b2813686
Author: Tomasz Buchert <tomasz at debian.org>
Date:   Sun Feb 26 15:33:30 2017 +0100

    New upstream version 1.39.3
---
 Makefile                                  |  9 +--
 Mothur.xcodeproj/project.pbxproj          | 16 +++---
 makefile-internal                         | 18 +++---
 source/classifier/classify.cpp            | 16 +-----
 source/classifier/phylosummary.cpp        |  2 +-
 source/classifier/phylotree.cpp           | 35 ++++++------
 source/commands/chimeravsearchcommand.cpp |  6 +-
 source/commands/classifyotucommand.cpp    | 14 +++--
 source/commands/clustersplitcommand.cpp   | 11 +++-
 source/commands/clustersplitcommand.h     |  2 +-
 source/commands/getcurrentcommand.cpp     |  2 +
 source/commands/makecontigscommand.cpp    | 81 +++++++++++++++------------
 source/commands/makecontigscommand.h      | 64 ++++++++++++----------
 source/commands/makefilecommand.cpp       | 30 +++++++++-
 source/commands/pcrseqscommand.cpp        |  6 +-
 source/commands/preclustercommand.cpp     |  6 +-
 source/commands/renamefilecommand.cpp     | 10 ++--
 source/commands/sensspeccommand.cpp       | 50 ++++++-----------
 source/commands/sensspeccommand.h         |  2 +-
 source/commands/seqsummarycommand.cpp     | 16 +++++-
 source/commands/setcurrentcommand.cpp     | 20 ++++++-
 source/commands/setcurrentcommand.h       |  2 +-
 source/commands/sffinfocommand.cpp        |  2 +-
 source/commands/sracommand.cpp            |  3 +-
 source/datastructures/optimatrix.cpp      | 62 ++++++++++-----------
 source/engine.cpp                         | 10 ++--
 source/mothurout.cpp                      | 91 +++++++++++++++++++++++--------
 source/mothurout.h                        | 10 +++-
 source/optionparser.cpp                   |  2 +
 29 files changed, 353 insertions(+), 245 deletions(-)

diff --git a/Makefile b/Makefile
index 196ac52..a805276 100644
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,8 @@ USEBOOST ?= yes
 BOOST_LIBRARY_DIR="\"Enter_your_boost_library_path_here\""
 BOOST_INCLUDE_DIR="\"Enter_your_boost_include_path_here\""
 MOTHUR_FILES="\"Enter_your_default_path_here\""
-RELEASE_DATE = "\"1/23/2017\""
-VERSION = "\"1.39.0\""
+RELEASE_DATE = "\"2/2/2017\""
+VERSION = "\"1.39.1\""
 
 ifeq  ($(strip $(64BIT_VERSION)),yes)
     CXXFLAGS += -DBIT_VERSION
@@ -27,10 +27,7 @@ ifeq  ($(strip $(OPTIMIZE)),yes)
     CXXFLAGS += -O3
 endif
 
-#CPP_11
-    CXXFLAGS += -std=c++11
-
-CXXFLAGS += -DRELEASE_DATE=${RELEASE_DATE} -DVERSION=${VERSION} -O3
+CXXFLAGS += -DRELEASE_DATE=${RELEASE_DATE} -DVERSION=${VERSION}
 
 ifeq  ($(strip $(MOTHUR_FILES)),"\"Enter_your_default_path_here\"")
 else
diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj
index 6806724..612d786 100644
--- a/Mothur.xcodeproj/project.pbxproj
+++ b/Mothur.xcodeproj/project.pbxproj
@@ -3384,8 +3384,8 @@
 				GCC_MODEL_TUNING = G5;
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"VERSION=\"\\\"1.39.0\\\"\"",
-					"RELEASE_DATE=\"\\\"1/20/2017\\\"\"",
+					"VERSION=\"\\\"1.39.2\\\"\"",
+					"RELEASE_DATE=\"\\\"2/16/2017\\\"\"",
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
 				);
 				GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
@@ -3419,8 +3419,8 @@
 				GCC_MODEL_TUNING = G5;
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"VERSION=\"\\\"1.39.0\\\"\"",
-					"RELEASE_DATE=\"\\\"1/20/2017\\\"\"",
+					"VERSION=\"\\\"1.39.2\\\"\"",
+					"RELEASE_DATE=\"\\\"2/16/2017\\\"\"",
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
 				);
 				GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
@@ -3455,8 +3455,8 @@
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
-					"VERSION=\"\\\"1.36.0\\\"\"",
-					"RELEASE_DATE=\"\\\"07/23/2015\\\"\"",
+					"VERSION=\"\\\"1.39.1\\\"\"",
+					"RELEASE_DATE=\"\\\"2/2/2017\\\"\"",
 				);
 				GCC_VERSION = "";
 				"GCC_VERSION[arch=*]" = "";
@@ -3505,8 +3505,8 @@
 				GCC_MODEL_TUNING = "";
 				GCC_OPTIMIZATION_LEVEL = 3;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-					"VERSION=\"\\\"1.39.0\\\"\"",
-					"RELEASE_DATE=\"\\\"1/20/2017\\\"\"",
+					"VERSION=\"\\\"1.39.2\\\"\"",
+					"RELEASE_DATE=\"\\\"2/16/2017\\\"\"",
 					"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
 				);
 				GCC_VERSION = "";
diff --git a/makefile-internal b/makefile-internal
index e319fae..3e017db 100644
--- a/makefile-internal
+++ b/makefile-internal
@@ -1,23 +1,21 @@
 64BIT_VERSION ?= yes
-USEREADLINE ?= yes
-USEBOOST ?= yes
-RELEASE_DATE = "\"1/23/2017\""
-VERSION = "\"1.39.0\""
+USEREADLINE ?= no
+USEBOOST ?= no
+RELEASE_DATE = "\"2/7/2017\""
+VERSION = "\"1.39.1\""
 
 # Optimize to level 3:
     CXXFLAGS += -O3
 
-#CPP_11
-    CXXFLAGS += -std=c++11
 
 ifeq  ($(strip $(64BIT_VERSION)),yes)
     #if you are a mac user use the following line
-    TARGET_ARCH += -arch x86_64
+    #TARGET_ARCH += -arch x86_64
 
     #if you using cygwin to build Windows the following line
-    #CXX = x86_64-w64-mingw32-g++
-    #CC = x86_64-w64-mingw32-g++
-    #TARGET_ARCH += -m64 -static
+    CXX = x86_64-w64-mingw32-g++
+    CC = x86_64-w64-mingw32-g++
+    TARGET_ARCH += -m64 -static
 
     #if you are a linux user use the following line - specific processor builds in future??
     #CXXFLAGS += -mtune=generic
diff --git a/source/classifier/classify.cpp b/source/classifier/classify.cpp
index 53c1756..7628e8b 100644
--- a/source/classifier/classify.cpp
+++ b/source/classifier/classify.cpp
@@ -123,26 +123,16 @@ int Classify::readTaxonomy(string file) {
 		phyloTree = new PhyloTree();
 		string name, taxInfo;
 		
-		m->mothurOutEndLine();
-		m->mothurOut("Reading in the " + file + " taxonomy...\t");	cout.flush();
+		m->mothurOut("\nReading in the " + file + " taxonomy...\t");	cout.flush();
         if (m->debug) { m->mothurOut("[DEBUG]: Taxonomies read in...\n"); }
         
-        
         taxonomy.clear(); 
         m->readTax(file, taxonomy, true);
         
-        //commented out to save time with large templates. 6/12/13
-        //map<string, string> tempTaxonomy;
-        for (map<string, string>::iterator itTax = taxonomy.begin(); itTax != taxonomy.end(); itTax++) {  
-            //if (m->inUsersGroups(itTax->first, names)) {
-                phyloTree->addSeqToTree(itTax->first, itTax->second);
+        for (map<string, string>::iterator itTax = taxonomy.begin(); itTax != taxonomy.end(); itTax++) {
+            phyloTree->addSeqToTree(itTax->first, itTax->second);
             if (m->control_pressed) { break; }
-                //tempTaxonomy[itTax->first] = itTax->second;
-           // }else {
-            //    m->mothurOut("[WARNING]: " + itTax->first + " is in your taxonomy file and not in your reference file, ignoring.\n");
-            //}
         }
-        //taxonomy = tempTaxonomy;
 
 		phyloTree->assignHeirarchyIDs(0);
         
diff --git a/source/classifier/phylosummary.cpp b/source/classifier/phylosummary.cpp
index 0be3cb7..cb686a8 100644
--- a/source/classifier/phylosummary.cpp
+++ b/source/classifier/phylosummary.cpp
@@ -233,7 +233,7 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){
 					int index = tree.size() - 1;
 				
 					tree[index].parent = currentNode;
-					tree[index].level = (level+1);
+					tree[index].level = level;
 					tree[currentNode].children[taxon] = index;
                     int thisCount = 1;
 					
diff --git a/source/classifier/phylotree.cpp b/source/classifier/phylotree.cpp
index d738cb3..bc9e9f4 100644
--- a/source/classifier/phylotree.cpp
+++ b/source/classifier/phylotree.cpp
@@ -18,8 +18,10 @@ PhyloTree::PhyloTree(){
 		numSeqs = 0;
 		tree.push_back(TaxNode("Root"));
 		tree[0].heirarchyID = "0";
+        tree[0].level = 0;
 		maxLevel = 0;
 		calcTotals = true;
+        
 		addSeqToTree("unknown", "unknown;");
 	}
 	catch(exception& e) {
@@ -78,6 +80,7 @@ PhyloTree::PhyloTree(string tfile){
 		numSeqs = 0;
 		tree.push_back(TaxNode("Root"));
 		tree[0].heirarchyID = "0";
+        tree[0].level = 0;
 		maxLevel = 0;
 		calcTotals = true;
 		string name, tax;
@@ -90,16 +93,15 @@ PhyloTree::PhyloTree(string tfile){
             temp.erase(itTemp++);
         }
         
-		assignHeirarchyIDs(0);
-        
         string unknownTax = "unknown;";
         //added last taxon until you get desired level
 		for (int i = 1; i < maxLevel; i++) {
 			unknownTax += "unknown_unclassfied;";
 		}
-        
         addSeqToTree("unknown", unknownTax);
         
+        assignHeirarchyIDs(0);
+        
 		//create file for summary if needed
 		setUp(tfile);
 	}
@@ -191,8 +193,7 @@ int PhyloTree::addSeqToTree(string seqName, string seqTaxonomy){
 		
 		tree[0].accessions.push_back(seqName);
 		m->removeConfidences(seqTaxonomy);
-		
-		string taxon;// = getNextTaxon(seqTaxonomy);
+        string taxon;// = getNextTaxon(seqTaxonomy);
 	
 		while(seqTaxonomy != ""){
 			
@@ -217,11 +218,13 @@ int PhyloTree::addSeqToTree(string seqName, string seqTaxonomy){
 			}
 			else{											//otherwise, create it
 				tree.push_back(TaxNode(taxon));
-				numNodes++;
-				tree[currentNode].children[taxon] = numNodes-1;
-				tree[numNodes-1].parent = currentNode;
 				
-				currentNode = tree[currentNode].children[taxon];
+				tree[currentNode].children[taxon] = numNodes;
+                tree[numNodes].level = level;
+				tree[numNodes].parent = currentNode;
+                currentNode = numNodes;
+                numNodes++;
+				
 				tree[currentNode].accessions.push_back(seqName);
 				name2Taxonomy[seqName] = currentNode;
 			}
@@ -296,7 +299,7 @@ void PhyloTree::assignHeirarchyIDs(int index){
                 
 			tree[it->second].heirarchyID = tree[index].heirarchyID + '.' + toString(counter);
 			counter++;
-			tree[it->second].level = tree[index].level + 1;
+			//tree[it->second].level = tree[index].level + 1;
 						
 			//save maxLevel for binning the unclassified seqs
 			if (tree[it->second].level > maxLevel) { maxLevel = tree[it->second].level; } 
@@ -374,12 +377,12 @@ void PhyloTree::binUnclassified(string file){
 				}
 				else{											//otherwise, create it
 					copy.push_back(TaxNode(taxon));
-					copyNodes++;
-					copy[currentNode].children[taxon] = copyNodes-1;
-					copy[copyNodes-1].parent = currentNode;
-					copy[copyNodes-1].level = copy[currentNode].level + 1;
-									
-					currentNode = copy[currentNode].children[taxon];
+					
+					copy[currentNode].children[taxon] = copyNodes;
+					copy[copyNodes].parent = currentNode;
+					copy[copyNodes].level = copy[currentNode].level + 1;
+                    currentNode = copyNodes;
+                    copyNodes++;
 				}
 			}
 		}
diff --git a/source/commands/chimeravsearchcommand.cpp b/source/commands/chimeravsearchcommand.cpp
index 7dd40c4..ae45768 100644
--- a/source/commands/chimeravsearchcommand.cpp
+++ b/source/commands/chimeravsearchcommand.cpp
@@ -1390,8 +1390,10 @@ int ChimeraVsearchCommand::driver(string outputFName, string filename, string ac
             
             string name = seq.getName();
             
-            name = name.substr(0, name.length()-1); //rip off last ;
-            name = name.substr(0, name.find_last_of(';'));
+            if (templatefile == "self") {
+                name = name.substr(0, name.length()-1); //rip off last ;
+                name = name.substr(0, name.find_last_of(';'));
+            }
             
             out << name << endl; numChimeras++;
         }
diff --git a/source/commands/classifyotucommand.cpp b/source/commands/classifyotucommand.cpp
index 175f0a2..4dd6e54 100644
--- a/source/commands/classifyotucommand.cpp
+++ b/source/commands/classifyotucommand.cpp
@@ -325,8 +325,9 @@ int ClassifyOtuCommand::execute(){
 		while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
 			
 			if (allLines == 1 || labels.count(list->getLabel()) == 1){
-			
-					m->mothurOut(list->getLabel() + "\t" + toString(list->size())); m->mothurOutEndLine();
+                    string output = toString(list->size());  if (basis == "sequence") { output = toString(list->getNumSeqs()); }
+                
+					m->mothurOut(list->getLabel() + "\t" + toString(output)); m->mothurOutEndLine();
 					process(list);
 					if (m->control_pressed) { outputTypes.clear(); for (int i = 0; i < outputNames.size(); i++) {	m->mothurRemove(outputNames[i]);  } if (ct != NULL) { delete ct; } if (groupMap != NULL) { delete groupMap; } delete input; delete list; return 0; }
 										
@@ -339,7 +340,9 @@ int ClassifyOtuCommand::execute(){
 					
 					delete list;
 					list = input->getListVector(lastLabel);
-					m->mothurOut(list->getLabel() + "\t" + toString(list->size())); m->mothurOutEndLine();
+                
+                    string output = toString(list->size());  if (basis == "sequence") { output = toString(list->getNumSeqs()); }
+					m->mothurOut(list->getLabel() + "\t" + toString(output)); m->mothurOutEndLine();
 					process(list);
 				
 					
@@ -374,7 +377,8 @@ int ClassifyOtuCommand::execute(){
 		if (needToRun == true)  {
 			if (list != NULL) {	delete list;	}
 			list = input->getListVector(lastLabel);
-			m->mothurOut(list->getLabel() + "\t" + toString(list->size())); m->mothurOutEndLine();
+            string output = toString(list->size());  if (basis == "sequence") { output = toString(list->getNumSeqs()); }
+			m->mothurOut(list->getLabel() + "\t" + toString(output)); m->mothurOutEndLine();
 			
 			process(list);
 			delete list;
@@ -733,7 +737,7 @@ int ClassifyOtuCommand::process(ListVector* processList) {
         }
 		
 		delete taxaSum;
-		
+    
 		return 0;
 
 	}
diff --git a/source/commands/clustersplitcommand.cpp b/source/commands/clustersplitcommand.cpp
index 9ffea0b..d6febc8 100644
--- a/source/commands/clustersplitcommand.cpp
+++ b/source/commands/clustersplitcommand.cpp
@@ -25,6 +25,7 @@ vector<string> ClusterSplitCommand::setParameters(){
 		CommandParameter psplitmethod("splitmethod", "Multiple", "classify-fasta-distance", "distance", "", "", "","",false,false,true); parameters.push_back(psplitmethod);
 		CommandParameter plarge("large", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(plarge);
 		CommandParameter pshowabund("showabund", "Boolean", "", "T", "", "", "","",false,false); parameters.push_back(pshowabund);
+        CommandParameter prunspenspec("runsensspec", "Boolean", "", "T", "", "", "","",false,false); parameters.push_back(prunspenspec);
         CommandParameter pcluster("cluster", "Boolean", "", "T", "", "", "","",false,false); parameters.push_back(pcluster);
 		CommandParameter ptiming("timing", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(ptiming);
 		CommandParameter pprocessors("processors", "Number", "", "1", "", "", "","",false,false,true); parameters.push_back(pprocessors);
@@ -55,7 +56,7 @@ vector<string> ClusterSplitCommand::setParameters(){
 string ClusterSplitCommand::getHelpString(){	
 	try {
 		string helpString = "";
-		helpString += "The cluster.split command parameter options are file, fasta, phylip, column, name, count, cutoff, precision, method, splitmethod, taxonomy, taxlevel, showabund, timing, large, cluster, iters, delta, initialize, dist, processors. Fasta or Phylip or column and name are required.\n";
+		helpString += "The cluster.split command parameter options are file, fasta, phylip, column, name, count, cutoff, precision, method, splitmethod, taxonomy, taxlevel, showabund, timing, large, cluster, iters, delta, initialize, dist, processors, runsensspec. Fasta or Phylip or column and name are required.\n";
 		helpString += "The cluster.split command can split your files in 3 ways. Splitting by distance file, by classification, or by classification also using a fasta file. \n";
 		helpString += "For the distance file method, you need only provide your distance file and mothur will split the file into distinct groups. \n";
 		helpString += "For the classification method, you need to provide your distance file and taxonomy file, and set the splitmethod to classify.  \n";
@@ -75,6 +76,7 @@ string ClusterSplitCommand::getHelpString(){
         helpString += "The metric parameter allows to select the metric in the opticluster method. Options are Matthews correlation coefficient (mcc), sensitivity (sens), specificity (spec), true positives + true negatives (tptn), false positives + false negatives (fpfn), true positives (tp), true negative (tn), false positive (fp), false negative (fn), f1score (f1score), accuracy (accuracy), positive predictive value (ppv), negative predictive value (npv), false discovery rate (fdr). De [...]
         helpString += "The delta parameter allows to set the stable value for the metric in the opticluster method. Default=0.0001\n";
         helpString += "The initialize parameter allows to select the initial randomization for the opticluster method. Options are singleton, meaning each sequence is randomly assigned to its own OTU, or oneotu meaning all sequences are assigned to one otu. Default=singleton.\n";
+        helpString += "The runsensspec parameter allows to run the sens.spec command on the completed list file. Default=true.\n";
 		helpString += "The method parameter allows you to enter your clustering mothod. Options are furthest, nearest, average, weighted, agc, dgc and opti. Default=opti.  The agc and dgc methods require a fasta file.";
 		helpString += "The splitmethod parameter allows you to specify how you want to split your distance file before you cluster, default=distance, options distance, classify or fasta. \n";
 		helpString += "The taxonomy parameter allows you to enter the taxonomy file for your sequences, this is only valid if you are using splitmethod=classify. Be sure your taxonomy file does not include the probability scores. \n";
@@ -358,6 +360,9 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
             temp = validParameter.validFile(parameters, "classic", false);			if (temp == "not found") { temp = "F"; }
 			classic = m->isTrue(temp);
             
+            temp = validParameter.validFile(parameters, "runsensspec", false);			if (temp == "not found") { temp = "T"; }
+            runsensSpec = m->isTrue(temp);
+            
             //not using file option and don't have fasta method with classic
             if (((splitmethod != "fasta") && classic) && (file == "")) { m->mothurOut("[ERROR]: splitmethod must be fasta to use cluster.classic, or you must use the file option.\n"); abort=true; }
 			
@@ -590,7 +595,7 @@ int ClusterSplitCommand::execute(){
 		
 		m->mothurOut("It took " + toString(time(NULL) - estart) + " seconds to merge."); m->mothurOutEndLine();
         
-        if (method == "opti") { runSensSpec();  }
+        if ((method == "opti") && (runsensSpec)) { runSensSpec();  }
         
         if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; }
         
@@ -1662,7 +1667,7 @@ int ClusterSplitCommand::runSensSpec() {
         }else if (columnfile != "") { columnFile = columnfile; }
         else { phylipFile = phylipfile; }
     
-        string inputString = "list=" + listFile;
+        string inputString = "cutoff=" + toString(cutoff) + ", list=" + listFile;
         if (columnFile != "") { inputString += ", column=" + columnFile;  }
         else if (phylipfile != "")   { inputString += ", phylip=" + phylipfile; }
         else { m->mothurOut("[WARNING]: Cannot run sens.spec analysis without a phylip or column file, skipping."); return 0;  }
diff --git a/source/commands/clustersplitcommand.h b/source/commands/clustersplitcommand.h
index e7941d9..bf76c44 100644
--- a/source/commands/clustersplitcommand.h
+++ b/source/commands/clustersplitcommand.h
@@ -53,7 +53,7 @@ private:
 	string file, method, fileroot, tag, outputDir, phylipfile, columnfile, namefile, countfile, distfile, format, showabund, timing, splitmethod, taxFile, fastafile, inputDir, vsearchLocation, metric, initialize;
 	double cutoff, splitcutoff, stableMetric;
 	int precision, length, processors, taxLevelCutoff, maxIters;
-	bool print_start, abort, large, classic, runCluster, deleteFiles, isList, cutoffNotSet, makeDist;
+	bool print_start, abort, large, classic, runCluster, deleteFiles, isList, cutoffNotSet, makeDist, runsensSpec;
 	time_t start;
 	ofstream outList, outRabund, outSabund;
     long long numSingletons;
diff --git a/source/commands/getcurrentcommand.cpp b/source/commands/getcurrentcommand.cpp
index 6388014..5e71ae6 100644
--- a/source/commands/getcurrentcommand.cpp
+++ b/source/commands/getcurrentcommand.cpp
@@ -164,6 +164,8 @@ int GetCurrentCommand::execute(){
 					m->setTaxonomyFile("");
                 }else if (types[i] == "constaxonomy") {
                     m->setConsTaxonomyFile("");
+                }else if (types[i] == "contigsreport") {
+                    m->setContigsReportFile("");
 				}else if (types[i] == "flow") {
 					m->setFlowFile("");
                 }else if (types[i] == "biom") {
diff --git a/source/commands/makecontigscommand.cpp b/source/commands/makecontigscommand.cpp
index 858c5e8..4226ca3 100644
--- a/source/commands/makecontigscommand.cpp
+++ b/source/commands/makecontigscommand.cpp
@@ -583,7 +583,7 @@ int MakeContigsCommand::execute(){
         string currentReport = "";
         itTypes = outputTypes.find("report");
         if (itTypes != outputTypes.end()) {
-            if ((itTypes->second).size() != 0) { currentReport = (itTypes->second)[0];  }
+            if ((itTypes->second).size() != 0) { currentReport = (itTypes->second)[0]; m->setContigsReportFile(currentReport); }
         }
 
 		//output group counts
@@ -825,6 +825,10 @@ unsigned long long MakeContigsCommand::processSingleFileOption(map<string, int>&
 //**********************************************************************************************************************
 unsigned long long MakeContigsCommand::processMultipleFileOption(map<string, int>& totalGroupCounts, vector<string>& theseOutputFileNames, map<string, string>& theseAllFileNames) {
     try {
+        
+        //read file
+        vector< vector<string> > fileInputs = readFileNames(file);  if (m->control_pressed) { return 0; }
+        
         unsigned long long numReads = 0;
         
         map<string, string> cvars;
@@ -861,10 +865,6 @@ unsigned long long MakeContigsCommand::processMultipleFileOption(map<string, int
         theseOutputFileNames.push_back(compositeQualFile);
         theseOutputFileNames.push_back(compositeMisMatchFile);
         
-        
-        //read file
-        vector< vector<string> > fileInputs = readFileNames(file);
-        
         if (gz) {
             numReads = createProcessesGroups(fileInputs, compositeGroupFile, compositeFastaFile, compositeScrapFastaFile, compositeQualFile, compositeScrapQualFile, compositeMisMatchFile, totalGroupCounts, theseAllFileNames); theseOutputFileNames.push_back(compositeGroupFile);
         }else {
@@ -2515,39 +2515,43 @@ int MakeContigsCommand::setNameType(string forward, string reverse) {
             else {
                 char delim = ':';
                 if (m->changedSeqNames) { delim = '_'; }
-                
-                int pos = forward.find_last_of(delim);
-                string tempForward = forward;
-                string tempForwardEnd = forward;
-                if (pos != string::npos) {
-                    tempForwardEnd = forward.substr(pos+1);
-                }
-                
-                int pos2 = reverse.find_last_of(delim);
-                string tempReverse = reverse;
-                string tempReverseEnd = reverse;
-                if (pos2 != string::npos) {
-                    tempReverseEnd = reverse.substr(pos2+1);
-                }
-                
-                if (tempForwardEnd == tempReverseEnd) {
-                    if ((m->isAllAlphas(tempForwardEnd)) && (m->isAllAlphas(tempReverseEnd))) {
-                        //check for off by one on rest of name
-                        if (tempForward.length() == tempReverse.length()) {
-                            int numDiffs = 0;
-                            char forwardDiff = ' '; char reverseDiff = ' '; int spot = 0;
-                            for (int i = 0; i < tempForward.length(); i++) {
-                                if (tempForward[i] != tempReverse[i]) {
-                                    numDiffs++;
-                                    forwardDiff = tempForward[i];
-                                    reverseDiff = tempReverse[i];
-                                    spot = i;
+                vector<char> delims; delims.push_back(delim); delims.push_back('/');
+                
+                for (int j = 0; j < delims.size(); j++) {
+                    delim = delims[j];
+                    int pos = forward.find_last_of(delim);
+                    string tempForward = forward;
+                    string tempForwardEnd = forward;
+                    if (pos != string::npos) {
+                        tempForwardEnd = forward.substr(pos+1);
+                    }
+                    
+                    int pos2 = reverse.find_last_of(delim);
+                    string tempReverse = reverse;
+                    string tempReverseEnd = reverse;
+                    if (pos2 != string::npos) {
+                        tempReverseEnd = reverse.substr(pos2+1);
+                    }
+                    
+                    if (tempForwardEnd != tempReverseEnd) {
+                        if ((m->isAllAlphaNumerics(tempForwardEnd)) && (m->isAllAlphaNumerics(tempReverseEnd))) {
+                            //check for off by one on rest of name
+                            if (tempForward.length() == tempReverse.length()) {
+                                int numDiffs = 0;
+                                char forwardDiff = ' '; char reverseDiff = ' '; int spot = 0;
+                                for (int i = 0; i < tempForward.length(); i++) {
+                                    if (tempForward[i] != tempReverse[i]) {
+                                        numDiffs++;
+                                        forwardDiff = tempForward[i];
+                                        reverseDiff = tempReverse[i];
+                                        spot = i;
+                                    }
                                 }
+                                if (numDiffs == 1) {
+                                    if ((forwardDiff == '1') && (reverseDiff == '2')) { type = offByOne; offByOneTrimLength = tempForward.length()-spot+1; }
+                                }
+                                //cout << tempReverse.substr(0, (tempReverse.length()-offByOneTrimLength)) << endl;
                             }
-                            if (numDiffs == 1) {
-                                if ((forwardDiff == '1') && (reverseDiff == '2')) { type = offByOne; offByOneTrimLength = tempForward.length()-spot+1; }
-                            }
-                            //cout << tempReverse.substr(0, (tempReverse.length()-offByOneTrimLength)) << endl;
                         }
                     }
                 }
@@ -2972,6 +2976,9 @@ vector< vector<string> > MakeContigsCommand::readFileNames(string filename){
             
             bool skip = false;
             string line = m->getline(in);  m->gobble(in);
+            
+            if (m->debug) {  m->mothurOut("[DEBUG]: " + line +"\n");  }
+            
             vector<string> pieces = m->splitWhiteSpace(line);
             
             string group = "";
@@ -3263,6 +3270,8 @@ vector< vector<string> > MakeContigsCommand::readFileNames(string filename){
             gz = true;
         }else { gz = false; }
         
+        if (files.size() == 0) { m->control_pressed = true; }
+        
         return files;
     }
     catch(exception& e) {
diff --git a/source/commands/makecontigscommand.h b/source/commands/makecontigscommand.h
index 888b824..d0c99be 100644
--- a/source/commands/makecontigscommand.h
+++ b/source/commands/makecontigscommand.h
@@ -282,38 +282,44 @@ static DWORD WINAPI MyGroupContigsThreadFunction(LPVOID lpParam){
                     char delim = ':';
                     if (pDataArray->m->changedSeqNames) { delim = '_'; }
                     
-                    int pos = forward.find_last_of(delim);
-                    string tempForward = forward;
-                    string tempForwardEnd = forward;
-                    if (pos != string::npos) {
-                        tempForwardEnd = forward.substr(pos+1);
-                    }
-                    
-                    int pos2 = reverse.find_last_of(delim);
-                    string tempReverse = reverse;
-                    string tempReverseEnd = reverse;
-                    if (pos2 != string::npos) {
-                        tempReverseEnd = reverse.substr(pos2+1);
-                    }
+                    vector<char> delims; delims.push_back(delim); delims.push_back('/');
                     
-                    if (tempForwardEnd == tempReverseEnd) {
-                        if ((pDataArray->m->isAllAlphas(tempForwardEnd)) && (pDataArray->m->isAllAlphas(tempReverseEnd))) {
-                            //check for off by one on rest of name
-                            if (tempForward.length() == tempReverse.length()) {
-                                int numDiffs = 0;
-                                char forwardDiff = ' '; char reverseDiff = ' '; int spot = 0;
-                                for (int i = 0; i < tempForward.length(); i++) {
-                                    if (tempForward[i] != tempReverse[i]) {
-                                        numDiffs++;
-                                        forwardDiff = tempForward[i];
-                                        reverseDiff = tempReverse[i];
-                                        spot = i;
+                    for (int j = 0; j < delims.size(); j++) {
+                        delim = delims[j];
+
+                        int pos = forward.find_last_of(delim);
+                        string tempForward = forward;
+                        string tempForwardEnd = forward;
+                        if (pos != string::npos) {
+                            tempForwardEnd = forward.substr(pos+1);
+                        }
+                        
+                        int pos2 = reverse.find_last_of(delim);
+                        string tempReverse = reverse;
+                        string tempReverseEnd = reverse;
+                        if (pos2 != string::npos) {
+                            tempReverseEnd = reverse.substr(pos2+1);
+                        }
+                        
+                        if (tempForwardEnd != tempReverseEnd) {
+                            if ((pDataArray->m->isAllAlphaNumerics(tempForwardEnd)) && (pDataArray->m->isAllAlphaNumerics(tempReverseEnd))) {
+                                //check for off by one on rest of name
+                                if (tempForward.length() == tempReverse.length()) {
+                                    int numDiffs = 0;
+                                    char forwardDiff = ' '; char reverseDiff = ' '; int spot = 0;
+                                    for (int i = 0; i < tempForward.length(); i++) {
+                                        if (tempForward[i] != tempReverse[i]) {
+                                            numDiffs++;
+                                            forwardDiff = tempForward[i];
+                                            reverseDiff = tempReverse[i];
+                                            spot = i;
+                                        }
                                     }
+                                    if (numDiffs == 1) {
+                                        if ((forwardDiff == '1') && (reverseDiff == '2')) { type = offByOne; pDataArray->offByOneTrimLength = tempForward.length()-spot+1; }
+                                    }
+                                    //cout << tempReverse.substr(0, (tempReverse.length()-offByOneTrimLength)) << endl;
                                 }
-                                if (numDiffs == 1) {
-                                    if ((forwardDiff == '1') && (reverseDiff == '2')) { type = offByOne; pDataArray->offByOneTrimLength = tempForward.length()-spot+1; }
-                                }
-                                //cout << tempReverse.substr(0, (tempReverse.length()-offByOneTrimLength)) << endl;
                             }
                         }
                     }
diff --git a/source/commands/makefilecommand.cpp b/source/commands/makefilecommand.cpp
index 591e8f8..18fa5f7 100644
--- a/source/commands/makefilecommand.cpp
+++ b/source/commands/makefilecommand.cpp
@@ -336,6 +336,7 @@ int MakeFileCommand::fillAccnosFile(string tempFile){
     try {
         
         string findCommand = "";
+        string tempOut = tempFile;
         tempFile = "\"" + tempFile + "\"";
         
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
@@ -343,12 +344,37 @@ int MakeFileCommand::fillAccnosFile(string tempFile){
         findCommand = "find \"" + inputDir.substr(0, inputDir.length()-1) + "\" -maxdepth 1 -name \"*." + typeFile + "\" > " + tempFile;
         if (m->debug) { m->mothurOut(findCommand + "\n"); }
         system(findCommand.c_str());
+        
 #else
         //use ls command
-        
-        findCommand = "ls *." + typeFile + " > " + tempFile;
+        findCommand = "find \"\" "  + inputDir.substr(0, inputDir.length()-1) + "\\*." + typeFile + " > " + tempFile;
         if (m->debug) { m->mothurOut(findCommand + "\n"); }
         system(findCommand.c_str());
+
+        ifstream in;
+        ofstream out;
+        tempOut += ".temp";
+        
+        tempFile = tempFile.substr(1, tempFile.length()-2); //remove ""
+        
+        m->openOutputFile(tempOut, out);
+        
+        m->openInputFile(tempFile, in);
+        
+        string junk, filename;
+        while (!in.eof()) {
+            if (m->control_pressed) { break; }
+            in >> junk; m->gobble(in);
+            in >> filename; m->gobble(in);
+            
+            out << filename << endl;
+        }
+        in.close();
+        out.close();
+        
+        m->mothurRemove(tempFile);
+        m->renameFile(tempOut, tempFile);
+        
 #endif
         
         return 0;
diff --git a/source/commands/pcrseqscommand.cpp b/source/commands/pcrseqscommand.cpp
index 44abbcc..d6eba86 100644
--- a/source/commands/pcrseqscommand.cpp
+++ b/source/commands/pcrseqscommand.cpp
@@ -1161,16 +1161,14 @@ int PcrSeqsCommand::readGroup(set<string> names){
 		while(!in.eof()){
 			if (m->control_pressed) { in.close();  out.close();  m->mothurRemove(outputFileName);  return 0; }
 			
-			in >> name;				//read from first column
-			in >> group;			//read from second column
+			in >> name;		m->gobble(in);		//read from first column
+			in >> group;	m->gobble(in);		//read from second column
 			
 			//if this name is in the accnos file
 			if (names.count(name) == 0) {
 				wroteSomething = true;
 				out << name << '\t' << group << endl;
 			}else {  removedCount++;  }
-            
-			m->gobble(in);
 		}
 		in.close();
 		out.close();
diff --git a/source/commands/preclustercommand.cpp b/source/commands/preclustercommand.cpp
index 0f17144..363a605 100644
--- a/source/commands/preclustercommand.cpp
+++ b/source/commands/preclustercommand.cpp
@@ -790,7 +790,8 @@ int PreClusterCommand::readFASTA(){
 					if (it == nameMap.end()) { m->mothurOut(seq.getName() + " is not in your names file, please correct."); m->mothurOutEndLine(); exit(1); }
 					else{
                         string second = it->second;
-						seqPNode tempNode(m->getNumNames(second), seq, second);
+                        int numReps = m->getNumNames(second);
+						seqPNode tempNode(numReps, seq, second);
 						alignSeqs.push_back(tempNode);
 						lengths.insert(seq.getAligned().length());
 					}	
@@ -805,10 +806,11 @@ int PreClusterCommand::readFASTA(){
 		}
 		inFasta.close();
         
+        length = *(lengths.begin());
+        
         if (lengths.size() > 1) { method = "unaligned"; }
         else if (lengths.size() == 1) {  method = "aligned"; filterSeqs(); }
         
-        length = *(lengths.begin());
         
 		return alignSeqs.size();
 	}
diff --git a/source/commands/renamefilecommand.cpp b/source/commands/renamefilecommand.cpp
index 18387fc..a98093c 100644
--- a/source/commands/renamefilecommand.cpp
+++ b/source/commands/renamefilecommand.cpp
@@ -59,8 +59,8 @@ string RenameFileCommand::getHelpString(){
     try {
         string helpString = "";
         helpString += "The rename.file command allows you to rename files and updates the current files saved by mothur.\n";
-        helpString += "The rename.file command parameters are: phylip, column, list, rabund, sabund, name, group, design, tree, shared, relabund, fasta, qfile, sff, oligos, accnos, biom, count, summary, file, taxonomy, constaxonomy, input, output, prefix, deletedold and shorten.\n";
-        helpString += "The output parameter allows you to provide an output file name for the input file you provide.\n";
+        helpString += "The rename.file command parameters are: phylip, column, list, rabund, sabund, name, group, design, tree, shared, relabund, fasta, qfile, sff, oligos, accnos, biom, count, summary, file, taxonomy, constaxonomy, input, new, prefix, deletedold and shorten.\n";
+        helpString += "The new parameter allows you to provide an output file name for the input file you provide.\n";
         helpString += "The shorten parameter is used to inicate you want mothur to generate output file names for you. For example: stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.an.unique_list.shared would become stability.an.shared. Default=true.";
         helpString += "The prefix parameter allows you to enter your own prefix for shortened names.";
         helpString += "The deleteold parameter indicates whether you want to delete the old file.  Default=true.";
@@ -469,8 +469,8 @@ RenameFileCommand::RenameFileCommand(string option)  {
             if (outputfile == "not found") {
                 if (!mothurGenerated) { m->mothurOut("[ERROR]: you must enter an output file name"); m->mothurOutEndLine();  abort=true; }
                 outputfile = "";
-            }else { mothurGenerated=false; }
-            if (outputDir != "") { outputfile = outputDir + m->getSimpleName(outputfile);  }
+            }else { mothurGenerated=false; if (outputDir != "") { outputfile = outputDir + m->getSimpleName(outputfile);  } }
+            
             
             if ((!mothurGenerated) && (numFiles > 1)) {
                 m->mothurOut("[ERROR]: You cannot use more than one file parameter unless mothur is generating the output filenames for you.\n"); abort= true;
@@ -479,6 +479,8 @@ RenameFileCommand::RenameFileCommand(string option)  {
             if ((mothurGenerated) && (outputfile != "") && (numFiles != 1)) {
                 m->mothurOut("[ERROR]: You must allow mothur to generate the filenames or input one file at a time with a new name, not both.\n"); abort= true;
             }
+            
+            if (outputDir != "") { outputfile = outputDir + m->getSimpleName(outputfile);  }
         }
         
     }
diff --git a/source/commands/sensspeccommand.cpp b/source/commands/sensspeccommand.cpp
index 3eb2374..96966b2 100644
--- a/source/commands/sensspeccommand.cpp
+++ b/source/commands/sensspeccommand.cpp
@@ -290,7 +290,7 @@ int SensSpecCommand::execute(){
 
 //***************************************************************************************************************
 
-int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& getCutoff, string& origCutoff){
+int SensSpecCommand::process(ListVector*& list, bool& getCutoff, string& origCutoff){
 
 	try {
 
@@ -316,7 +316,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 		trueNegatives = 0;
 		falseNegatives = 0;
 
-		map<string, double> distanceMap;
+		set<string> distanceMap;
 
 		//could segfault out if there are sequences in phylip-formatted distance
 		//matrix that aren't in the list file
@@ -327,23 +327,21 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 			int pNumSeqs;
 			phylipFile >> pNumSeqs;
 
-			double distance;
+            double distance; string name;
 
-			vector<string> seqNameVector(pNumSeqs);
+            vector<string> seqNameVector;
 			m->mothurOut(label); m->mothurOutEndLine();
 
 			for(int i=0;i<pNumSeqs;i++){
 
 				if (m->control_pressed) { return 0; }
 
-				phylipFile >> seqNameVector[i];
-
-				//otuIndices[i] = seqMap[seqName];
+                phylipFile >> name; seqNameVector.push_back(name);
 
 				for(int j=0;j<i;j++){
 					phylipFile >> distance;
 
-					if(distance <= cutoff){
+					if(distance < cutoff){
 
 						string seqNamePair;
 						if(seqNameVector[i] < seqNameVector[j]){
@@ -352,7 +350,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 							seqNamePair = seqNameVector[j] + '-' + seqNameVector[i];
 						}
 
-						distanceMap[seqNamePair] = distance;
+						distanceMap.insert(seqNamePair);
 					}
 				}
 
@@ -373,20 +371,20 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 				columnFile >> seqNameA >> seqNameB >> distance;
 				m->gobble(columnFile);
 
-				if(distance <= cutoff){
+				if(distance < cutoff){
 					string seqNamePair;
 
-					if(seqNameA < seqNameB){
+					if(seqNameA <= seqNameB){
 						seqNamePair = seqNameA + '-' + seqNameB;
 					} else {
 						seqNamePair = seqNameB + '-' + seqNameA;
 					}
-					distanceMap[seqNamePair] = distance;
+                    distanceMap.insert(seqNamePair);
 				}
 			}
 			columnFile.close();
 		}
-
+        //cout << distanceMap.size() << endl;;
 		for(int otu=0;otu<numOTUs;otu++){
 			if (m->control_pressed) { return 0; }
 
@@ -394,19 +392,8 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 			string seqList = list->get(otu);
 
 			//count number of sequences in the bin
-			int nSeqsInOTU = 1;
-			for(int i=0;i<seqList.length();i++){
-				if(seqList[i] == ','){	nSeqsInOTU++;	}
-			}
-
-			string seqName = "";
-			istringstream seqListStream(seqList);
-
-			int index = 0;
-			vector<string> otuVector(nSeqsInOTU);
-			while(getline(seqListStream, seqName, ',')) {
-				otuVector[index++] = seqName;
-			}
+            vector<string> otuVector;
+			m->splitAtComma(seqList, otuVector);
 
 			// indicate that a pair of sequences are in the same OTU; will
 			// assume that if they don't show up in the map that they're in
@@ -421,7 +408,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 						seqNamePair = otuVector[j] + '-' + otuVector[i];
 					}
 
-					map<string, double>::iterator it = distanceMap.find(seqNamePair);
+					set<string>::iterator it = distanceMap.find(seqNamePair);
 
 					if(it != distanceMap.end()){
 						truePositives++;
@@ -433,6 +420,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool&
 			}
 		}
         
+        //cout << *(distanceMap.begin()) << endl;
 		falseNegatives = distanceMap.size();
 		trueNegatives = numSeqs * (numSeqs-1)/2 - (falsePositives + falseNegatives + truePositives);
 
@@ -457,8 +445,6 @@ int SensSpecCommand::processListFile(){
 		if(cutoff == -1.00)	{	getCutoff = 1;                                          }
 		else 				{	origCutoff = toString(m->ceilDist(cutoff, precision));	}
 
-		map<string, int> seqMap;
-
 		InputData input(listFile, "list");
 		ListVector* list = input.getListVector();
 		string lastLabel = list->getLabel();
@@ -477,7 +463,7 @@ int SensSpecCommand::processListFile(){
 
 				//process
 				// int numSeqs = fillSeqMap(seqMap, list);
-				process(seqMap, list, getCutoff, origCutoff);
+				process(list, getCutoff, origCutoff);
 			}
 
 			if ((m->anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -492,7 +478,7 @@ int SensSpecCommand::processListFile(){
 
 				//process
 				//int numSeqs = fillSeqMap(seqMap, list);
-				process(seqMap, list, getCutoff, origCutoff);
+				process(list, getCutoff, origCutoff);
 
 				//restore real lastlabel to save below
 				list->setLabel(saveLabel);
@@ -523,7 +509,7 @@ int SensSpecCommand::processListFile(){
 
 			//process
 			//int numSeqs = fillSeqMap(seqMap, list);
-			process(seqMap, list, getCutoff, origCutoff);
+			process(list, getCutoff, origCutoff);
 
 			delete list;
 		}
diff --git a/source/commands/sensspeccommand.h b/source/commands/sensspeccommand.h
index f79290c..e5873c1 100644
--- a/source/commands/sensspeccommand.h
+++ b/source/commands/sensspeccommand.h
@@ -52,7 +52,7 @@ private:
 	double cutoff;
 	int precision;
 
-	int process(map<string, int>&, ListVector*&, bool&, string&);
+	int process(ListVector*&, bool&, string&);
 };
 
 #endif
diff --git a/source/commands/seqsummarycommand.cpp b/source/commands/seqsummarycommand.cpp
index 669d764..1705a7d 100644
--- a/source/commands/seqsummarycommand.cpp
+++ b/source/commands/seqsummarycommand.cpp
@@ -197,18 +197,20 @@ int SeqSummaryCommand::execute(){
 				
 		long long numSeqs = 0;
         long long size = 0;
+        long long numUniques = 0;
 		map<int, long long> startPosition;
 		map<int, long long> endPosition;
 		map<int, long long> seqLength;
 		map<int, long long> ambigBases;
 		map<int, long long> longHomoPolymer;
 		
-		if (namefile != "") { nameMap = m->readNames(namefile); }
+        if (namefile != "") { nameMap = m->readNames(namefile); numUniques = nameMap.size(); }
         else if (countfile != "") {
             CountTable ct;
             ct.readTable(countfile, false, false);
             nameMap = ct.getNameMap();
             size = ct.getNumSeqs();
+            numUniques = ct.getNumUniqueSeqs();
         }
 		
 		if (m->control_pressed) { return 0; }
@@ -244,9 +246,19 @@ int SeqSummaryCommand::execute(){
         
         //set size
         if (countfile != "") {}//already set
-        else if (namefile == "") { size = numSeqs;  }
+        else if (namefile == "") { size = numSeqs; }
         else { for (map<int, long long>::iterator it = startPosition.begin(); it != startPosition.end(); it++) { size += it->second; } }
         
+        if ((namefile != "") || (countfile != "")) {
+            string type = "count";
+            if (namefile != "") { type = "name"; }
+            if (numSeqs != numUniques) { // do fasta and name/count files match
+                m->mothurOut("[ERROR]: Your " + type + " file contains " + toString(numUniques) + " unique sequences, but your fasta file contains " + toString(numSeqs) + ". File mismatch detected, quitting command.\n"); m->control_pressed = true;
+            }
+        }
+        
+        if (m->control_pressed) {  m->mothurRemove(summaryFile); return 0; }
+        
         long long ptile0_25	= 1+(long long)(size * 0.025); //number of sequences at 2.5%
         long long ptile25		= 1+(long long)(size * 0.250); //number of sequences at 25%
         long long ptile50		= 1+(long long)(size * 0.500);
diff --git a/source/commands/setcurrentcommand.cpp b/source/commands/setcurrentcommand.cpp
index 06f7c1c..1d049a5 100644
--- a/source/commands/setcurrentcommand.cpp
+++ b/source/commands/setcurrentcommand.cpp
@@ -26,6 +26,7 @@ vector<string> SetCurrentCommand::setParameters(){
 		CommandParameter plist("list", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(plist);
 		CommandParameter ptaxonomy("taxonomy", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(ptaxonomy);
         CommandParameter pconstaxonomy("constaxonomy", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(pconstaxonomy);
+        CommandParameter pcontigsreport("contigsreport", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(pcontigsreport);
 		CommandParameter pqfile("qfile", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(pqfile);
 		CommandParameter paccnos("accnos", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(paccnos);		
 		CommandParameter prabund("rabund", "InputTypes", "", "", "none", "none", "none","",false,false); parameters.push_back(prabund);
@@ -59,9 +60,9 @@ string SetCurrentCommand::getHelpString(){
 	try {
 		string helpString = "";
 		helpString += "The set.current command allows you to set the current files saved by mothur.\n";
-		helpString += "The set.current command parameters are: current, clear, phylip, column, list, rabund, sabund, name, group, design, order, tree, shared, ordergroup, relabund, fasta, qfile, sff, oligos, accnos, biom, count, summary, file, constaxonomy and taxonomy.\n";
+		helpString += "The set.current command parameters are: current, clear, phylip, column, list, rabund, sabund, name, group, design, order, tree, shared, ordergroup, relabund, fasta, qfile, sff, oligos, accnos, biom, count, summary, file, contigsreport, constaxonomy and taxonomy.\n";
         helpString += "The current parameter is used to input the output file from get.current.  This function is intended to allow you to input filenames from previous instances on mothur.  NOTE: If you have a current file set in the file *.current_files.summary file, and also set a value for that file type, the value set takes precedence.  For example, if you run set.current(current=current_files.summary, fasta=abrecovery.fasta) and your have fasta=final.fasta in the *.current_files.su [...]
-		helpString += "The clear paramter is used to indicate which file types you would like to clear values for, multiple types can be separated by dashes.\n";
+		helpString += "The clear parameter is used to indicate which file types you would like to clear values for, multiple types can be separated by dashes.\n";
 		helpString += "The set.current command should be in the following format: \n";
 		helpString += "set.current(fasta=yourFastaFile) or set.current(fasta=amazon.fasta, clear=name-accnos)\n";
 		return helpString;
@@ -307,6 +308,14 @@ SetCurrentCommand::SetCurrentCommand(string option)  {
                     //if the user has not given a path then, add inputdir. else leave path alone.
                     if (path == "") {	parameters["constaxonomy"] = inputDir + it->second;		}
                 }
+                
+                it = parameters.find("contigsreport");
+                //user has given a template file
+                if(it != parameters.end()){
+                    path = m->hasPath(it->second);
+                    //if the user has not given a path then, add inputdir. else leave path alone.
+                    if (path == "") {	parameters["contigsreport"] = inputDir + it->second;		}
+                }
 				
 				it = parameters.find("flow");
 				//user has given a template file
@@ -458,6 +467,11 @@ SetCurrentCommand::SetCurrentCommand(string option)  {
 			else if (taxonomyfile == "not found") {  taxonomyfile = "";  }	
 			if (taxonomyfile != "") { m->setTaxonomyFile(taxonomyfile); }
             
+            contigsreportfile = validParameter.validFile(parameters, "contigsreport", true);
+            if (contigsreportfile == "not open") { m->mothurOut("Ignoring: " + parameters["contigsreport"]); m->mothurOutEndLine(); contigsreportfile = ""; }
+            else if (contigsreportfile == "not found") {  contigsreportfile = "";  }
+            if (contigsreportfile != "") { m->setContigsReportFile(contigsreportfile); }
+            
             constaxonomyfile = validParameter.validFile(parameters, "constaxonomy", true);
             if (constaxonomyfile == "not open") { m->mothurOut("Ignoring: " + parameters["constaxonomy"]); m->mothurOutEndLine(); constaxonomyfile = ""; }
             else if (constaxonomyfile == "not found") {  constaxonomyfile = "";  }
@@ -552,6 +566,8 @@ int SetCurrentCommand::execute(){
 					m->setTaxonomyFile("");
                 }else if (types[i] == "constaxonomy") {
                     m->setConsTaxonomyFile("");
+                }else if (types[i] == "contigsreport") {
+                    m->setContigsReportFile("");
 				}else if (types[i] == "flow") {
 					m->setFlowFile("");
                 }else if (types[i] == "biom") {
diff --git a/source/commands/setcurrentcommand.h b/source/commands/setcurrentcommand.h
index 6465dca..94ae535 100644
--- a/source/commands/setcurrentcommand.h
+++ b/source/commands/setcurrentcommand.h
@@ -41,7 +41,7 @@ private:
 	vector<string> types;
 	
 	string accnosfile, phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, designfile, taxonomyfile, biomfile, countfile, summaryfile, currentFile, outputDir;
-	string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile, processors, flowfile, filefile, constaxonomyfile;
+	string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile, processors, flowfile, filefile, constaxonomyfile, contigsreportfile;
 
     int readCurrentFiles();
 	
diff --git a/source/commands/sffinfocommand.cpp b/source/commands/sffinfocommand.cpp
index a3f7e40..44f9ee9 100644
--- a/source/commands/sffinfocommand.cpp
+++ b/source/commands/sffinfocommand.cpp
@@ -48,7 +48,7 @@ vector<string> SffInfoCommand::setParameters(){
 string SffInfoCommand::getHelpString(){	
 	try {
 		string helpString = "";
-		helpString += "The sffinfo command reads a sff file and extracts the sequence data, or you can use it to parse a sfftxt file.\n";
+		helpString += "The sffinfo command reads a sff file and extracts the sequence data, or you can use it to parse a sff file.\n";
 		helpString += "The sffinfo command parameters are sff, fasta, qfile, accnos, flow, sfftxt, oligos, group, bdiffs, tdiffs, ldiffs, sdiffs, pdiffs, checkorient and trim. sff is required. \n";
 		helpString += "The sff parameter allows you to enter the sff file you would like to extract data from.  You may enter multiple files by separating them by -'s.\n";
 		helpString += "The fasta parameter allows you to indicate if you would like a fasta formatted file generated.  Default=True. \n";
diff --git a/source/commands/sracommand.cpp b/source/commands/sracommand.cpp
index 65b5a2a..2b0aecd 100644
--- a/source/commands/sracommand.cpp
+++ b/source/commands/sracommand.cpp
@@ -54,7 +54,7 @@ string SRACommand::getHelpString(){
 	try {
 		string helpString = "";
 		helpString += "The make.sra command creates the necessary files for a NCBI submission. The xml file and individual sff or fastq files parsed from the original sff or fastq file.\n";
-		helpString += "The make.sra command parameters are: sff, fastq, file, oligos, project, mimarksfile, pdiffs, bdiffs, ldiffs, sdiffs, tdiffs, checkorient, platform, orientation, libstrategy, datatype, libsource, libselection, instrument and includescrap.\n";
+		helpString += "The make.sra command parameters are: sff, fastq, file, oligos, project, mimarksfile, pdiffs, bdiffs, ldiffs, sdiffs, tdiffs, checkorient, platform, orientation, libstrategy, datatype, libsource, libselection, instrument, includescrap and trim.\n";
         helpString += "The sff parameter is used to provide the original sff file.\n";
 		helpString += "The fastq parameter is used to provide the original fastq file.\n";
         helpString += "The project parameter is used to provide your project file.\n";
@@ -76,6 +76,7 @@ string SRACommand::getHelpString(){
         helpString += "The libsource parameter is used to specify library source. Default=METAGENOMIC. Choices are METAGENOMIC,GENOMIC,TRANSCRIPTOMIC,METATRANSCRIPTOMIC,SYNTHETIC,VIRAL_RNA,OTHER. This is a controlled vocabulary section in the XML file that will be generated. \n";
         helpString += "The libselection parameter is used to specify library selection. Default=PCR. Choices are PCR,RANDOM,RANDOM_PCR,RT-PCR,HMPR,MF,CF-S,CF-H,CF-T,CF-M,MDA,MSLL,cDNA,ChIP,MNase,DNAse,Hybrid_Selection,Reduced_Representation,Restriction_Digest,5-methylcytidine_antibody,MBD2_protein_methyl-CpG_binding_domain,CAGE,RACE,size_fractionation,Padlock_probes_capture_method,other,unspecified. This is a controlled vocabulary section in the XML file that will be generated. \n";
         helpString += "The datatype parameter is used to specify datatype. Default=METAGENOME. Choices are METAGENOME,GENOME_SEQUENCING,METAGENOMIC_ASSEMBLY,ASSEMBLY,TRANSCRIPTOME,PROTEOMIC,MAP,CLONE_ENDS,TARGETED_LOCI,RANDOM_SURVEY,EXOME,VARIATION,EPIGENOMICS,PHENOTYPE,GENOTYPE,OTHER. This is a controlled vocabulary section in the XML file that will be generated. \n";
+        helpString += "The trim parameter allows you to indicate if you would like a sequences and quality scores trimmed to the clipQualLeft and clipQualRight values.  Default=True. \n";
 		helpString += "make.sra(sff=sff=GHL4YHV01.sff, GHL4YHV01.oligos, project=test.project, mimark=MIMarksData.txt)\n";
 		return helpString;
 	}
diff --git a/source/datastructures/optimatrix.cpp b/source/datastructures/optimatrix.cpp
index 8372b41..9670f5e 100644
--- a/source/datastructures/optimatrix.cpp
+++ b/source/datastructures/optimatrix.cpp
@@ -135,16 +135,19 @@ string OptiMatrix::findDistFormat(string distFile){
 
 int OptiMatrix::readPhylip(){
     try {
+        nameMap.clear();
         float distance;
         int square, nseqs;
         string name;
-
+        map<int, int> singletonIndexSwap;
+        
         ifstream fileHandle;
         string numTest;
         
         m->openInputFile(distFile, fileHandle);
         fileHandle >> numTest >> name;
         nameMap.push_back(name);
+        singletonIndexSwap[0] = 0;
         
         if (!m->isContainingOnlyDigits(numTest)) { m->mothurOut("[ERROR]: expected a number and got " + numTest + ", quitting."); m->mothurOutEndLine(); exit(1); }
         else { convert(numTest, nseqs); }
@@ -156,7 +159,6 @@ int OptiMatrix::readPhylip(){
             if(d == '\n'){ square = 0; break; }
         }
         
-        map<int, int> singletonIndexSwap;
         vector<bool> singleton; singleton.resize(nseqs, true);
         ///////////////////// Read to eliminate singletons ///////////////////////
         if(square == 0){
@@ -164,7 +166,7 @@ int OptiMatrix::readPhylip(){
             for(int i=1;i<nseqs;i++){
                 if (m->control_pressed) {  fileHandle.close();  return 0; }
                 
-                fileHandle >> name; nameMap.push_back(name);
+                fileHandle >> name; nameMap.push_back(name); singletonIndexSwap[i] = i;
                 
                 for(int j=0;j<i;j++){
                     
@@ -175,9 +177,6 @@ int OptiMatrix::readPhylip(){
                     if(distance < cutoff){
                         singleton[i] = false;
                         singleton[j] = false;
-                        singletonIndexSwap[i] = i;
-                        singletonIndexSwap[j] = j;
-                        
                     }
                 }
             }
@@ -185,7 +184,7 @@ int OptiMatrix::readPhylip(){
             for(int i=1;i<nseqs;i++){
                 if (m->control_pressed) {  fileHandle.close();   return 0; }
                 
-                fileHandle >> name; nameMap.push_back(name);
+                fileHandle >> name; nameMap.push_back(name); singletonIndexSwap[i] = i;
                 
                 for(int j=0;j<nseqs;j++){
                     fileHandle >> distance;
@@ -195,15 +194,13 @@ int OptiMatrix::readPhylip(){
                     if(distance < cutoff && j < i){
                         singleton[i] = false;
                         singleton[j] = false;
-                        singletonIndexSwap[i] = i;
-                        singletonIndexSwap[j] = j;
                     }
                 }
             }
         }
         fileHandle.close();
         //////////////////////////////////////////////////////////////////////////
-        
+       
         int nonSingletonCount = 0;
         for (int i = 0; i < singleton.size(); i++) {
             if (!singleton[i]) { //if you are not a singleton
@@ -216,7 +213,12 @@ int OptiMatrix::readPhylip(){
         closeness.resize(nonSingletonCount);
         
         map<string, string> names;
-        if (namefile != "") {  m->readNames(namefile, names); }
+        if (namefile != "") {
+            m->readNames(namefile, names);
+            for (int i = 0; i < singletons.size(); i++) {
+                singletons[i] = names[singletons[i]];
+            }
+        }
         
         Progress* reading;
         ifstream in;
@@ -224,11 +226,8 @@ int OptiMatrix::readPhylip(){
         m->openInputFile(distFile, in);
         in >> nseqs >> name;
         
-        int newA = singletonIndexSwap[0];
-        if (namefile != "") {
-            name = names[name];  //redundant names
-        }
-        nameMap[newA] = name;
+        if (namefile != "") { name = names[name]; } //redundant names
+        nameMap[singletonIndexSwap[0]] = name;
 
         int fivepercent = (int)(0.05 * nseqs);
         
@@ -242,11 +241,14 @@ int OptiMatrix::readPhylip(){
                 
                 if (m->control_pressed) {  in.close();  delete reading; return 0; }
                 
-                in >> name;
+                in >> name; m->gobble(in);
+                
+                if (namefile != "") { name = names[name]; } //redundant names
+                nameMap[singletonIndexSwap[i]] = name;
                 
                 for(int j=0;j<i;j++){
                     
-                    in >> distance;
+                    in >> distance; m->gobble(in);
                     
                     if (distance == -1) { distance = 1000000; } else if (sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
                     
@@ -255,11 +257,6 @@ int OptiMatrix::readPhylip(){
                         int newA = singletonIndexSwap[i];
                         closeness[newA].insert(newB);
                         closeness[newB].insert(newA);
-                        
-                        if (namefile != "") {
-                            name = names[name];  //redundant names
-                        }
-                        nameMap[newA] = name;
                     }
                     index++; reading->update(index);
                 }
@@ -280,10 +277,13 @@ int OptiMatrix::readPhylip(){
             for(int i=1;i<nseqs;i++){
                 if (m->control_pressed) {  in.close();  delete reading; return 0; }
                 
-                in >> name;
+                in >> name; m->gobble(in);
+                
+                if (namefile != "") { name = names[name]; } //redundant names
+                nameMap[singletonIndexSwap[i]] = name;
                 
                 for(int j=0;j<nseqs;j++){
-                    in >> distance;
+                    in >> distance; m->gobble(in);
 
                     if (distance == -1) { distance = 1000000; } else if (sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
                     
@@ -292,11 +292,6 @@ int OptiMatrix::readPhylip(){
                         int newA = singletonIndexSwap[i];
                         closeness[newA].insert(newB);
                         closeness[newB].insert(newA);
-                        
-                        if (namefile != "") {
-                            name = names[name];  //redundant names
-                        }
-                        nameMap[newA] = name;
                     }
                     index++; reading->update(index);
                 }
@@ -392,7 +387,12 @@ int OptiMatrix::readColumn(){
         closeness.resize(nonSingletonCount);
         
         map<string, string> names;
-        if (namefile != "") {  m->readNames(namefile, names); }
+        if (namefile != "") {
+            m->readNames(namefile, names);
+            for (int i = 0; i < singletons.size(); i++) {
+                singletons[i] = names[singletons[i]];
+            }
+        }
         
         while(in){  //let's assume it's a triangular matrix...
             
diff --git a/source/engine.cpp b/source/engine.cpp
index 2cd43a5..8a30b26 100644
--- a/source/engine.cpp
+++ b/source/engine.cpp
@@ -45,8 +45,7 @@ InteractEngine::InteractEngine(string path){
     #ifdef MOTHUR_FILES
     #else
         //set default location to search for files to mothur's executable location.  This will resolve issue of double-clicking on the executable which opens mothur and sets pwd to your home directory instead of the mothur directory and leads to "unable to find file" errors.
-        string tempDefault = path.substr(0, (path.find_last_of('m')));
-        if (tempDefault != "") { mout->setDefaultPath(tempDefault); }
+        if (mout->mothurProgramPath != "") { mout->setDefaultPath(mout->mothurProgramPath); }
     #endif
 }
 
@@ -184,8 +183,7 @@ BatchEngine::BatchEngine(string path, string batchFileName){
 #ifdef MOTHUR_FILES
 #else
         //set default location to search for files to mothur's executable location.  This will resolve issue of double-clicking on the executable which opens mothur and sets pwd to your home directory instead of the mothur directory and leads to "unable to find file" errors.
-        string tempDefault = path.substr(0, (path.find_last_of('m')));
-        if (tempDefault != "") { mout->setDefaultPath(tempDefault); }
+        if (mout->mothurProgramPath != "") { mout->setDefaultPath(mout->mothurProgramPath); }
 #endif
 
 				
@@ -321,8 +319,8 @@ ScriptEngine::ScriptEngine(string path, string commandString){
 #ifdef MOTHUR_FILES
 #else
         //set default location to search for files to mothur's executable location.  This will resolve issue of double-clicking on the executable which opens mothur and sets pwd to your home directory instead of the mothur directory and leads to "unable to find file" errors.
-        string tempDefault = path.substr(0, (path.find_last_of('m')));
-        if (tempDefault != "") { mout->setDefaultPath(tempDefault); }
+        //string tempDefault = path.substr(0, (path.find_last_of('m')));
+        if (path != "") { mout->setDefaultPath(path); }
 #endif
 
 				
diff --git a/source/mothurout.cpp b/source/mothurout.cpp
index 0c3adc0..d26064a 100644
--- a/source/mothurout.cpp
+++ b/source/mothurout.cpp
@@ -45,6 +45,7 @@ set<string> MothurOut::getCurrentTypes()  {
         types.insert("shared");
         types.insert("taxonomy");
         types.insert("constaxonomy");
+        types.insert("contigsreport");
         types.insert("tree");
         types.insert("flow");
         types.insert("biom");
@@ -85,6 +86,7 @@ void MothurOut::printCurrentFiles(string filename)  {
             if (sharedfile != "")		{  mothurOut("shared=" + sharedfile, out); mothurOutEndLine(out);			}
             if (taxonomyfile != "")		{  mothurOut("taxonomy=" + taxonomyfile, out); mothurOutEndLine(out);		}
             if (constaxonomyfile != "")	{  mothurOut("constaxonomy=" + constaxonomyfile, out); mothurOutEndLine(out);}
+            if (contigsreportfile != ""){  mothurOut("contigsreport=" + contigsreportfile, out); mothurOutEndLine(out);}
             if (treefile != "")			{  mothurOut("tree=" + treefile, out); mothurOutEndLine(out);				}
             if (flowfile != "")			{  mothurOut("flow=" + flowfile, out); mothurOutEndLine(out);				}
             if (biomfile != "")			{  mothurOut("biom=" + biomfile, out); mothurOutEndLine(out);				}
@@ -115,6 +117,7 @@ void MothurOut::printCurrentFiles(string filename)  {
             if (sharedfile != "")		{  mothurOut("shared=" + sharedfile); mothurOutEndLine();			}
             if (taxonomyfile != "")		{  mothurOut("taxonomy=" + taxonomyfile); mothurOutEndLine();		}
             if (constaxonomyfile != "")	{  mothurOut("constaxonomy=" + constaxonomyfile); mothurOutEndLine();}
+            if (contigsreportfile != ""){  mothurOut("contigsreport=" + contigsreportfile); mothurOutEndLine();}
             if (treefile != "")			{  mothurOut("tree=" + treefile); mothurOutEndLine();				}
             if (flowfile != "")			{  mothurOut("flow=" + flowfile); mothurOutEndLine();				}
             if (biomfile != "")			{  mothurOut("biom=" + biomfile); mothurOutEndLine();				}
@@ -154,6 +157,7 @@ bool MothurOut::hasCurrentFiles()  {
 		if (sharedfile != "")		{  return true;			}
 		if (taxonomyfile != "")		{  return true;			}
         if (constaxonomyfile != "")	{  return true;			}
+        if (contigsreportfile != ""){  return true;			}
 		if (treefile != "")			{  return true;			}
 		if (flowfile != "")			{  return true;			}
         if (biomfile != "")			{  return true;			}
@@ -187,6 +191,8 @@ void MothurOut::clearCurrentFiles()  {
 		treefile = "";
 		sharedfile = "";
 		ordergroupfile = "";
+        contigsreportfile = "";
+        constaxonomyfile = "";
 		relabundfile = "";
 		fastafile = "";
 		qualfile = "";
@@ -205,24 +211,48 @@ void MothurOut::clearCurrentFiles()  {
 		exit(1);
 	}
 }
-/***********************************************************************/
+
+/*********************************************************************************************/
+bool MothurOut::fileExists(string name)  {
+    try {
+        bool exists = false;
+        name = getFullPathName(name);
+        
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
+
+        ifstream in;
+        openInputFile(name, in, "");
+        
+        //if this file exists
+        if (in) { in.close(); exists = true;  }
+
+#else
+        DWORD attributes = GetFileAttributes(name.c_str());
+        exists = (attributes != INVALID_FILE_ATTRIBUTES && !(attributes & FILE_ATTRIBUTE_DIRECTORY));
+#endif
+        
+        return exists;
+    }
+    catch(exception& e) {
+        errorOut(e, "MothurOut", "clearCurrentFiles");
+        exit(1);
+    }
+}
+/********************************************************************/
 string MothurOut::findProgramPath(string programName){
 	try {
         string pPath = "";
         
         //look in ./
         //is this the programs path?
-        ifstream in5;
         string tempIn = ".";
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
         tempIn += "/" + programName;
 #else
         tempIn += "\\" + programName;
 #endif
-        openInputFile(tempIn, in5, "");
-        
         //if this file exists
-        if (in5) { in5.close(); pPath = getFullPathName(tempIn); if (debug) { mothurOut("[DEBUG]: found it, programPath = " + pPath + "\n"); } return pPath;   }
+        if (fileExists(tempIn)) { pPath = getFullPathName(tempIn); if (debug) { mothurOut("[DEBUG]: found it, programPath = " + pPath + "\n"); } return pPath;   }
 		
 		string envPath = getenv("PATH");
 		
@@ -272,17 +302,15 @@ string MothurOut::findProgramPath(string programName){
                 if (debug) { mothurOut("[DEBUG]: looking in " + dirs[i] + " for " + programName + " \n"); }
                 
 				//is this the programs path?
-				ifstream in;
 				string tempIn = dirs[i];
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                 tempIn += "/" + programName;
 #else
                 tempIn += "\\" + programName;
 #endif
-				openInputFile(tempIn, in, "");
 				
 				//if this file exists
-				if (in) { in.close(); pPath = tempIn; if (debug) { mothurOut("[DEBUG]: found it, programPath = " + pPath + "\n"); } break;   }
+				if (fileExists(tempIn)) { pPath = tempIn; if (debug) { mothurOut("[DEBUG]: found it, programPath = " + pPath + "\n"); } break;   }
 			}
 		}
 		
@@ -309,14 +337,16 @@ void MothurOut::setFileName(string filename)  {
 void MothurOut::setDefaultPath(string pathname)  {
 	try {
 	
-		//add / to name if needed
-		string lastChar = pathname.substr(pathname.length()-1);
-		#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
-			if (lastChar != "/") { pathname += "/"; }
-		#else
-			if (lastChar != "\\") { pathname += "\\"; }	
-		#endif
-		
+        if (pathname != "") {
+            //add / to name if needed
+            string lastChar = pathname.substr(pathname.length()-1);
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
+            if (lastChar != "/") { pathname += "/"; }
+#else
+            if (lastChar != "\\") { pathname += "\\"; }
+#endif
+        }
+        
 		defaultPath = getFullPathName(pathname);
 		
 	}
@@ -329,14 +359,15 @@ void MothurOut::setDefaultPath(string pathname)  {
 void MothurOut::setBlastPath(string pathname)  {
     try {
         
-        //add / to name if needed
-        string lastChar = pathname.substr(pathname.length()-1);
+        if (pathname != "") {
+            //add / to name if needed
+            string lastChar = pathname.substr(pathname.length()-1);
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
-        if (lastChar != "/") { pathname += "/"; }
+            if (lastChar != "/") { pathname += "/"; }
 #else
-        if (lastChar != "\\") { pathname += "\\"; }
+            if (lastChar != "\\") { pathname += "\\"; }
 #endif
-        
+        }
         blastPath = getFullPathName(pathname);
         
     }
@@ -1092,7 +1123,7 @@ string MothurOut::getFullPathName(string fileName){
 
 				
 				//rip off first '/'
-				string simpleCWD;
+				string simpleCWD; simpleCWD="";
 				if (cwd.length() > 0) { simpleCWD = cwd.substr(1); }
 				
 				//break apart the current working directory
@@ -3588,7 +3619,21 @@ bool MothurOut::isAllAlphas(string stringToCheck){
     }
     
 }
-
+/***********************************************************************/
+bool MothurOut::isAllAlphaNumerics(string stringToCheck){
+    try {
+        bool allAlphaNumerics = true;
+        
+        if(stringToCheck.find_first_not_of("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOopPQqRrSsTtUuVvWwXxYyZz0123456789") != string::npos) { allAlphaNumerics = false; }
+        
+        return allAlphaNumerics;
+    }
+    catch(exception& e) {
+        errorOut(e, "MothurOut", "isAllAlphas");
+        exit(1);
+    }
+    
+}
 /***********************************************************************/
 bool MothurOut::mothurConvert(string item, float& num){
 	try {
diff --git a/source/mothurout.h b/source/mothurout.h
index 667292c..2315810 100644
--- a/source/mothurout.h
+++ b/source/mothurout.h
@@ -116,7 +116,7 @@ class MothurOut {
 		int openInputFile(string, ifstream&, string); //no error given
         vector<bool> allGZFiles(vector<string>&);
         vector<bool> isGZ(string); //checks existence and format - will fail for either or both.
-    
+        bool fileExists(string name);
         bool checkLocations(string&, string);  //filename, inputDir. checks for file in ./, inputdir, default and mothur's exe location.  Returns false if cant be found. If found completes name with location
 		string getline(ifstream&);
 		string getline(istringstream&);
@@ -167,6 +167,7 @@ class MothurOut {
 		bool isContainingOnlyDigits(string);
         bool containsAlphas(string);
         bool isAllAlphas(string);
+        bool isAllAlphaNumerics(string);
 		bool isNumeric1(string);
         bool isNumeric1(char);
         bool isInteger(string);
@@ -232,7 +233,7 @@ class MothurOut {
 		int control_pressed;
 		bool executing, runParse, jumble, gui, mothurCalling, debug, quietMode;
 		
-		//current files - if you add a new type you must edit optionParser->getParameters, get.current and set.current commands and mothurOut->printCurrentFiles/clearCurrentFiles/getCurrentTypes. add a get and set function.
+		//current files - if you add a new type you must edit optionParser->getParameters, get.current and set.current commands and mothurOut->printCurrentFiles/clearCurrentFiles/getCurrentTypes/hasCurrentFiles. add a get and set function.
 		string getPhylipFile()		{ return phylipfile;		}
 		string getColumnFile()		{ return columnfile;		}
 		string getListFile()		{ return listfile;			}
@@ -259,6 +260,7 @@ class MothurOut {
         string getFileFile()        { return filefile;          }
 		string getProcessors()		{ return processors;		}
         string getConsTaxonomyFile(){ return constaxonomyfile;  }
+        string getContigsReportFile(){ return contigsreportfile;  }
         int getNumErrors()          { return numErrors;         }
 		
 		void setListFile(string f)			{ listfile = getFullPathName(f);			}
@@ -285,6 +287,7 @@ class MothurOut {
         void setSummaryFile(string f)		{ summaryfile = getFullPathName(f);			}
         void setFileFile(string f)          { filefile = getFullPathName(f);			}
         void setConsTaxonomyFile(string f)  { constaxonomyfile = getFullPathName(f);	}
+        void setContigsReportFile(string f) { contigsreportfile = getFullPathName(f);	}
         void setCountTableFile(string f)	{ counttablefile = getFullPathName(f);	groupMode = "count";	}
         void setProcessors(string p)		{ processors = p; mothurOut("\nUsing " + toString(p) + " processors.\n");	}
 		
@@ -325,6 +328,7 @@ class MothurOut {
             biomfile = "";
             counttablefile = "";
             summaryfile = "";
+            contigsreportfile = "";
 			gui = false;
 			printedSharedHeaders = false;
             printedListHeaders = false;
@@ -346,7 +350,7 @@ class MothurOut {
 		string releaseDate, version;
 	
 		string accnosfile, phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, designfile, taxonomyfile, biomfile, filefile;
-		string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile, processors, flowfile, counttablefile, summaryfile, constaxonomyfile;
+		string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile, processors, flowfile, counttablefile, summaryfile, constaxonomyfile, contigsreportfile;
 
 		vector<string> Groups;
 		vector<string> namesOfGroups;
diff --git a/source/optionparser.cpp b/source/optionparser.cpp
index 38ffbdf..2a85b5d 100644
--- a/source/optionparser.cpp
+++ b/source/optionparser.cpp
@@ -150,6 +150,8 @@ map<string, string> OptionParser::getParameters() {
                         it->second = m->getTaxonomyFile();
                     }else if (it->first == "constaxonomy") {
                         it->second = m->getConsTaxonomyFile();
+                    }else if (it->first == "contigsreport") {
+                            it->second = m->getContigsReportFile();
                     }else if (it->first == "biom") {
                         it->second = m->getBiomFile();
                     }else if (it->first == "count") {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/mothur.git



More information about the debian-med-commit mailing list