def write_read(read, chrom, out):
    if not read.is_unmapped:
        out.write((chrom, read.pos, read.aend, read.qname, '-' if read.is_reverse else '+') % '%s\t%s\t%s\t%s\t0\t%s\n')
dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/bam/tobed.py/write_read/swapped operands of `%`