Changed sequence 'description' to 'definition' everywhere
This commit is contained in:
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -577,7 +577,7 @@ int obi_dms_unlist_indexer(OBIDMS_p dms, Obi_indexer_p indexer)
|
||||
|
||||
for (i=0; i < indexers_list->nb_opened_indexers; i++)
|
||||
{
|
||||
if (!strcmp(((indexers_list->indexers)[i])->name, indexer->name)) // TODO it references something in AVL_group struct
|
||||
if (!strcmp(((indexers_list->indexers)[i])->name, indexer->name)) // TODO get_name function indexer
|
||||
{ // Found the indexer. Rearrange list
|
||||
(indexers_list->nb_opened_indexers)--;
|
||||
(indexers_list->indexers)[i] = (indexers_list->indexers)[indexers_list->nb_opened_indexers];
|
||||
|
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
|
||||
typedef int32_t obiversion_t; /**< TODO double
|
||||
typedef int32_t obiversion_t; /**< TODO put dans obitypes.h
|
||||
*/
|
||||
|
||||
|
||||
|
@ -558,7 +558,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
if (((data_type == OBI_STR) || (data_type == OBI_SEQ)) && (strcmp(indexer_name, "") == 0))
|
||||
{ // TODO make function in obiblob_indexer.c and discuss the fact that it's here
|
||||
strcpy(final_indexer_name, column_name);
|
||||
strcat(final_indexer_name, "_indexer");
|
||||
strcat(final_indexer_name, "_indexer"); // TODO _version_indexer
|
||||
}
|
||||
else
|
||||
strcpy(final_indexer_name, indexer_name);
|
||||
|
@ -310,8 +310,8 @@ Obiview_p obi_new_view_nuc_seqs(OBIDMS_p dms, const char* view_name, Obiview_p v
|
||||
obidebug(1, "Error adding an obligatory column in a nucleotide sequences view");
|
||||
return NULL;
|
||||
}
|
||||
// Adding description column
|
||||
if (obi_view_add_column(view, DESCRIPTION_COLUMN, -1, OBI_STR, 0, 1, DESCRIPTION_COLUMN, DESCRIPTION_INDEXER, "Descriptions", true) < 0)
|
||||
// Adding definition column
|
||||
if (obi_view_add_column(view, DEFINITION_COLUMN, -1, OBI_STR, 0, 1, DEFINITION_COLUMN, DEFINITION_INDEXER, "Definitions", true) < 0)
|
||||
{
|
||||
obidebug(1, "Error adding an obligatory column in a nucleotide sequences view");
|
||||
return NULL;
|
||||
|
@ -42,8 +42,8 @@
|
||||
#define ID_COLUMN "ID"
|
||||
#define ID_INDEXER "ID_INDEXER"
|
||||
|
||||
#define DESCRIPTION_COLUMN "DESCRIPTION"
|
||||
#define DESCRIPTION_INDEXER "DESCRIPTION_INDEXER"
|
||||
#define DEFINITION_COLUMN "DEFINITION"
|
||||
#define DEFINITION_INDEXER "DEFINITION_INDEXER"
|
||||
|
||||
#define LINES_COLUMN_NAME "LINES"
|
||||
|
||||
|
Reference in New Issue
Block a user