Commit e0bf25d7 by Eric Coissac

replace _BYTES call by the new .data.as_uchars to reflect the new API

parent a4a854a2
......@@ -26,7 +26,7 @@ def indexSequences(seq,double threshold=0.95):
table = newtable()
sequence=bytes(str(seq))
overflow = buildTable(sequence,table._BYTES,&wordcount)
overflow = buildTable(sequence,table.data.as_uchars,&wordcount)
wordmin = threshold4(wordcount,threshold)
return (table,overflow,wordmin)
......@@ -34,8 +34,8 @@ cpdef int countCommonWords(array.array table1,
int overflow1,
array.array table2,
int overflow2):
return compareTable(table1._BYTES,overflow1,
table2._BYTES,overflow2)
return compareTable(table1.data.as_uchars,overflow1,
table2.data.as_uchars,overflow2)
cpdef bint isLCSReachable(object seq1,
object seq2,
......@@ -51,7 +51,7 @@ cpdef bint isLCSReachable(object seq1,
cdef array.array[unsigned char] w2
cdef int o1
cdef int o2
cdef int wordcount
cdef int wordcount # @DuplicatedSignature
cdef bint possible
cdef char *s1
......@@ -65,7 +65,7 @@ cpdef bint isLCSReachable(object seq1,
s1=se1
w1 = newtable()
o1 = buildTable(s1,w1._BYTES,&wordcount)
o1 = buildTable(s1,w1.data.as_uchars,&wordcount)
if isinstance(seq1, BioSequence):
seq1.word4table=w1
seq1.word4over=o1
......@@ -78,13 +78,13 @@ cpdef bint isLCSReachable(object seq1,
s2=se2
w2 = newtable()
o2 = buildTable(s2,w2._BYTES,&wordcount)
o2 = buildTable(s2,w2.data.as_uchars,&wordcount)
if isinstance(seq2, BioSequence) :
seq2.word4table=w2
seq2.word4over=o2
possible = ispossible(l1, w1._BYTES, o1,
l2, w2._BYTES, o2,
possible = ispossible(l1, w1.data.as_uchars, o1,
l2, w2.data.as_uchars, o2,
minimum,normalized,large)
return possible
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