X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=needlemanoverlap.cpp;h=1239beb1a2a9f61d3f8c2cec178161fb36a7b865;hb=16f9c4ab6f39769856b13e048eae2c8eaa413c02;hp=80ba4ca0aec06ea796a5a9bd7fbe7522f362157a;hpb=1244c4907c07baea86b0f0676d098a29d2e95a39;p=mothur.git diff --git a/needlemanoverlap.cpp b/needlemanoverlap.cpp index 80ba4ca..1239beb 100644 --- a/needlemanoverlap.cpp +++ b/needlemanoverlap.cpp @@ -24,8 +24,8 @@ /**************************************************************************************************/ -NeedlemanOverlap::NeedlemanOverlap(float gO, float m, float mm, int r) :// note that we don't have a gap extend -gap(gO), match(m), mismatch(mm), Alignment(r) { // the gap openning penalty is assessed for +NeedlemanOverlap::NeedlemanOverlap(float gO, float f, float mm, int r) :// note that we don't have a gap extend +gap(gO), match(f), mismatch(mm), Alignment(r) { // the gap openning penalty is assessed for try { // every gapped position for(int i=1;ierrorOut(e, "NeedlemanOverlap", "NeedlemanOverlap"); exit(1); } } @@ -51,18 +51,21 @@ NeedlemanOverlap::~NeedlemanOverlap(){ /* do nothing */ } void NeedlemanOverlap::align(string A, string B){ try { + seqA = ' ' + A; lA = seqA.length(); // algorithm requires a dummy space at the beginning of each string seqB = ' ' + B; lB = seqB.length(); // algorithm requires a dummy space at the beginning of each string - if (lA > nRows) { mothurOut("One of your candidate sequences is longer than you longest template sequence. Your longest template sequence is " + toString(nRows) + ". Your candidate is " + toString(lA) + "."); mothurOutEndLine(); } + if (lA > nRows) { m->mothurOut("One of your candidate sequences is longer than you longest template sequence. Your longest template sequence is " + toString(nRows) + ". Your candidate is " + toString(lA) + "."); m->mothurOutEndLine(); } for(int i=1;ierrorOut(e, "NeedlemanOverlap", "align"); exit(1); }