New column type for DNA sequences. Only for those coded on 2 bits (only

'ATGCatgc') for now.
This commit is contained in:
Celine Mercier
2015-11-19 18:12:48 +01:00
parent e371248567
commit 6ab1c83302
17 changed files with 860 additions and 29 deletions

View File

@ -47,6 +47,11 @@ from ._obidmscolumn_str cimport OBIDMS_column_str, \
OBIDMS_column_str_multi_elts, \
OBIDMS_column_str_multi_elts_writable
from ._obidmscolumn_seq cimport OBIDMS_column_seq, \
OBIDMS_column_seq_writable, \
OBIDMS_column_seq_multi_elts, \
OBIDMS_column_seq_multi_elts_writable
cdef class OBIDMS :
@ -215,6 +220,17 @@ cdef class OBIDMS :
subclass = OBIDMS_column_str
else :
subclass = OBIDMS_column_str_multi_elts
elif data_type == 6 :
if (create or clone) :
if nb_elements_per_line == 1 :
subclass = OBIDMS_column_seq_writable
else :
subclass = OBIDMS_column_seq_multi_elts_writable
else :
if nb_elements_per_line == 1 :
subclass = OBIDMS_column_seq
else :
subclass = OBIDMS_column_seq_multi_elts
else :
raise Exception("Problem with the data type")
@ -238,7 +254,7 @@ cdef class OBIDMS_column :
bint create,
bint clone, bint clone_data,
obiversion_t version_number,
OBIType_t type,
OBIType_t type, # There's a problem with this with the OBI_IDX columns as there are 2 subtypes
index_t nb_lines,
index_t nb_elements_per_line,
list elements_names,