Changed sequence 'description' to 'definition' everywhere

This commit is contained in:
Celine Mercier
2016-04-15 16:31:43 +02:00
parent 094b2371e9
commit 2aafecc3b5
10 changed files with 30 additions and 30 deletions

View File

@ -69,7 +69,7 @@ cdef class OBIView_NUC_SEQS(OBIView):
cdef OBIDMS_column ids
cdef OBIDMS_column sequences
cdef OBIDMS_column descriptions
cdef OBIDMS_column definitions
cpdef delete_column(self, str column_name)

View File

@ -69,7 +69,7 @@ from .capi.obiview cimport Obiview_p, \
VIEW_TYPE_NUC_SEQS, \
NUC_SEQUENCE_COLUMN, \
ID_COLUMN, \
DESCRIPTION_COLUMN
DEFINITION_COLUMN
from libc.stdlib cimport malloc
from cpython.pycapsule cimport PyCapsule_New, PyCapsule_GetPointer
@ -529,7 +529,7 @@ cdef class OBIView_NUC_SEQS(OBIView):
self.ids = self.columns[bytes2str(ID_COLUMN)]
self.sequences = self.columns[bytes2str(NUC_SEQUENCE_COLUMN)]
self.descriptions = self.columns[bytes2str(DESCRIPTION_COLUMN)]
self.definitions = self.columns[bytes2str(DEFINITION_COLUMN)]
cpdef delete_column(self, str column_name) :
@ -542,7 +542,7 @@ cdef class OBIView_NUC_SEQS(OBIView):
cdef OBIDMS_column_header_p header
cdef str column_n
if ((column_name == bytes2str(ID_COLUMN)) or (column_name == bytes2str(NUC_SEQUENCE_COLUMN)) or (column_name == bytes2str(DESCRIPTION_COLUMN))) :
if ((column_name == bytes2str(ID_COLUMN)) or (column_name == bytes2str(NUC_SEQUENCE_COLUMN)) or (column_name == bytes2str(DEFINITION_COLUMN))) :
raise Exception("Can't delete an obligatory column from a NUC_SEQS view")
view = self.pointer

View File

@ -5,13 +5,13 @@ from ._obidms cimport OBIView_line
cdef class OBI_Seq(dict) :
cdef str id
cdef str description
cdef str definition
cdef str sequence
cpdef set_id(self, str id)
cpdef get_id(self)
cpdef set_description(self, str description)
cpdef get_description(self)
cpdef set_definition(self, str definition)
cpdef get_definition(self)
cpdef get_sequence(self)
@ -23,8 +23,8 @@ cdef class OBI_Nuc_Seq(OBI_Seq) :
cdef class OBI_Nuc_Seq_Stored(OBIView_line) :
cpdef set_id(self, str id)
cpdef get_id(self)
cpdef set_description(self, str description)
cpdef get_description(self)
cpdef set_definition(self, str definition)
cpdef get_definition(self)
cpdef set_sequence(self, str sequence)
cpdef get_sequence(self)
# cpdef str reverse_complement(self)

View File

@ -4,15 +4,15 @@ from obitools3.utils cimport bytes2str, str2bytes
from .capi.obiview cimport NUC_SEQUENCE_COLUMN, \
ID_COLUMN, \
DESCRIPTION_COLUMN
DEFINITION_COLUMN
cdef class OBI_Seq(dict) :
def __init__(self, str id, str seq, str description=None) :
def __init__(self, str id, str seq, str definition=None) :
self.set_id(id)
self.set_sequence(seq)
if description is not None :
self.set_description(description)
if definition is not None :
self.set_definition(definition)
cpdef set_id(self, str id) :
self.id = id
@ -21,12 +21,12 @@ cdef class OBI_Seq(dict) :
cpdef get_id(self) :
return self.id
cpdef set_description(self, str description) :
self.description = description
self[bytes2str(DESCRIPTION_COLUMN)] = description
cpdef set_definition(self, str definition) :
self.definition = definition
self[bytes2str(DEFINITION_COLUMN)] = definition
cpdef get_description(self) :
return self.description # TODO no
cpdef get_definition(self) :
return self.definition
cpdef get_sequence(self) :
return self.sequence
@ -53,11 +53,11 @@ cdef class OBI_Nuc_Seq_Stored(OBIView_line) :
cpdef get_id(self) :
return self[bytes2str(ID_COLUMN)]
cpdef set_description(self, str description) :
self[bytes2str(DESCRIPTION_COLUMN)] = description
cpdef set_definition(self, str definition) :
self[bytes2str(DEFINITION_COLUMN)] = definition
cpdef get_description(self) :
return self[bytes2str(DESCRIPTION_COLUMN)]
cpdef get_definition(self) :
return self[bytes2str(DEFINITION_COLUMN)]
cpdef set_sequence(self, str sequence) :
self[bytes2str(NUC_SEQUENCE_COLUMN)] = sequence

View File

@ -18,7 +18,7 @@ cdef extern from "obiview.h" nogil:
extern const_char_p VIEW_TYPE_NUC_SEQS
extern const_char_p NUC_SEQUENCE_COLUMN
extern const_char_p ID_COLUMN
extern const_char_p DESCRIPTION_COLUMN
extern const_char_p DEFINITION_COLUMN
struct Column_reference_t :
const_char_p column_name