From 5ca05ed0a8311b2943c1c0a1fad825785db484d6 Mon Sep 17 00:00:00 2001 From: westcott Date: Wed, 25 Nov 2009 16:50:42 +0000 Subject: [PATCH] a few changes to chimera classes --- ccode.cpp | 6 +++--- chimeracheckrdp.cpp | 3 ++- chimeraslayer.cpp | 6 ++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ccode.cpp b/ccode.cpp index a43a5a1..0a9214e 100644 --- a/ccode.cpp +++ b/ccode.cpp @@ -423,15 +423,15 @@ vector Ccode::findWindows(int query) { it = trim[query].begin(); int length = it->second - it->first; - + //default is wanted = 10% of total length if (windowSizes[query] > length) { mothurOut("You have slected a window larger than your sequence length after all filters, masks and trims have been done. I will use the default 10% of sequence length."); windowSizes[query] = length / 10; }else if (windowSizes[query] == 0) { windowSizes[query] = length / 10; } - else if (windowSizes[query] > (length / 20)) { + else if (windowSizes[query] > (length * 0.20)) { mothurOut("You have selected a window that is larger than 20% of your sequence length. This is not recommended, but I will continue anyway."); mothurOutEndLine(); - }else if (windowSizes[query] < (length / 5)) { + }else if (windowSizes[query] < (length * 0.05)) { mothurOut("You have selected a window that is smaller than 5% of your sequence length. This is not recommended, but I will continue anyway."); mothurOutEndLine(); } diff --git a/chimeracheckrdp.cpp b/chimeracheckrdp.cpp index f9b2319..dcd2ef3 100644 --- a/chimeracheckrdp.cpp +++ b/chimeracheckrdp.cpp @@ -43,7 +43,7 @@ void ChimeraCheckRDP::print(ostream& out) { out << IS[i][k].score << '\t'; //if (IS[i][k].score > chimeraCutoff) { isChimeric[i] = true; lastChimericWindowFound = k; } } - + out << endl; //if (isChimeric[i]) { //mothurOut(querySeqs[i]->getName() + "\tIS: " + toString(IS[i][lastChimericWindowFound].score) + "\tbreakpoint: " + toString(IS[i][lastChimericWindowFound].midpoint) + "\tleft parent: " + IS[i][lastChimericWindowFound].leftParent + "\tright parent: " + IS[i][lastChimericWindowFound].rightParent); mothurOutEndLine(); //out << endl << "chimera: YES" << endl; @@ -65,6 +65,7 @@ void ChimeraCheckRDP::print(ostream& out) { } } + mothurOut("This method does not determine if a sequence is chimeric, but allows you to make that determination based on the IS values."); mothurOutEndLine(); } catch(exception& e) { errorOut(e, "ChimeraCheckRDP", "print"); diff --git a/chimeraslayer.cpp b/chimeraslayer.cpp index 86ed532..0b7c221 100644 --- a/chimeraslayer.cpp +++ b/chimeraslayer.cpp @@ -38,7 +38,7 @@ void ChimeraSlayer::print(ostream& out) { out << querySeqs[i]->getName() << "\tyes" << endl; }else { out << querySeqs[i]->getName() << "\tno" << endl; - mothurOut(querySeqs[i]->getName() + "\tno"); mothurOutEndLine(); + //mothurOut(querySeqs[i]->getName() + "\tno"); mothurOutEndLine(); } printBlock(chimeraResults[i][0], out, i); @@ -46,7 +46,7 @@ void ChimeraSlayer::print(ostream& out) { out << endl; }else{ out << querySeqs[i]->getName() << "\tno" << endl; - mothurOut(querySeqs[i]->getName() + "\tno"); mothurOutEndLine(); + //mothurOut(querySeqs[i]->getName() + "\tno"); mothurOutEndLine(); } } @@ -212,8 +212,6 @@ void ChimeraSlayer::getChimeras() { if (seqMask != "") { delete decalc; } - - } catch(exception& e) { errorOut(e, "ChimeraSlayer", "getChimeras"); -- 2.39.2