Commit ce8a9a7a by Eric Coissac

Swich to the new version of the progress bar

parent 089f0892
# cython: language_level=3
from ._ahocorasick cimport *
from orgasm.utils._progress cimport progressBar
from orgasm.apps.progress cimport ProgressBar
from orgasm.utils.dna import reverseComplement
from ._bitvector cimport BitVector
......@@ -977,6 +978,7 @@ cdef class ProtAhoCorasick(AhoCorasick):
cdef size_t offset
cdef double* shanonTable = buildShanonTable(readsize,&offset)
cdef double* shanonLine
cdef ProgressBar pb
# mid is the number of read frame globally available for each
# protein stored in the automata
......@@ -997,7 +999,8 @@ cdef class ProtAhoCorasick(AhoCorasick):
nuc4 = records + i * (recordsize)
if (progress):
progressBar(1,readcount,True)
pb=ProgressBar(readcount)
# progressBar(1,readcount,True)
while i < readcount:
......@@ -1100,7 +1103,7 @@ cdef class ProtAhoCorasick(AhoCorasick):
i+=1
if (progress):
progressBar(i,readcount)
pb(i)
while (i< readcount and
samereads(nuc4, nuc4bis, readsize64)):
......@@ -1269,7 +1272,7 @@ cdef class NucAhoCorasick(AhoCorasick):
nuc4 = records + i * (recordsize)
if (progress):
progressBar(1,readcount,True)
pb=ProgressBar(readcount)
while i < readcount:
......@@ -1342,7 +1345,7 @@ cdef class NucAhoCorasick(AhoCorasick):
i+=1
if (progress):
progressBar(i,readcount)
pb(i)
while (i< readcount and
samereads(nuc4, nuc4bis, readsize64)):
......
......@@ -3,7 +3,7 @@
from collections import Counter
from orgasm.utils._progress cimport progressBar
from orgasm.apps.progress cimport ProgressBar
from ._dynamic cimport EndGapFree
from orgasm.indexer._orgasm cimport Index
from collections import Counter
......@@ -177,6 +177,7 @@ cdef list alignReads(readids,Index index,size_t kmer=12,int smin=10,size_t delta
cdef size_t h2
cdef bytes s
cdef int j # @DuplicatedSignature
cdef ProgressBar pb
# We dereplicate the sequences
for j in readids:
......@@ -191,12 +192,12 @@ cdef list alignReads(readids,Index index,size_t kmer=12,int smin=10,size_t delta
nali = nseq * (nseq-1) // 2
hashes =[hashSeq(s,kmer) for s in seqs]
progressBar(1,nali,reset=True,head=bytes("Pairwise alignment %6d x %6d " % (0,0),encoding='ascii'))
pb = ProgressBar(nali,head="Pairwise alignment %6d x %6d " % (0,0))
for h1 in range(nseq):
for h2 in range(h1+1,nseq):
progressBar(pos,nali,reset=False,head=bytes("Pairwise alignment %6d x %6d " % (h1,h2),encoding='ascii'))
pb.head="Pairwise alignment %6d x %6d " % (h1,h2)
pb(pos)
pos+=1
ali = alignSequence(seqs[h1],seqs[h2],
......
major = 0
minor = '2'
serial= '01'
serial= '02'
version = "%d.%s.%s" % (major,minor,serial)
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