From f5ef644ce76074de08b2bbb64097619b2b16d60d Mon Sep 17 00:00:00 2001 From: pschloss Date: Tue, 5 Jul 2011 17:52:54 +0000 Subject: [PATCH] minor mods to seq.error --- qualityscores.cpp | 3 +- seqerrorcommand.cpp | 113 ++++++++++++++++++++++++++------------------ 2 files changed, 68 insertions(+), 48 deletions(-) diff --git a/qualityscores.cpp b/qualityscores.cpp index ae85d86..b23ee19 100644 --- a/qualityscores.cpp +++ b/qualityscores.cpp @@ -376,10 +376,11 @@ void QualityScores::updateQScoreErrorMap(map >& qualErrorMap, if(errorSeq[i] == 'm') { qualErrorMap['m'][qScores[qIndex]] += weight; } else if(errorSeq[i] == 's') { qualErrorMap['s'][qScores[qIndex]] += weight; } else if(errorSeq[i] == 'i') { qualErrorMap['i'][qScores[qIndex]] += weight; } - else if(errorSeq[i] == 'a') { qualErrorMap['a'][qScores[qIndex]] += weight; } + else if(errorSeq[i] == 'a') { qualErrorMap['a'][qScores[qIndex]] += weight; /*if(qScores[qIndex] != 0){ cout << qIndex << '\t'; }*/ } else if(errorSeq[i] == 'd') { /* there are no qScores for deletions */ } if(errorSeq[i] != 'd') { qIndex++; } + if(qIndex > stop){ break; } } } diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index 564e412..007ac93 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -658,8 +658,10 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName, for(int i=0;i