Commit 8f189075 by Celine Mercier

Cython API: changed revcomp attribute of Nuc_Seq class to is_revcomp to

be more explicit
parent 0b62619e
......@@ -15,7 +15,7 @@ cdef class Nuc_Seq(Seq) :
cdef Nuc_Seq _reverse_complement
cdef object _quality_array
cdef bint _revcomp
cdef bint _is_revcomp
cpdef set_quality(self, object new_quality, int offset=*)
cpdef object build_quality_array(self, list quality)
cpdef bytes build_reverse_complement(self)
......
......@@ -144,7 +144,7 @@ cdef class Nuc_Seq(Seq) :
if quality is not None:
self.set_quality(quality, offset=offset)
self._revcomp = False
self._is_revcomp = False
if tags is not None:
for k in tags:
......@@ -162,14 +162,14 @@ cdef class Nuc_Seq(Seq) :
new_seq = Nuc_Seq(seq_to_clone.id, seq_to_clone.seq, definition=seq_to_clone.definition, quality=seq_to_clone.quality, tags=seq_to_clone)
return new_seq
# revcomp property getter and setter (boolean indicating whether the sequence was created by reverse complementing another sequence)
# is_revcomp property getter and setter (boolean indicating whether the sequence was created by reverse complementing another sequence)
@property
def revcomp(self):
return self._revcomp
def is_revcomp(self):
return self._is_revcomp
@revcomp.setter
def revcomp(self, bint revcomp): # @DuplicatedSignature
self._revcomp = revcomp
@is_revcomp.setter
def is_revcomp(self, bint is_revcomp): # @DuplicatedSignature
self._is_revcomp = is_revcomp
# nuc sequence property getter and setter
@property
......@@ -227,7 +227,7 @@ cdef class Nuc_Seq(Seq) :
else:
reversed_quality = None
seq = Nuc_Seq(self.id+b"_CMP", rev_comp, definition=self.definition, quality=reversed_quality, tags=self)
seq.revcomp = True
seq.is_revcomp = True
self._reverse_complement = seq
return self._reverse_complement
......@@ -400,7 +400,7 @@ cdef class Nuc_Seq_Stored(Seq_Stored) :
else:
reversed_quality = None
seq = Nuc_Seq(self.id+b"_CMP", rev_comp, definition=self.definition, quality=reversed_quality, tags=self)
seq.revcomp = True
seq.is_revcomp = True
self._reverse_complement = seq
return self._reverse_complement
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment