

def mito(args):
    '\n    %prog mito input.bam chrM chrM.fa\n\n    Identify mitochondrial deletions.\n    '
    from jcvi.formats.sam import get_minibam
    p = OptionParser(mito.__doc__)
    p.set_cpus()
    (opts, args) = p.parse_args(args)
    if (len(args) != 3):
        sys.exit((not p.print_help()))
    (inputbam, region, chrMfa) = args
    minibam = get_minibam(inputbam, region)
    realign = (minibam.rsplit('.', 1)[0] + '.realign')
    cmd = 'speedseq realign -v -t {}'.format(opts.cpus)
    cmd += ' -o {} {} {}'.format(realign, chrMfa, minibam)
    sh(cmd)

dataset/ETHPy150Open tanghaibao/jcvi/variation/delly.py mito/original