diff --git a/doc/conf.py b/doc/conf.py index b7274d9..c895b7d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -33,7 +33,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', - 'sphinx.ext.pngmath', + 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'breathe', diff --git a/src/linked_list.h b/src/linked_list.h index c7c39b8..6356cd0 100644 --- a/src/linked_list.h +++ b/src/linked_list.h @@ -90,7 +90,7 @@ Linked_list_node_p ll_get(Linked_list_node_p head, int idx); * @param idx The index of the node to delete. * * @returns A pointer on the new head node of the linked list. - * @retval NULL if an error occurred. + * @retval NULL if an error occurred. // TODO or if list is now empty... * * @since February 2017 * @author Celine Mercier (celine.mercier@metabarcoding.org) diff --git a/src/obi_align.c b/src/obi_align.c index 07a389b..a160ce6 100644 --- a/src/obi_align.c +++ b/src/obi_align.c @@ -883,6 +883,10 @@ int obi_lcs_align_two_columns(OBIDMS_p dms, return -1; } + // TODO check this + if (!similarity_mode && normalize && (threshold > 0)) + threshold = 1.0 - threshold; + seq1_count = (seq1_view->infos)->line_count; seq2_count = (seq2_view->infos)->line_count; @@ -932,6 +936,11 @@ int obi_lcs_align_two_columns(OBIDMS_p dms, // Compute alignment score if ((threshold == 0) || (score == -1.0)) // no threshold, or filter passed: align score = obiblob_sse_banded_lcs_align(blob1, blob2, threshold, normalize, reference, similarity_mode, &lcs_length, &ali_length); + + // TODO check this +// if (print && !lcsmode && normalize) +// score = 1.0 - score; + } if ((score >= 0) && (((normalize || similarity_mode) && (score >= threshold)) || ((!similarity_mode && !normalize) && (score <= threshold)))) diff --git a/src/obiview.c b/src/obiview.c index 80047e5..e2d7543 100644 --- a/src/obiview.c +++ b/src/obiview.c @@ -1188,6 +1188,8 @@ static int prepare_to_set_value_in_column(Obiview_p view, OBIDMS_column_p* colum } } + // TODO add line_max + if (((*line_nb_p)+1) > (view->infos)->line_count) { if (update_lines(view, ((*line_nb_p)+1)) < 0) diff --git a/src/upperband.c b/src/upperband.c index 548d09e..8059ca0 100644 --- a/src/upperband.c +++ b/src/upperband.c @@ -230,7 +230,7 @@ int thresholdLCS4(int32_t reflen, int32_t lcs) } -Kmer_table_p hash_seq_column(Obiview_p view, OBIDMS_column_p seq_col, index_t seq_idx) +Kmer_table_p hash_seq_column(Obiview_p view, OBIDMS_column_p seq_col, index_t seq_idx) // TODO move in another file (obi_align.c) { size_t i; size_t seq_count;