def append(args):
    p = OptionParser(append.__doc__)
    opts, args = p.parse_args(args)

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

    bamfile, = args
    icmd = "samtools view -h {0}".format(bamfile)
    bamfile = bamfile.rsplit(".", 1)[0] + ".append.bam"
    ocmd = "samtools view -b -@ 64 - -o {0}".format(bamfile)
    p = Popen(ocmd, stdin=PIPE)
    for row in popen(icmd):
        if row[0] == '@':
            print >> p.stdin, row.strip()
        else:
            s = SamLine(row)
            s.update_readname()
            print >> p.stdin, s
After the user selects a remote, display a panel of branches that are
dataset/ETHPy150Open tanghaibao/jcvi/formats/sam.py/append--crossover with--dataset/ETHPy150Open divmain/GitSavvy/github/commands/pull_request.py/GsCreatePullRequestCommand.on_select_remote