X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=kmerdb.cpp;h=e7e8ab2acbbf04c8bc30c6adb84fbd3880f7b2d8;hb=d04f948b1a2a1a2984fc4a45d04403b8c121c5bc;hp=108b207d87c469b9f95df83921332b1bf5a756ae;hpb=5b3bedc6fbfed63854cc6a7d47454580b2734c08;p=mothur.git diff --git a/kmerdb.cpp b/kmerdb.cpp index 108b207..e7e8ab2 100644 --- a/kmerdb.cpp +++ b/kmerdb.cpp @@ -75,24 +75,39 @@ vector KmerDB::findClosestSequences(Sequence* candidateSeq, int num){ } timesKmerFound[kmerNumber] = 1; // ok, we've seen the kmer now } - - vector seqMatches; - for(int i=0;i seqMatches; seqMatches.resize(numSeqs); + for(int i=0;i bestMatch) { + bestIndex = i; + bestMatch = matches[i]; + } + } + + searchScore = bestMatch; + searchScore = 100 * searchScore / (float) numKmers; // return the Sequence object corresponding to the db + topMatches.push_back(bestIndex); } - return topMatches; } catch(exception& e) {