Added an argument to specify whether the two sequences can be identical
when applying filters before aligning
This commit is contained in:
@ -307,8 +307,11 @@ bool is_possible(Kmer_table_p ktable, index_t idx1, index_t idx2, int l1, int l2
|
||||
}
|
||||
|
||||
|
||||
void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_t idx1, index_t idx2, double threshold, bool normalize, int reference, bool similarity_mode, double* score, int* LCSmin)
|
||||
void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_t idx1, index_t idx2,
|
||||
double threshold, bool normalize, int reference, bool similarity_mode, double* score, int* LCSmin,
|
||||
bool can_be_identical)
|
||||
{ // score takes value -2 if filters are not passed, -1 if filters are passed and >= 0 with max score if the 2 sequences are identical.
|
||||
// TODO move to obi_align.c
|
||||
|
||||
int l1;
|
||||
int l2;
|
||||
@ -316,7 +319,7 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_
|
||||
|
||||
*score = -2.0;
|
||||
|
||||
if (obi_blob_compare(seq1, seq2) == 0) // the 2 sequences are identical. TODO add bool arg indicating whether that's a possibility?
|
||||
if (can_be_identical && (obi_blob_compare(seq1, seq2) == 0)) // the 2 sequences are identical.
|
||||
{
|
||||
if (similarity_mode && normalize)
|
||||
*score = 1.0;
|
||||
|
@ -19,7 +19,7 @@ typedef struct {
|
||||
|
||||
|
||||
Kmer_table_p hash_seq_column(Obiview_p view, OBIDMS_column_p seq_col);
|
||||
void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_t idx1, index_t idx2, double threshold, bool normalize, int reference, bool similarity_mode, double* score, int* LCSmin);
|
||||
void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_t idx1, index_t idx2, double threshold, bool normalize, int reference, bool similarity_mode, double* score, int* LCSmin, bool can_be_identical);
|
||||
void free_kmer_tables(Kmer_table_p ktable, size_t count);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user