]> git.donarmstrong.com Git - mothur.git/commitdiff
small things with chimera.slayer
authorpschloss <pschloss>
Thu, 21 Apr 2011 20:08:54 +0000 (20:08 +0000)
committerpschloss <pschloss>
Thu, 21 Apr 2011 20:08:54 +0000 (20:08 +0000)
blastdb.cpp
maligner.cpp

index 6cfa3c685767457e6b9e9e10400ca1806929574c..14a1fa3a67368f5207a1c0df7a08ca5bab7fade9 100644 (file)
@@ -116,6 +116,7 @@ vector<int> BlastDB::findClosestMegaBlast(Sequence* seq, int n) {
                vector<int> topMatches;
                
                ofstream queryFile;
+
                m->openOutputFile((queryFileName+seq->getName()), queryFile);
                queryFile << '>' << seq->getName() << endl;
                queryFile << seq->getUnaligned() << endl;
@@ -154,7 +155,7 @@ vector<int> BlastDB::findClosestMegaBlast(Sequence* seq, int n) {
                return topMatches;
        }
        catch(exception& e) {
-               m->errorOut(e, "BlastDB", "findClosest");
+               m->errorOut(e, "BlastDB", "findClosestMegaBlast");
                exit(1);
        }
 }
index b3cb991299fbf29d595318e613f8654cc7f3426f..18f740911b2ccf342c4893cb00f629da95e7307b 100644 (file)
@@ -628,13 +628,13 @@ vector<Sequence*> Maligner::getBlastSeqs(Sequence* q, int num) {
                string queryUnAligned = q->getUnaligned();
                string leftQuery = queryUnAligned.substr(0, int(queryUnAligned.length() * 0.33)); //first 1/3 of the sequence
                string rightQuery = queryUnAligned.substr(int(queryUnAligned.length() * 0.66)); //last 1/3 of the sequence
-
+               
                Sequence* queryLeft = new Sequence(q->getName()+"left", leftQuery);
                Sequence* queryRight = new Sequence(q->getName()+"right", rightQuery);
-               
-               vector<int> tempIndexesRight = databaseLeft->findClosestMegaBlast(queryRight, num+1);
+
                vector<int> tempIndexesLeft = databaseLeft->findClosestMegaBlast(queryLeft, num+1);
-                       
+               vector<int> tempIndexesRight = databaseLeft->findClosestMegaBlast(queryRight, num+1);
+
                //if ((tempIndexesRight.size() == 0) && (tempIndexesLeft.size() == 0))  {  m->mothurOut("megablast returned " + toString(tempIndexesRight.size()) + " results for the right end, and " + toString(tempIndexesLeft.size()) + " for the left end. Needed " + toString(num+1) + ". Unable to process sequence " + q->getName()); m->mothurOutEndLine(); return refResults; }
                
                vector<int> smaller;