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