Commit 7b2d3ed8 by Eric Coissac

Add a new `--maxfillgaps` option to limit the number of fillgaps cycle

and avoid infinite loop with some rare dataset
parent 9f230ba3
......@@ -32,7 +32,8 @@ default_config = { 'reformat' : False,
'assmax' : 500000,
'testrun' : 15000,
'clean' : False,
'forceseeds' : False
'forceseeds' : False,
'maxfillgaps' : -1
}
def addOptions(parser):
......@@ -85,6 +86,12 @@ def addOptions(parser):
default=None,
help='maximum base pair assembled')
parser.add_argument('--maxfillgaps', dest='buildgraph:maxfillgaps',
type=int,
action='store',
default=None,
help='maximum cycles of fillgaps')
parser.add_argument('--minoverlap', dest='buildgraph:minoverlap',
type=int,
action='store',
......@@ -517,10 +524,12 @@ def run(config):
###################################################
delta = 1
maxfillgaps=config['buildgraph']['maxfillgaps']
fillcycle=0
# Run the fill gap procedure
while delta > 0 or delta < -100 :
while (delta > 0 or delta < -100) and (maxfillgaps < 0 or fillcycle < maxfillgaps ):
fillcycle+=1
# intermediate graph are saved before each gap filling step
dumpGraph(output+'.intermediate.oax',asm)
......
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