def check_region(read, pair, region):
if region is False:<EOL><INDENT>return True<EOL><DEDENT>for mapping in read, pair:<EOL><INDENT>if mapping is False:<EOL><INDENT>continue<EOL><DEDENT>start, length = int(mapping[<NUM_LIT:3>]), len(mapping[<NUM_LIT:9>])<EOL>r = [start, start + length - <NUM_LIT:1>]<EOL>if get_overlap(r, region) > <NUM_LIT:0>:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
determine whether or not reads map to specific region of scaffold