Commit e48ad513 by Eric Coissac

Fix a bug in oneXcoverage

parent 188bb558
......@@ -1675,10 +1675,13 @@ def oneXcoverage(assgraph):
for e in assgraph.edgeIterator():
attr = assgraph.getEdgeAttr(*e)
if 'path' in attr and attr['stemid'] > 0 and len(attr['path']) > readSize:
if attr['class'] == "sequence" and len(attr['path']) > readSize:
path = attr['path']
cov = [assgraph.assembler.graph.getNodeAttr(i,)['coverage'] for i in path]
cov = [assgraph.assembler.graph.getNodeAttr(i,)['coverage']
for i in path
if i > 0
]
s=0
c = 0
for i in range(len(cov)):
......@@ -2557,12 +2560,12 @@ def path2sam(self,assgraph,path,identifier="contig",minlink=10,nlength=20,back=2
tlen=0
flag=0
flag |= 0x01 # template having multiple segments in sequencing
# All our reads are paired
flag |= 0x01 # template having multiple segments in sequencing
# All our reads are paired
if paired_mapped:
flag |= 0x02 # each segment properly aligned according to the aligner
# paired read is part of the assembly
flag |= 0x02 # each segment properly aligned according to the aligner
# paired read is part of the assembly
if rid > 0:
flag |= 0x40 # the first segment in the template
flag |= 0x20 # SEQ of the next segment in the template being reverse complemented
......
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