'Returns an iterator that provides data in the region chrom:start-end as well as
a file offset.'

def get_iterator(self, data_file, chrom, start, end, **kwargs):

    source = open(self.original_dataset.file_name)
    line = source.readline()
    if (len(line) == 0):
        return iter([])
    dataset_chrom = line.split()[0]
    if (not _chrom_naming_matches(chrom, dataset_chrom)):
        chrom = _convert_between_ucsc_and_ensemble_naming(chrom)
    source.seek(0)
    def features_in_region_iter():
        offset = 0
        for feature in GFFReaderWrapper(source, fix_strand=True):
            (feature_start, feature_end) = convert_gff_coords_to_bed([feature.start, feature.end])
            if ((feature.chrom == chrom) and (feature_end > start) and (feature_start < end)):
                (yield (feature, offset))
            offset += feature.raw_size
    return features_in_region_iter()
