diff --git a/source/commands/sensspeccommand.cpp b/source/commands/sensspeccommand.cpp index aa8ba1bd..96966b22 100644 --- a/source/commands/sensspeccommand.cpp +++ b/source/commands/sensspeccommand.cpp @@ -341,7 +341,7 @@ int SensSpecCommand::process(ListVector*& list, bool& getCutoff, string& origCut for(int j=0;j> distance; - if(distance <= cutoff){ + if(distance < cutoff){ string seqNamePair; if(seqNameVector[i] < seqNameVector[j]){ diff --git a/source/datastructures/optimatrix.cpp b/source/datastructures/optimatrix.cpp index fe6ee91d..50b2c5e5 100644 --- a/source/datastructures/optimatrix.cpp +++ b/source/datastructures/optimatrix.cpp @@ -184,7 +184,7 @@ int OptiMatrix::readPhylip(){ for(int i=1;icontrol_pressed) { fileHandle.close(); return 0; } - fileHandle >> name; nameMap.push_back(name); + fileHandle >> name; nameMap.push_back(name); singletonIndexSwap[i] = i; for(int j=0;j> distance; @@ -206,6 +206,7 @@ int OptiMatrix::readPhylip(){ if (!singleton[i]) { //if you are not a singleton singletonIndexSwap[i] = nonSingletonCount; nonSingletonCount++; + cout << i << '\t' << nameMap[i] << '\t' << singletonIndexSwap[i] << endl; }else { singletons.push_back(nameMap[i]); } } singleton.clear(); @@ -226,11 +227,8 @@ int OptiMatrix::readPhylip(){ m->openInputFile(distFile, in); in >> nseqs >> name; - int newA = singletonIndexSwap[0]; - if (namefile != "") { - name = names[name]; //redundant names - } - nameMap[newA] = name; + if (namefile != "") { name = names[name]; } //redundant names + nameMap[singletonIndexSwap[0]] = name; int fivepercent = (int)(0.05 * nseqs); @@ -244,14 +242,14 @@ int OptiMatrix::readPhylip(){ if (m->control_pressed) { in.close(); delete reading; return 0; } - in >> name; + in >> name; m->gobble(in); if (namefile != "") { name = names[name]; } //redundant names nameMap[singletonIndexSwap[i]] = name; for(int j=0;j> distance; + in >> distance; m->gobble(in); if (distance == -1) { distance = 1000000; } else if (sim) { distance = 1.0 - distance; } //user has entered a sim matrix that we need to convert. @@ -280,13 +278,13 @@ int OptiMatrix::readPhylip(){ for(int i=1;icontrol_pressed) { in.close(); delete reading; return 0; } - in >> name; + in >> name; m->gobble(in); if (namefile != "") { name = names[name]; } //redundant names nameMap[singletonIndexSwap[i]] = name; for(int j=0;j> distance; + in >> distance; m->gobble(in); if (distance == -1) { distance = 1000000; } else if (sim) { distance = 1.0 - distance; } //user has entered a sim matrix that we need to convert.