Commit 9cd4c328 authored by Eric Coissac's avatar Eric Coissac

Change the estimation of the 1x coverage

parent 1d2c3667
...@@ -1827,23 +1827,11 @@ def oneXcoverage(assgraph): ...@@ -1827,23 +1827,11 @@ def oneXcoverage(assgraph):
for e in assgraph.edgeIterator(): for e in assgraph.edgeIterator():
attr = assgraph.getEdgeAttr(*e) attr = assgraph.getEdgeAttr(*e)
if attr['class'] == "sequence" and len(attr['path']) > readSize: if attr['class'] == "sequence" and attr['length'] > readSize:
weight = attr['weight']
path = attr['path'] length = attr['length']
cov = [assgraph.assembler.graph.getNodeAttr(i,)['coverage'] icov.append((weight,length))
for i in path return weightedMode(icov)
if i > 0
]
s=0
c = 0
for i in range(len(cov)):
c+=cov[i]
s+=1
if s > readSize:
icov.append(c)
s-=1
c-=cov[i-readSize]
return mode(icov)
def unfoldAssembling(self,assgraph,constraints=None, def unfoldAssembling(self,assgraph,constraints=None,
seeds=None,threshold=5.,back=500, seeds=None,threshold=5.,back=500,
......
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