Commit 8a6849e8 by Eric Coissac

increase logged information

parent 8a69d340
......@@ -26,7 +26,8 @@ default_config = { 'minread' : None,
'smallbranches' : None,
'lowcomplexity' : False,
'snp' : False,
'assmax' : 500000
'assmax' : 500000,
'testrun' : 15000
}
def addOptions(parser):
......@@ -159,30 +160,38 @@ def run(config):
snp=config['buildgraph']['snp']
assmax = config['buildgraph']['assmax']*2
logger.info("Building De Bruinj Graph")
minoverlap = config['buildgraph']['minoverlap']
logger.info('Minimum overlap between read: %d' % minoverlap)
r = getIndex(config)
adapterSeq3, adapterSeq5 = getAdapters(config)
coverage,x = getSeeds(r,config)
ecoverage,x = getSeeds(r,config)
logger.info('Coverage estimated from probe matches at : %d' % ecoverage)
# Force the coverage to the specified value
if coverageset:
coverage = config['buildgraph']['coverage']
logger.info('Coverage forced by user at : %d' % coverage)
else:
coverage = ecoverage
# according to the minread option estimate it from coverage or use the specified value
if config['buildgraph']['minread'] is None:
minread,minoverlap = estimateMinRead(r,
config['buildgraph']['minoverlap'],
minoverlap,
coverage)
logger.info('Minimum read estimated from coverage (%dx) ar: %d' % (coverage,minread))
else:
minread = config['buildgraph']['minread']
minoverlap = config['buildgraph']['minoverlap']
logger.info("estimated coverage : %d based on probe match (minread: %d)" % (coverage,minread))
logger.info('Minimum read forced by user at : %d' % minread)
# Convert matches in sedd list
s = matchtoseed(x,r)
......@@ -198,6 +207,8 @@ def run(config):
##########################
if config['buildgraph']['minread'] is None and not coverageset:
logger.info('Assembling of %d pb for estimating actual coverage' % config['buildgraph']['testrun'])
# Run the first assembling pass
a = tango(asm,s,mincov=minread, # @UnusedVariable
minread=minread,
......@@ -207,7 +218,7 @@ def run(config):
adapters5=adapterSeq5,
maxjump=0,
cycle=1,
nodeLimit=30000,
nodeLimit=config['buildgraph']['testrun'] * 2,
progress=progress,
logger=logger)
......@@ -237,7 +248,7 @@ def run(config):
if not coverageset:
coverage = ecoverage
minread,minoverlap = estimateMinRead(r,config['buildgraph']['minoverlap'],coverage)
logger.info("coverage estimated : %d based on %d bp (minread: %d)" %(coverage,length,minread/2))
logger.info("coverage estimated : %dx based on %d bp (minread: %d)" %(coverage,length/2,minread))
# Reinitiate the assembling for running with the estimated parameters
......@@ -253,6 +264,8 @@ def run(config):
#
#############################################
logger.info('Starting the assembling')
# Run the first assembling pass
a = tango(asm,s,mincov=coverage/4, #@UnusedVariable
minread=minread,
......@@ -304,7 +317,7 @@ def run(config):
if minread<5:
minread=5
logger.info("coverage estimated : %d based on %d bp (minread: %d)" %(coverage,length,minread))
logger.info("coverage estimated : %d based on %d bp (minread: %d)" %(coverage,length/2,minread))
meanlength,sdlength = estimateFragmentLength(asm)
......@@ -335,7 +348,7 @@ def run(config):
delta = 1
# Run the fill gap procedure
while delta > 0 or delta < -2000 :
while delta > 0 or delta < -100 :
delta = fillGaps(asm,back=back,
minread=minread,
......
......@@ -20,6 +20,7 @@ import zlib
from collections import Counter, deque
from sys import stderr
from orgasm.indexer import Index
__title__="Index a set of reads"
......@@ -536,8 +537,8 @@ def run(config):
os.system(" ".join(command))
r=Index(output)
logger.info('Count of indexed reads: %d' % len(r))
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