# Path: ariba/report.py
# class Error (Exception): pass
# def header_line():
# def _samtools_depths_at_known_snps_all_wild(sequence_meta, contig_name, cluster, variant_list):
# def _report_lines_for_one_contig(cluster, contig_name, ref_cov_per_contig, pymummer_variants):
# def report_lines(cluster):
# 
# Path: ariba/flag.py
# class Error (Exception): pass
# class Flag:
#     def __init__(self, n=0):
#     def set_flag(self, n):
#     def add(self, f):
#     def to_number(self):
#     def __eq__(self, other):
#     def __str__(self):
#     def to_long_string(self):
#     def has(self, s):
#     def to_comma_separated_string(self):


import pyfastaq
from ariba import report, flag
        for f in exclude_flags:
            if flag.has(f):
                return False
        return True


    def _report_dict_passes_non_essential_filters(self, report_dict):
        # known_var == '.' iff this line is not reporting a variant. Which means it passes all non-essential filters
        if report_dict.get('known_var', '.') == '.':
            return True

        if self.remove_synonymous_snps and report_dict.get('ref_ctg_effect', None) == 'SYN':
            return False

        if self.ignore_not_has_known_variant and report_dict['known_var'] == '1' and report_dict['has_known_var'] == '0':
            return False

        return True


    def _report_dict_passes_essential_filters(self, report_dict):
        return ReportFilter._flag_passes_filter(report_dict['flag'], self.exclude_flags) \
                   and report_dict['pc_ident'] >= self.min_pc_ident \
                   and report_dict['ref_base_assembled'] >= self.min_ref_base_assembled


    def _filter_list_of_dicts(self, dicts_list):
        if len(dicts_list) == 0:
            return []


# Path: ariba/report.py
# class Error (Exception): pass
# def header_line():
# def _samtools_depths_at_known_snps_all_wild(sequence_meta, contig_name, cluster, variant_list):
# def _report_lines_for_one_contig(cluster, contig_name, ref_cov_per_contig, pymummer_variants):
# def report_lines(cluster):
# 
# Path: ariba/flag.py
# class Error (Exception): pass
# class Flag:
#     def __init__(self, n=0):
#     def set_flag(self, n):
#     def add(self, f):
#     def to_number(self):
#     def __eq__(self, other):
#     def __str__(self):
#     def to_long_string(self):
#     def has(self, s):
#     def to_comma_separated_string(self):


# Path: ariba/report_filter.py
import pyfastaq
from ariba import report, flag

        for f in exclude_flags:
            if flag.has(f):
                return False
        return True


    def _report_dict_passes_non_essential_filters(self, report_dict):
        # known_var == '.' iff this line is not reporting a variant. Which means it passes all non-essential filters
        if report_dict.get('known_var', '.') == '.':
            return True

        if self.remove_synonymous_snps and report_dict.get('ref_ctg_effect', None) == 'SYN':
            return False

        if self.ignore_not_has_known_variant and report_dict['known_var'] == '1' and report_dict['has_known_var'] == '0':
            return False

        return True


    def _report_dict_passes_essential_filters(self, report_dict):
        return ReportFilter._flag_passes_filter(report_dict['flag'], self.exclude_flags) \
                   and report_dict['pc_ident'] >= self.min_pc_ident \
                   and report_dict['ref_base_assembled'] >= self.min_ref_base_assembled


    def _filter_list_of_dicts(self, dicts_list):
        if len(dicts_list) == 0:
            return []


        pass_dicts = []