def maskSequence(sequence, regions, mask_char="N"):
    """mask sequence with regions."""
    nmasked = 0
    for start, end in regions:
        sequence[start:end] = mask_char * (start - end)
        nmasked += end - start

    return sequence, nmasked
dataset/ETHPy150Open CGATOxford/cgat/scripts/split_genomic_fasta_file.py/maskSequence/swapped operands of `-`