for(int i=0;i<numFiles;i++){
flowFileName = flowFileVector[i];
-
+
+
+
m->mothurOut("\n>>>>>\tProcessing " + flowFileName + " (file " + toString(i+1) + " of " + toString(numFiles) + ")\t<<<<<\n");
m->mothurOut("Reading flowgrams...\n");
m->openInputFile(flowFileName, flowFile);
string seqName;
+ seqNameVector.clear();
+ lengths.clear();
+ flowDataIntI.clear();
+ nameMap.clear();
+
int currentNumFlowCells;
uniqueFlowDataIntI.resize(numFlowCells * numUniques);
uniqueLengths.resize(numUniques);
- flowDataPrI.assign(numSeqs * numFlowCells, 0);
+ flowDataPrI.resize(numSeqs * numFlowCells, 0);
for(int i=0;i<flowDataPrI.size();i++) { flowDataPrI[i] = getProbIntensity(flowDataIntI[i]); }
}
catch(exception& e) {
nSeqsPerOTU.assign(numOTUs, 0);
aaP.resize(numOTUs);
+ seqNumber.clear();
+ aaI.clear();
+ seqIndex.clear();
+
string singleOTU = "";
for(int i=0;i<numOTUs;i++){
try{
vector<double> newTau(numOTUs,0);
vector<double> norms(numSeqs, 0);
- otuIndex.resize(0);
- seqIndex.resize(0);
- singleTau.resize(0);
+ otuIndex.clear();
+ seqIndex.clear();
+ singleTau.clear();
vector<int> nSeqsBreaks;
vector<int> nOTUsBreaks;
- vector<double> flowDataPrI;
- vector<short> flowDataIntI;
- vector<int> lengths;
- vector<string> seqNameVector;
vector<double> singleLookUp;
vector<double> jointLookUp;
+
+ vector<string> seqNameVector;
+ vector<int> lengths;
+ vector<short> flowDataIntI;
+ vector<double> flowDataPrI;
map<string, int> nameMap;
vector<int> otuData;
vector<int> cumNumSeqs;
vector<int> nSeqsPerOTU;
vector<vector<int> > aaP; //tMaster->aanP: each row is a different otu / each col contains the sequence indices
- vector<int> seqNumber; //tMaster->anP: the sequence id number sorted by OTU
vector<vector<int> > aaI; //tMaster->aanI: that are in each otu - can't differentiate between aaP and aaI
+ vector<int> seqNumber; //tMaster->anP: the sequence id number sorted by OTU
vector<int> seqIndex; //tMaster->anI; the index that corresponds to seqNumber
vector<double> dist; //adDist - distance of sequences to centroids
vector<short> change; //did the centroid sequence change? 0 = no; 1 = yes
vector<double> singleTau; //tMaster->adTau: 1-D Tau vector (1xnumSeqs)
vector<short> uniqueFlowgrams;
vector<int> uniqueCount;
- vector<int> uniqueLengths;
vector<int> mapSeqToUnique;
vector<int> mapUniqueToSeq;
+ vector<int> uniqueLengths;
int numSeqs, numUniques, numOTUs, numFlowCells;