예제 #1
0
 def setUp(self):
     seed.init()
     # Add global setup here
     pass
예제 #2
0
파일: main.py 프로젝트: LeoPerard/sv
    epsilon = args.epsilon
    debug = logging.DEBUG if args.debug else logging.INFO

    formatter = logging.Formatter("%(asctime)s %(message)s")

    handler = logging.StreamHandler(sys.stderr)
    handler.setFormatter(formatter)
    handler.setLevel(debug)

    logger = logging.getLogger()
    logger.setLevel(debug)
    logger.addHandler(handler)

    g = sv_io.read_genome(genome)
    rds = sv_io.read_reads(reads)
    sfx = seed.init(g, rds)
    alignement.setScores(match, mismatch, insdel)

    k = int(round(math.log(len(g), 4)))
    m = len(g)
    cnt = 1
    for r in rds:
        logger.info('read %d', cnt)
        cnt += 1
        n = len(r)
        minerr = ('', '', '', float('inf'))
        for i in range(0, n-k):
            logger.debug('seed %d %s', i, r[i:i+k])
            indexes = seed.find(r[i:i+k], sfx, g)
            for idx in indexes:
                rstart = i+k
예제 #3
0
 def setUp(self):
     seed.init()
     # Add global setup here
     pass