def __split_genomic_interval_filename(fn):
if fn is None or fn == "<STR_LIT>":<EOL><INDENT>raise ValueError("<STR_LIT>" + str(fn))<EOL><DEDENT>fn = "<STR_LIT:.>".join(fn.split("<STR_LIT:.>")[:-<NUM_LIT:1>])<EOL>parts = fn.split("<STR_LIT::>")<EOL>if len(parts) == <NUM_LIT:1>:<EOL><INDENT>return (parts[<NUM_LIT:0>].strip(), None, None)<EOL><DEDENT>else:<EOL><INDENT>r_parts = parts[<NUM_LIT:1>].split("<STR_LIT:->")<EOL>if len(r_parts) != <NUM_LIT:2>:<EOL><INDENT>raise ValueError("<STR_LIT>" + str(fn))<EOL><DEDENT>return (parts[<NUM_LIT:0>].strip(), int(r_parts[<NUM_LIT:0>]), int(r_parts[<NUM_LIT:1>]))<EOL><DEDENT>
Split a filename of the format chrom:start-end.ext or chrom.ext (full chrom).

:return: tuple of (chrom, start, end) -- 'start' and 'end' are None if not
         present in the filename.