X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chopseqscommand.cpp;h=68576cdb521efc994bedf2d3b2d40cc98a740b9c;hb=8dd3c225255d7084e3aff8740aa4f1f1cabb367a;hp=e2b0fa46fc28bb6fd6be1af8a085e409a9a8b4df;hpb=19fcbbdba99658f5eca244803280f9ee7f9f6607;p=mothur.git diff --git a/chopseqscommand.cpp b/chopseqscommand.cpp index e2b0fa4..68576cd 100644 --- a/chopseqscommand.cpp +++ b/chopseqscommand.cpp @@ -121,7 +121,7 @@ ChopSeqsCommand::ChopSeqsCommand(string option) { outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = m->hasPath(fastafile); } string temp = validParameter.validFile(parameters, "numbases", false); if (temp == "not found") { temp = "0"; } - convert(temp, numbases); + m->mothurConvert(temp, numbases); temp = validParameter.validFile(parameters, "countgaps", false); if (temp == "not found") { temp = "f"; } countGaps = m->isTrue(temp); @@ -241,7 +241,7 @@ string ChopSeqsCommand::getChopped(Sequence seq) { } if (stopSpot == 0) { temp = ""; } - else { temp = temp.substr(0, stopSpot); } + else { temp = temp.substr(0, stopSpot+1); } }else { if (!Short) { temp = ""; } //sequence too short @@ -294,7 +294,7 @@ string ChopSeqsCommand::getChopped(Sequence seq) { } if (stopSpot == 0) { temp = ""; } - else { temp = temp.substr(0, stopSpot); } + else { temp = temp.substr(0, stopSpot+1); } }else { if (!Short) { temp = ""; } //sequence too short @@ -320,7 +320,7 @@ string ChopSeqsCommand::getChopped(Sequence seq) { } if (stopSpot == 0) { temp = ""; } - else { temp = temp.substr(stopSpot+1); } + else { temp = temp.substr(stopSpot); } }else { if (!Short) { temp = ""; } //sequence too short }