def ngmlr_stdin_in_cmd(ref_fa, out_bam, nproc):
    """Return ngmlr call, read from stdin, output to bam.
    (If does not read from stdin, try -q /dev/stdin)
    """
    # NGMLR --subread-length controls minimum length of detectable alignments, default 256
    # runtime using --subread-length 50 is 1.5~2 fold longer than default (2.5 ~ 3 fold ratio)
    return """ngmlr -x pacbio -R 0.01 --max-segments 3 --subread-length 150 --no-progress --bam-fix -t {nproc} -r {ref_fa} -o {out_bam}"""\
        .format(nproc=nproc, ref_fa=ref_fa, out_bam=out_bam)