Check if variants follows the filters

            This function will try to make filters faster for the vcf adapter

            Args:
                vcf_file_path(str): Path to vcf
                filters (dict): A dictionary with filters

            Yields:
                varian_line (str): A vcf variant line

def _get_filtered_variants(self, vcf_file_path, filters={}):
        """Check if variants follows the filters

            This function will try to make filters faster for the vcf adapter

            Args:
                vcf_file_path(str): Path to vcf
                filters (dict): A dictionary with filters

            Yields:
                varian_line (str): A vcf variant line
        """

        genes = set()
        consequences = set()
        sv_types = set()

        if filters.get('gene_ids'):
            genes = set([gene_id.strip() for gene_id in filters['gene_ids']])

        if filters.get('consequence'):
            consequences = set(filters['consequence'])

        if filters.get('sv_types'):
            sv_types = set(filters['sv_types'])

        logger.info("Get variants from {0}".format(vcf_file_path))

        if filters.get('range'):
            range_str = "{0}:{1}-{2}".format(
                filters['range']['chromosome'],
                filters['range']['start'],
                filters['range']['end'])

            vcf = VCF(vcf_file_path)
            handle = vcf(range_str)
        else:
            handle = VCF(vcf_file_path)

        for variant in handle:
            variant_line = str(variant)
            keep_variant = True

            if genes and keep_variant:
                keep_variant = False
                for gene in genes:
                    if "{0}".format(gene) in variant_line:
                        keep_variant = True
                        break

            if consequences and keep_variant:
                keep_variant = False
                for consequence in consequences:
                    if consequence in variant_line:
                        keep_variant = True
                        break

            if sv_types and keep_variant:
                keep_variant = False
                for sv_type in sv_types:
                    if sv_type in variant_line:
                        keep_variant = True
                        break

            if keep_variant:
                yield variant