Commit 02a54795 by Eric Coissac

Some cleaning and forgotten commits

parent 381bd23b
/ORG.asm.egg-info/
/.DS_Store
/__pycache__/
/.DS_Store
/__init__.pyc
......@@ -13,6 +13,6 @@ The :py:mod:`orgasm.assembler` python package provide the :class:`Assembler` cla
which manage the assembling process.
"""
from ._assembler import Assembler
from ._assembler import buildstem
from ._tango import tango
from ._assembler import Assembler # @UnresolvedImport
from ._assembler import buildstem # @UnresolvedImport
from ._tango import tango,getusedreads # @UnresolvedImport
......@@ -34,6 +34,10 @@ cdef float isgrowing(list lastseeds):
return p / llast
cdef set __used_reads__ = set()
cpdef set getusedreads():
return __used_reads__
cpdef AsmbGraph tango(Assembler self,
list seeds,
......@@ -45,6 +49,7 @@ cpdef AsmbGraph tango(Assembler self,
maxjump=0,restrict=None,
int cycle=1, int nodeLimit=1000000,
bint progress=True,
bint useonce=True,
logger=None):
'''
the :py:func:`~organsm.assembler.tango` function is the main assembling function. It extends selected
......@@ -149,6 +154,10 @@ cpdef AsmbGraph tango(Assembler self,
# We pop one seed from the stack
readid,(gene,),sdelta = seeds.pop()
if useonce:
__used_reads__.add(readid)
if sdelta < delta:
delta = sdelta
......@@ -327,9 +336,10 @@ cpdef AsmbGraph tango(Assembler self,
# print "linked"
else:
# print "not linked"
seeds.append((nodeindexE,(None,),int(delta)))
addedseed+=1
if not useonce or nodeindexE not in __used_reads__:
seeds.append((nodeindexE,(None,),int(delta)))
addedseed+=1
#
# extends the read on the left side
# which is equivalent to extend on the right side
......@@ -352,8 +362,9 @@ cpdef AsmbGraph tango(Assembler self,
# edges[1]['label']="%s (%d)" % (edges[1]['ext'],coverage)
# edges[2]['label']="%s (%d)" % (edges[2]['ext'],coverage)
else:
seeds.append((nodeindexE,(None,),int(delta)))
addedseed+=1
if not useonce or nodeindexE not in __used_reads__:
seeds.append((nodeindexE,(None,),int(delta)))
addedseed+=1
lastseeds.append((len(lextensions)+len(rextensions))/2.)
if PyList_GET_SIZE(lastseeds) > 1000:
......
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