From 0b62619e4edb11ceaf1a4a2133b743b08223b87a Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Mon, 21 Jan 2019 17:32:44 +0100 Subject: [PATCH] Various commentaries and insignificant fixes --- python/obitools3/utils.pxd | 1 + python/obitools3/utils.pyx | 4 +--- src/obi_ecopcr.c | 2 ++ src/obidmscolumn.c | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/python/obitools3/utils.pxd b/python/obitools3/utils.pxd index cec7894..feb27a4 100755 --- a/python/obitools3/utils.pxd +++ b/python/obitools3/utils.pxd @@ -2,6 +2,7 @@ from obitools3.dms.capi.obitypes cimport obitype_t, index_t + cdef obi_errno_to_exception(int obi_errno, index_t line_nb=*, object elt_id=*, str error_message=*) cdef bytes str2bytes(str string) diff --git a/python/obitools3/utils.pyx b/python/obitools3/utils.pyx index baefcaf..1b147c1 100755 --- a/python/obitools3/utils.pyx +++ b/python/obitools3/utils.pyx @@ -16,9 +16,7 @@ from obitools3.dms.capi.obierrno cimport OBI_LINE_IDX_ERROR, \ #obi_errno import re - -#from obitools3.dms.obiseq cimport Nuc_Seq, Nuc_Seq_Stored - + # TODO RollbackException? cdef obi_errno_to_exception(int obi_errno, index_t line_nb=-1, object elt_id=None, str error_message=None) : diff --git a/src/obi_ecopcr.c b/src/obi_ecopcr.c index 72952d5..8c7a90e 100755 --- a/src/obi_ecopcr.c +++ b/src/obi_ecopcr.c @@ -359,6 +359,8 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view, int32_t i; + // TODO add check for primer longer than MAX_PAT_LEN (32) + ldelta = (pos1 <= keep_nucleotides)?pos1:keep_nucleotides; rdelta = ((pos2+keep_nucleotides)>=seq_len)?seq_len-pos2:keep_nucleotides; diff --git a/src/obidmscolumn.c b/src/obidmscolumn.c index e02abb4..794f5f3 100755 --- a/src/obidmscolumn.c +++ b/src/obidmscolumn.c @@ -1351,8 +1351,9 @@ OBIDMS_column_p obi_open_column(OBIDMS_p dms, column->writable = false; - // If the data type is OBI_STR, OBI_SEQ or OBI_QUAL, the associated indexer is opened - if (((column->header)->returned_data_type == OBI_STR) || ((column->header)->returned_data_type == OBI_SEQ) || ((column->header)->returned_data_type == OBI_QUAL)) + // If the data type is OBI_STR, OBI_SEQ or OBI_QUAL or the column contains tuples, the associated indexer is opened + // TODO maybe store a 'indexer' bool in the header instead + if (((column->header)->returned_data_type == OBI_STR) || ((column->header)->returned_data_type == OBI_SEQ) || ((column->header)->returned_data_type == OBI_QUAL) || ((column->header)->tuples)) { column->indexer = obi_open_indexer(dms, (column->header)->indexer_name); if (column->indexer == NULL)