Commit c93f8bc2 authored by Eric Coissac's avatar Eric Coissac

resolves #19

parent 71f93710
......@@ -1364,10 +1364,10 @@ def path2fasta(self,assgraph,path,identifier="contig",minlink=10,nlength=20,back
if oldstem[1]==stem[0]:
if logger is None:
print("Both segments %d and %d are connected (paired-end=%d frg length=%f sd=%f)" % (oldid,stemid,connected,ml,sl),
print("Both segments %d and %d are connected (paired-end=%d frg length=%f sd=%f)" % (oldid,stemid,connected,float(ml),float(sl)),
file=sys.stderr)
else:
logger.info("Both segments %d and %d are connected (paired-end=%d frg length=%f sd=%f)" % (oldid,stemid,connected,ml,sl))
logger.info("Both segments %d and %d are connected (paired-end=%d frg length=%f sd=%f)" % (oldid,stemid,connected,float(ml),float(sl)))
label.append('{connection: %d - length: %d, sd: %d}' % (connected,int(ml),int(sl)))
else:
......@@ -1380,10 +1380,10 @@ def path2fasta(self,assgraph,path,identifier="contig",minlink=10,nlength=20,back
if connected >= minlink:
if logger is None:
print(" But linked by %d pair ended links (gap length=%f sd=%f)" % (connected,glength,sl),
print(" But linked by %d pair ended links (gap length=%f sd=%f)" % (connected,float(glength),float(sl)),
file=sys.stderr)
else:
logger.info(" But linked by %d pair ended links (gap length=%f sd=%f)" % (connected,glength,sl))
logger.info(" But linked by %d pair ended links (gap length=%f sd=%f)" % (connected,float(glength),float(sl)))
if glength > 0:
seq.append(b'N'*int(glength))
slength.append(int(glength))
......@@ -1392,25 +1392,25 @@ def path2fasta(self,assgraph,path,identifier="contig",minlink=10,nlength=20,back
seq.append(self.index.getRead(stem[0],0,self.index.getReadSize()).lower())
slength.append(self.index.getReadSize())
label.append('{N-connection: %d - Gap length: %d, sd: %d}' % (connected,glength,sl))
label.append('{N-connection: %d - Gap length: %d, sd: %d}' % (connected,int(glength),int(sl)))
elif forceconnection:
if connected > 0:
glength = int(frglen-ml - self.index.getReadSize())
if logger is None:
print("Connection is forced with only %d pair ended links (gap length=%f sd=%f)" % (connected,glength,sl),
print("Connection is forced with only %d pair ended links (gap length=%f sd=%f)" % (connected,float(glength),float(sl)),
file=sys.stderr)
else:
logger.info("Connection is forced with only %d pair ended links (gap length=%f sd=%f)" % (connected,glength,sl))
logger.info("Connection is forced with only %d pair ended links (gap length=%f sd=%f)" % (connected,float(glength),float(sl)))
else:
if logger is None:
print("Connection is forced without pair ended links" % connected,
print("Connection is forced without pair ended links",
file=sys.stderr)
else:
logger.info("Connection is forced without pair ended links" % connected)
logger.info("Connection is forced without pair ended links")
glength = nlength
......@@ -1418,7 +1418,7 @@ def path2fasta(self,assgraph,path,identifier="contig",minlink=10,nlength=20,back
seq.append(self.index.getRead(stem[0],0,self.index.getReadSize()).lower())
slength.append(self.index.getReadSize())
if connected > 0:
label.append('{F-connection: %d - Gap length: %d, sd: %d}' % connected)
label.append('{F-connection: %d - Gap length: %d, sd: %d}' % (connected,int(glenth),int(sl)))
else:
label.append('{F-connection: %d}' % connected)
flink = assgraph.addEdge(oldstem[1],stem[0])
......@@ -1479,10 +1479,10 @@ def path2fasta(self,assgraph,path,identifier="contig",minlink=10,nlength=20,back
if logger is None:
print("Path is circular but disconnected" ,file=sys.stderr)
print(" But linked by %d pair ended links (gap length=%f sd=%f)" % (connected,glength,sl),file=sys.stderr)
print(" But linked by %d pair ended links (gap length=%f sd=%f)" % (connected,float(glength),float(sl)),file=sys.stderr)
else:
logger.info("Path is circular but disconnected")
logger.info("Linked by %d pair ended links (gap length=%f sd=%f)" % (connected,glength,sl))
logger.info("Linked by %d pair ended links (gap length=%f sd=%f)" % (connected,float(glength),float(sl)))
label.append('{N-connection: %d}' % connected)
seq.append(b'N'* int(glength))
......
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