def getVariantAnnotations(self, referenceName, startPosition, endPosition):
        """
        Generator for iterating through variant annotations in this
        variant annotation set.
        :param referenceName:
        :param startPosition:
        :param endPosition:
        :return: generator of protocol.VariantAnnotation
        """
        if referenceName in self._chromFileMap:
            varFileName = self._chromFileMap[referenceName]
            referenceName, startPosition, endPosition = \
                self.sanitizeVariantFileFetch(
                    referenceName, startPosition, endPosition)
            cursor = self.getFileHandle(varFileName).fetch(
                referenceName, startPosition, endPosition)
            transcriptConverter = self.convertTranscriptEffectSnpEff
            if self._isVep and not self._isCsq:
                transcriptConverter = self.convertTranscriptEffectVEP
            elif self._isCsq:
                transcriptConverter = self.convertTranscriptEffectCSQ
            for record in cursor:
                yield self.convertVariantAnnotation(
                    record, transcriptConverter)
dataset/ETHPy150Open ga4gh/server/ga4gh/datamodel/variants.py/HtslibVariantAnnotationSet.getVariantAnnotations/original