X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=qualityscores.cpp;h=aafa5794e206b936793cf6ffce6109f66eebaf86;hb=bdb5d82e2a73829b4e1fa42656ad9bcb57e3e948;hp=2ee71e066f22e421b7f312be03da1279b2aa3a7a;hpb=fe5bbb79f9434df947347881c47b430112f4253e;p=mothur.git diff --git a/qualityscores.cpp b/qualityscores.cpp index 2ee71e0..aafa579 100644 --- a/qualityscores.cpp +++ b/qualityscores.cpp @@ -332,7 +332,7 @@ bool QualityScores::cullQualAverage(Sequence& sequence, double qAverage){ return success; } catch(exception& e) { - m->errorOut(e, "TrimSeqsCommand", "cullQualAverage"); + m->errorOut(e, "QualityScores", "cullQualAverage"); exit(1); } } @@ -341,19 +341,57 @@ bool QualityScores::cullQualAverage(Sequence& sequence, double qAverage){ void QualityScores::updateQScoreErrorMap(map >& qualErrorMap, string errorSeq, int start, int stop, int weight){ try { - - for(int i=start-1;ierrorOut(e, "TrimSeqsCommand", "updateQScoreErrorMap"); + m->errorOut(e, "QualityScores", "updateQScoreErrorMap"); + exit(1); + } +} + +/**************************************************************************************************/ + +void QualityScores::updateForwardMap(vector >& forwardMap, int start, int stop, int weight){ + try { + + int index = 0; + for(int i=start-1;ierrorOut(e, "QualityScores", "updateForwardMap"); + exit(1); + } +} + +/**************************************************************************************************/ + +void QualityScores::updateReverseMap(vector >& reverseMap, int start, int stop, int weight){ + try { + + int index = 0; + for(int i=stop-1;i>=start;i--){ + reverseMap[index++][qScores[i]] += weight; + } + + } + catch(exception& e) { + m->errorOut(e, "QualityScores", "updateForwardMap"); exit(1); } }