updated a comment

This commit is contained in:
Celine Mercier
2019-07-23 19:03:24 +02:00
parent 946f9723b8
commit 9f38cd8cf6

View File

@ -249,7 +249,7 @@ Kmer_table_p hash_seq_column(Obiview_p view, OBIDMS_column_p seq_col, index_t se
for (i=0; i < seq_count; i++) for (i=0; i < seq_count; i++)
{ {
seq = obi_get_seq_with_elt_idx_and_col_p_in_view(view, seq_col, i, seq_idx); // TODO discuss 1 element per line mandatory seq = obi_get_seq_with_elt_idx_and_col_p_in_view(view, seq_col, i, seq_idx);
if (seq == NULL) if (seq == NULL)
return NULL; // TODO or not return NULL; // TODO or not
ktable[i].table = malloc(256 * sizeof(unsigned char)); ktable[i].table = malloc(256 * sizeof(unsigned char));
@ -320,10 +320,10 @@ bool is_possible(Kmer_table_p ktable, index_t idx1, index_t idx2, int l1, int l2
int32_t lcs; int32_t lcs;
int32_t mincount; int32_t mincount;
if (l1 < 12 || l2 < 12) if ((l1 < 12) || (l2 < 12))
return true; return true;
if (reference==ALILEN || reference==MAXLEN) if ((reference==ALILEN) || (reference==MAXLEN))
reflen = l1; reflen = l1;
else else
reflen = l2; reflen = l2;
@ -357,7 +357,7 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_
if (can_be_identical) if (can_be_identical)
{ {
if (obi_blob_compare(seq1, seq2) == 0) if (obi_blob_compare(seq1, seq2) == 0) // seqs are identical: return max score
{ {
if (similarity_mode && normalize) if (similarity_mode && normalize)
*score = 1.0; *score = 1.0;
@ -365,6 +365,7 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_
*score = 0.0; *score = 0.0;
else else
*score = l1; *score = l1;
return;
} }
} }
@ -374,7 +375,7 @@ void align_filters(Kmer_table_p ktable, Obi_blob_p seq1, Obi_blob_p seq2, index_
return; return;
} }
else if (threshold != 0.0) if (threshold != 0.0)
{ {
l2 = seq2->length_decoded_value; l2 = seq2->length_decoded_value;