def merge(self, features, ignore_strand=False):
        features = list(features)
        if len(features) == 0:
            raise StopIteration
        if ignore_strand:
            strand = '.'
        else:
            strands = [i.strand for i in features]
            if len(set(strands)) > 1:
                raise ValueError('Specify ignore_strand=True to force merging '
                                 'of multiple strands')
            strand = strands[0]
        chroms = [i.chrom for i in features]
        if len(set(chroms)) > 1:
            raise NotImplementedError('Merging multiple chromosomes not '
                                      'implemented')
        chrom = chroms[0]
        current_merged_start = features[0].start
        current_merged_stop = features[0].stop
        for feature in features[1:]:
            if feature.start <= current_merged_stop + 1:
                if feature.stop >= current_merged_stop:
                    current_merged_stop = feature.stop
                else:
                    continue
            else:
                merged_feature = dict(
                    seqid=feature.chrom,
                    source='.',
                    featuretype=feature.featuretype,
                    start=current_merged_start,
                    end=current_merged_stop,
                    score='.',
                    strand=strand,
                    frame='.',
                    attributes='')
                yield self._feature_returner(**merged_feature)
                current_merged_start = feature.start
                current_merged_stop = feature.stop
        if len(features) == 1:
            feature = features[0]
        merged_feature = dict(
            seqid=feature.chrom,
            source='.',
            featuretype=feature.featuretype,
            start=current_merged_start,
            end=current_merged_stop,
            score='.',
            strand=strand,
            frame='.',
            attributes='')
        yield self._feature_returner(**merged_feature)