]> git.donarmstrong.com Git - mothur.git/blobdiff - decalc.cpp
added current as option is lists of file names, processors now outputted with current...
[mothur.git] / decalc.cpp
index 609b8959036cef53e97db2a439ae5b12c6373135..67258714aa3b45cbdeaee2cf8d43576f2de4f446 100644 (file)
@@ -867,11 +867,12 @@ vector<Sequence*> DeCalculator::findClosest(Sequence* querySeq, vector<Sequence*
 //cout << numWanted << endl;
                for (int i = 0; i < numWanted; i++) {
 //                     cout << db[dists[i].index]->getName() << '\t' << dists[i].dist << endl;
-
-                       Sequence* temp = new Sequence(db[dists[i].index]->getName(), db[dists[i].index]->getAligned()); //have to make a copy so you can trim and filter without stepping on eachother.
+                       if (db[dists[i].index]->getName() != querySeq->getName()) {
+                               Sequence* temp = new Sequence(db[dists[i].index]->getName(), db[dists[i].index]->getAligned()); //have to make a copy so you can trim and filter without stepping on eachother.
                        
-                       seqsMatches.push_back(temp);
-                       indexes.push_back(dists[i].index);
+                               seqsMatches.push_back(temp);
+                               indexes.push_back(dists[i].index);
+                       }
                }
                
                return seqsMatches;