Commit da445066 authored by Celine Mercier's avatar Celine Mercier

C alignment filter: added a check for sequences not being equal when the

threshold requires that they are
parent 0a407436
...@@ -355,17 +355,26 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_ ...@@ -355,17 +355,26 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_
*score = -2.0; *score = -2.0;
if (can_be_identical && (obi_blob_compare(seq1, seq2) == 0)) // the 2 sequences are identical. if (can_be_identical)
{ {
if (similarity_mode && normalize) if (obi_blob_compare(seq1, seq2) == 0)
*score = 1.0; {
else if (!similarity_mode) if (similarity_mode && normalize)
*score = 0.0; *score = 1.0;
else else if (!similarity_mode)
*score = l1; *score = 0.0;
else
*score = l1;
}
}
else if ((similarity_mode && normalize && (threshold == 1.0)) ||
(!similarity_mode && (threshold == 0.0)))
{ // The sequences must be identical but are not
return;
} }
else if (threshold != 0) else if (threshold != 0.0)
{ {
l2 = seq2->length_decoded_value; l2 = seq2->length_decoded_value;
......
Markdown is supported
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