def fixedWigIterator(fd, verbose=False, sortedby=None, scoreType=int):
fh = openFD(fd)<EOL>if verbose:<EOL><INDENT>try:<EOL><INDENT>pind = ProgressIndicator(totalToDo=os.path.getsize(fh.name),<EOL>messagePrefix="<STR_LIT>",<EOL>messageSuffix="<STR_LIT>" + fh.name)<EOL><DEDENT>except AttributeError:<EOL><INDENT>sys.stderr.write("<STR_LIT>"<EOL>+ "<STR_LIT>")<EOL>verbose = False<EOL><DEDENT><DEDENT>chromsSeen = set()<EOL>prev = None<EOL>currentChrom, at, step = None, None, None<EOL>for line in fh:<EOL><INDENT>line = line.strip()<EOL>if line == "<STR_LIT>":<EOL><INDENT>continue<EOL><DEDENT>if line[<NUM_LIT:0>] == '<STR_LIT:t>' or line[<NUM_LIT:0>] == '<STR_LIT:f>':<EOL><INDENT>parts = line.split()<EOL>if parts[<NUM_LIT:0>] == "<STR_LIT>":<EOL><INDENT>continue<EOL><DEDENT>elif parts[<NUM_LIT:0>] == "<STR_LIT>":<EOL><INDENT>currentChrom = parts[<NUM_LIT:1>].split("<STR_LIT:=>")[<NUM_LIT:1>]<EOL>at = int(parts[<NUM_LIT:2>].split("<STR_LIT:=>")[<NUM_LIT:1>])<EOL>step = int(parts[<NUM_LIT:3>].split("<STR_LIT:=>")[<NUM_LIT:1>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>val = float(line)<EOL>e = GenomicInterval(currentChrom, at, at + step, None,<EOL>val, scoreType=scoreType)<EOL>if prev is not None and sortedby is not None and e.chrom == prev.chrom:<EOL><INDENT>if sortedby == ITERATOR_SORTED_START and prev.start > e.start:<EOL><INDENT>raise WigIteratorError("<STR_LIT>" + fd.name<EOL>+ "<STR_LIT>"<EOL>+ str(prev) + "<STR_LIT>" + str(e))<EOL><DEDENT><DEDENT>if prev is not None and prev.chrom != e.chrom:<EOL><INDENT>if (sortedby == ITERATOR_SORTED_START) and(e.chrom in chromsSeen or prev.chrom > e.chrom):<EOL><INDENT>raise WigIteratorError("<STR_LIT>" + fd.name<EOL>+ "<STR_LIT>")<EOL><DEDENT>chromsSeen.add(e.chrom)<EOL><DEDENT>yield e<EOL>prev = e<EOL>at += step<EOL>if verbose :<EOL><INDENT>pind.done = fh.tell()<EOL>pind.showProgress()<EOL><DEDENT><DEDENT><DEDENT>
@summary: