From 896a4f281982a3c2889f6ce6d73be997072aceae Mon Sep 17 00:00:00 2001 From: westcott Date: Mon, 9 Jan 2012 16:38:48 +0000 Subject: [PATCH] 1.23.0 --- makefile | 10 ++++----- seqnoise.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index c7dc1fd..e2e66c1 100644 --- a/makefile +++ b/makefile @@ -15,8 +15,8 @@ USEREADLINE ?= yes CYGWIN_BUILD ?= no USECOMPRESSION ?= no MOTHUR_FILES="\"Enter_your_default_path_here\"" -RELEASE_DATE = "\"12/7/2011\"" -VERSION = "\"1.22.0\"" +RELEASE_DATE = "\"1/9/2012\"" +VERSION = "\"1.23.0\"" FORTAN_COMPILER = gfortran # Optimize to level 3: @@ -24,10 +24,10 @@ CXXFLAGS += -O3 ifeq ($(strip $(64BIT_VERSION)),yes) #if you are using centos uncomment the following lines - CXX = g++44 + #CXX = g++44 #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++ @@ -35,7 +35,7 @@ ifeq ($(strip $(64BIT_VERSION)),yes) #TARGET_ARCH += -m64 -static #if you are a linux user use the following line - CXXFLAGS += -mtune=native -march=native -m64 + #CXXFLAGS += -mtune=native -march=native -m64 CXXFLAGS += -DBIT_VERSION endif diff --git a/seqnoise.cpp b/seqnoise.cpp index 578daaf..9ee8010 100644 --- a/seqnoise.cpp +++ b/seqnoise.cpp @@ -140,6 +140,8 @@ int seqNoise::getListData(string listFileName, double cutOff, vector& otuDa m->openInputFile(listFileName, listFile); double threshold; int numOTUs; + string line = ""; + bool adjustCutoff = true; if(listFile.peek() == 'u'){ m->getline(listFile); } @@ -147,9 +149,10 @@ int seqNoise::getListData(string listFileName, double cutOff, vector& otuDa listFile >> threshold; if(threshold < cutOff){ - m->getline(listFile); + line = m->getline(listFile); m->gobble(listFile); } else{ + adjustCutoff = false; listFile >> numOTUs; otuFreq.resize(numOTUs, 0); @@ -201,6 +204,63 @@ int seqNoise::getListData(string listFileName, double cutOff, vector& otuDa break; } } + + listFile.close(); + + //the listfile does not contain a threshold greater than the cutoff so use highest value + if (adjustCutoff) { + istringstream iss (line,istringstream::in); + + iss >> numOTUs; + otuFreq.resize(numOTUs, 0); + + for(int i=0;icontrol_pressed) { return 0; } + + string otu; + iss >> otu; + + int count = 0; + + string number = ""; + + for(int j=0;jcontrol_pressed) { return 0; } + otuBySeqLookUp[otuData[i]].push_back(i); + } + for(int i=0;icontrol_pressed) { return 0; } + for(int j=otuBySeqLookUp[i].size();j