Permalink
Browse files

Fixes bug with phylotree levels

  • Loading branch information...
1 parent 4817cec commit 58430e459033996baf922fad12882fcf0e97062f @mothur-westcott mothur-westcott committed Feb 16, 2017
Showing with 12 additions and 9 deletions.
  1. +1 −1 Makefile
  2. +7 −7 makefile-internal
  3. +4 −1 source/classifier/phylotree.cpp
View
@@ -27,7 +27,7 @@ ifeq ($(strip $(OPTIMIZE)),yes)
CXXFLAGS += -O3
endif
-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
View
@@ -1,7 +1,7 @@
64BIT_VERSION ?= yes
-USEREADLINE ?= yes
-USEBOOST ?= yes
-RELEASE_DATE = "\"2/2/2017\""
+USEREADLINE ?= no
+USEBOOST ?= no
+RELEASE_DATE = "\"2/7/2017\""
VERSION = "\"1.39.1\""
# Optimize to level 3:
@@ -10,12 +10,12 @@ VERSION = "\"1.39.1\""
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
@@ -18,6 +18,7 @@ PhyloTree::PhyloTree(){
numSeqs = 0;
tree.push_back(TaxNode("Root"));
tree[0].heirarchyID = "0";
+ tree[0].level = 0;
maxLevel = 0;
calcTotals = true;
addSeqToTree("unknown", "unknown;");
@@ -78,6 +79,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;
@@ -219,6 +221,7 @@ int PhyloTree::addSeqToTree(string seqName, string seqTaxonomy){
tree.push_back(TaxNode(taxon));
numNodes++;
tree[currentNode].children[taxon] = numNodes-1;
+ tree[currentNode].level = level;
tree[numNodes-1].parent = currentNode;
currentNode = tree[currentNode].children[taxon];
@@ -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; }

0 comments on commit 58430e4

Please sign in to comment.