A7DA2022113FECD400BF472F /* clustercommand.h */,
A71D924311AEB42400D00CBC /* clustersplitcommand.h */,
A71D924211AEB42400D00CBC /* clustersplitcommand.cpp */,
- A7DA2025113FECD400BF472F /* collectcommand.cpp */,
A7DA2026113FECD400BF472F /* collectcommand.h */,
+ A7DA2025113FECD400BF472F /* collectcommand.cpp */,
A7DA2029113FECD400BF472F /* collectsharedcommand.cpp */,
A7DA202A113FECD400BF472F /* collectsharedcommand.h */,
A7DA2031113FECD400BF472F /* consensuscommand.cpp */,
#else
vector<unsigned long int> positions = divideFile(candidateFileNames[s], processors);
-
+
for (int i = 0; i < (positions.size()-1); i++) {
lines.push_back(new linePair(positions[i], positions[(i+1)]));
}
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
process++;
}else if (pid == 0){
+ //reset child's filter counts to 0;
+ F.a.clear(); F.a.resize(alignmentLength, 0);
+ F.t.clear(); F.t.resize(alignmentLength, 0);
+ F.g.clear(); F.g.resize(alignmentLength, 0);
+ F.c.clear(); F.c.resize(alignmentLength, 0);
+ F.gap.clear(); F.gap.resize(alignmentLength, 0);
+
num = driverCreateFilter(F, filename, lines[process]);
//write out filter counts to file
//for each process seekg to closest file break and search for next '>' char. make that the filebreak
for (int i = 0; i < proc; i++) {
unsigned long int spot = (i+1) * chunkSize;
-
+
ifstream in;
openInputFile(filename, in);
in.seekg(spot);
char c = in.get();
if (c == '>') { in.putback(c); newSpot = in.tellg(); break; }
}
-
+
//there was not another sequence before the end of the file
- if (newSpot == spot) { break; }
+ unsigned long int sanityPos = in.tellg();
+ if (sanityPos == -1) { break; }
else { filePos.push_back(newSpot); }
in.close();