C alignment filter: added a check for sequences not being equal when the
threshold requires that they are
This commit is contained in:
@ -355,17 +355,26 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_
|
||||
|
||||
*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)
|
||||
*score = 1.0;
|
||||
else if (!similarity_mode)
|
||||
*score = 0.0;
|
||||
else
|
||||
*score = l1;
|
||||
if (obi_blob_compare(seq1, seq2) == 0)
|
||||
{
|
||||
if (similarity_mode && normalize)
|
||||
*score = 1.0;
|
||||
else if (!similarity_mode)
|
||||
*score = 0.0;
|
||||
else
|
||||
*score = l1;
|
||||
}
|
||||
}
|
||||
|
||||
else if (threshold != 0)
|
||||
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.0)
|
||||
{
|
||||
l2 = seq2->length_decoded_value;
|
||||
|
||||
|
Reference in New Issue
Block a user