Fixed a bug when cloning a view and checking its type
This commit is contained in:
@ -619,7 +619,7 @@ cdef class OBIView_line :
|
|||||||
value_b = str2bytes(value)
|
value_b = str2bytes(value)
|
||||||
else :
|
else :
|
||||||
value_b = value
|
value_b = value
|
||||||
if only_ATGC(value_b) : # TODO detect IUPAC?
|
if only_ATGC(value_b) : # TODO detect IUPAC
|
||||||
value_obitype = 'OBI_SEQ'
|
value_obitype = 'OBI_SEQ'
|
||||||
elif len(value) == 1 :
|
elif len(value) == 1 :
|
||||||
value_obitype = 'OBI_CHAR'
|
value_obitype = 'OBI_CHAR'
|
||||||
@ -729,7 +729,7 @@ cdef class OBIDMS :
|
|||||||
# Check the type of the view to clone if there is one # TODO make generic for future other view types
|
# Check the type of the view to clone if there is one # TODO make generic for future other view types
|
||||||
if (view_to_clone is not None and \
|
if (view_to_clone is not None and \
|
||||||
((type(view_to_clone) == str and self.read_view_infos(view_to_clone)["view_type"] == bytes2str(VIEW_TYPE_NUC_SEQS)) or \
|
((type(view_to_clone) == str and self.read_view_infos(view_to_clone)["view_type"] == bytes2str(VIEW_TYPE_NUC_SEQS)) or \
|
||||||
(view_to_clone.type == bytes2str(VIEW_TYPE_NUC_SEQS)))) or \
|
(type(view_to_clone) != str and view_to_clone.type == bytes2str(VIEW_TYPE_NUC_SEQS)))) or \
|
||||||
(line_selection is not None and (line_selection._view.type == bytes2str(VIEW_TYPE_NUC_SEQS))) :
|
(line_selection is not None and (line_selection._view.type == bytes2str(VIEW_TYPE_NUC_SEQS))) :
|
||||||
view_type = bytes2str(VIEW_TYPE_NUC_SEQS)
|
view_type = bytes2str(VIEW_TYPE_NUC_SEQS)
|
||||||
view_class = OBIView_NUC_SEQS
|
view_class = OBIView_NUC_SEQS
|
||||||
|
Reference in New Issue
Block a user