def htt(args):
    """
    %prog htt bamfile chr4:3070000-3080000

    Extract HTT region and run lobSTR.
    """
    from jcvi.formats.sam import get_minibam

    p = OptionParser(htt.__doc__)
    p.set_home("lobstr")
    opts, args = p.parse_args(args)

    if len(args) != 2:
        sys.exit(not p.print_help())

    bamfile, region = args
    lhome = opts.lobstr_home

    minibamfile = get_minibam(bamfile, region)
    c = region.split(":")[0].replace("chr", "")
    cmd, vcf = allelotype_on_chr(minibamfile, c, lhome, "hg38")
    sh(cmd)
dataset/ETHPy150Open tanghaibao/jcvi/variation/str.py/htt/original