From 5890a0d1e8f3a549652abc18a2f34d65b3ce7075 Mon Sep 17 00:00:00 2001 From: pschloss Date: Tue, 15 Feb 2011 11:41:28 +0000 Subject: [PATCH] mods to shhh.seqs command --- shhhercommand.cpp | 21 ++++++++++++++++----- shhhercommand.h | 13 +++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/shhhercommand.cpp b/shhhercommand.cpp index 6a19618..39a27d5 100644 --- a/shhhercommand.cpp +++ b/shhhercommand.cpp @@ -289,7 +289,9 @@ int ShhherCommand::execute(){ for(int i=0;imothurOut("\n>>>>>\tProcessing " + flowFileName + " (file " + toString(i+1) + " of " + toString(numFiles) + ")\t<<<<<\n"); m->mothurOut("Reading flowgrams...\n"); @@ -761,6 +763,11 @@ void ShhherCommand::getFlowData(){ m->openInputFile(flowFileName, flowFile); string seqName; + seqNameVector.clear(); + lengths.clear(); + flowDataIntI.clear(); + nameMap.clear(); + int currentNumFlowCells; @@ -943,7 +950,7 @@ void ShhherCommand::getUniques(){ uniqueFlowDataIntI.resize(numFlowCells * numUniques); uniqueLengths.resize(numUniques); - flowDataPrI.assign(numSeqs * numFlowCells, 0); + flowDataPrI.resize(numSeqs * numFlowCells, 0); for(int i=0;i newTau(numOTUs,0); vector norms(numSeqs, 0); - otuIndex.resize(0); - seqIndex.resize(0); - singleTau.resize(0); + otuIndex.clear(); + seqIndex.clear(); + singleTau.clear(); diff --git a/shhhercommand.h b/shhhercommand.h index 9e50824..acceb7f 100644 --- a/shhhercommand.h +++ b/shhhercommand.h @@ -40,19 +40,20 @@ private: vector nSeqsBreaks; vector nOTUsBreaks; - vector flowDataPrI; - vector flowDataIntI; - vector lengths; - vector seqNameVector; vector singleLookUp; vector jointLookUp; + + vector seqNameVector; + vector lengths; + vector flowDataIntI; + vector flowDataPrI; map nameMap; vector otuData; vector cumNumSeqs; vector nSeqsPerOTU; vector > aaP; //tMaster->aanP: each row is a different otu / each col contains the sequence indices - vector seqNumber; //tMaster->anP: the sequence id number sorted by OTU vector > aaI; //tMaster->aanI: that are in each otu - can't differentiate between aaP and aaI + vector seqNumber; //tMaster->anP: the sequence id number sorted by OTU vector seqIndex; //tMaster->anI; the index that corresponds to seqNumber vector dist; //adDist - distance of sequences to centroids vector change; //did the centroid sequence change? 0 = no; 1 = yes @@ -61,9 +62,9 @@ private: vector singleTau; //tMaster->adTau: 1-D Tau vector (1xnumSeqs) vector uniqueFlowgrams; vector uniqueCount; - vector uniqueLengths; vector mapSeqToUnique; vector mapUniqueToSeq; + vector uniqueLengths; int numSeqs, numUniques, numOTUs, numFlowCells; -- 2.39.2