|
|
@@ -290,7 +290,7 @@ int SensSpecCommand::execute(){ |
|
|
|
|
|
//***************************************************************************************************************
|
|
|
|
|
|
-int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& getCutoff, string& origCutoff){
|
|
|
+int SensSpecCommand::process(ListVector*& list, bool& getCutoff, string& origCutoff){
|
|
|
|
|
|
try {
|
|
|
|
|
|
@@ -316,7 +316,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& |
|
|
trueNegatives = 0;
|
|
|
falseNegatives = 0;
|
|
|
|
|
|
- map<string, double> distanceMap;
|
|
|
+ set<string> distanceMap;
|
|
|
|
|
|
//could segfault out if there are sequences in phylip-formatted distance
|
|
|
//matrix that aren't in the list file
|
|
|
@@ -338,8 +338,6 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& |
|
|
|
|
|
phylipFile >> seqNameVector[i];
|
|
|
|
|
|
- //otuIndices[i] = seqMap[seqName];
|
|
|
-
|
|
|
for(int j=0;j<i;j++){
|
|
|
phylipFile >> distance;
|
|
|
|
|
|
@@ -352,7 +350,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& |
|
|
seqNamePair = seqNameVector[j] + '-' + seqNameVector[i];
|
|
|
}
|
|
|
|
|
|
- distanceMap[seqNamePair] = distance;
|
|
|
+ distanceMap.insert(seqNamePair);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -381,12 +379,12 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& |
|
|
} else {
|
|
|
seqNamePair = seqNameB + '-' + seqNameA;
|
|
|
}
|
|
|
- distanceMap[seqNamePair] = distance;
|
|
|
+ distanceMap.insert(seqNamePair);
|
|
|
}
|
|
|
}
|
|
|
columnFile.close();
|
|
|
}
|
|
|
-
|
|
|
+ cout << m->getRAMUsed()/(double)GIG << endl;
|
|
|
for(int otu=0;otu<numOTUs;otu++){
|
|
|
if (m->control_pressed) { return 0; }
|
|
|
|
|
|
@@ -421,7 +419,7 @@ int SensSpecCommand::process(map<string, int>& seqMap, ListVector*& list, bool& |
|
|
seqNamePair = otuVector[j] + '-' + otuVector[i];
|
|
|
}
|
|
|
|
|
|
- map<string, double>::iterator it = distanceMap.find(seqNamePair);
|
|
|
+ set<string>::iterator it = distanceMap.find(seqNamePair);
|
|
|
|
|
|
if(it != distanceMap.end()){
|
|
|
truePositives++;
|
|
|
@@ -457,8 +455,6 @@ int SensSpecCommand::processListFile(){ |
|
|
if(cutoff == -1.00) { getCutoff = 1; }
|
|
|
else { origCutoff = toString(m->ceilDist(cutoff, precision)); }
|
|
|
|
|
|
- map<string, int> seqMap;
|
|
|
-
|
|
|
InputData input(listFile, "list");
|
|
|
ListVector* list = input.getListVector();
|
|
|
string lastLabel = list->getLabel();
|
|
|
@@ -477,7 +473,7 @@ int SensSpecCommand::processListFile(){ |
|
|
|
|
|
//process
|
|
|
// int numSeqs = fillSeqMap(seqMap, list);
|
|
|
- process(seqMap, list, getCutoff, origCutoff);
|
|
|
+ process(list, getCutoff, origCutoff);
|
|
|
}
|
|
|
|
|
|
if ((m->anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
|
|
|
@@ -492,7 +488,7 @@ int SensSpecCommand::processListFile(){ |
|
|
|
|
|
//process
|
|
|
//int numSeqs = fillSeqMap(seqMap, list);
|
|
|
- process(seqMap, list, getCutoff, origCutoff);
|
|
|
+ process(list, getCutoff, origCutoff);
|
|
|
|
|
|
//restore real lastlabel to save below
|
|
|
list->setLabel(saveLabel);
|
|
|
@@ -523,7 +519,7 @@ int SensSpecCommand::processListFile(){ |
|
|
|
|
|
//process
|
|
|
//int numSeqs = fillSeqMap(seqMap, list);
|
|
|
- process(seqMap, list, getCutoff, origCutoff);
|
|
|
+ process(list, getCutoff, origCutoff);
|
|
|
|
|
|
delete list;
|
|
|
}
|
|
|
|
0 comments on commit
7126852