Commit 22489f9f authored by Mikaël Salson's avatar Mikaël Salson
Browse files

KmerAffect: Don't compare KmerAffect with affect_t!

parent c2aa9edf
......@@ -112,7 +112,7 @@ KmerAffect::KmerAffect(const string &label,
KmerAffect &KmerAffect::operator+=(const KmerAffect &kmer) {
if (kmer.affect != affect) {
if (isUnknown())
affect = kmer.affect;
*this = kmer;
else if (affect_char(affect) == affect_char(kmer.affect)
&& (affect_strand(affect) != affect_strand(kmer.affect)))
// Same label but different strand
......
......@@ -15,9 +15,9 @@ float KmerAffectReadScore::getScore(const Sequence &sequence) const {
vector<KmerAffect> answers = index.getResults(sequence.sequence);
float score = 0;
for (size_t i = 0; i < answers.size(); i++) {
if (answers[i].affect == AFFECT_AMBIGUOUS)
if (answers[i] == AFFECT_AMBIGUOUS)
score += ambiguous_score;
else if (answers[i].affect == AFFECT_UNKNOWN)
else if (answers[i] == AFFECT_UNKNOWN)
score += unknown_score;
else
score += unambiguous_score;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment