def parse_gatk_varianteval(self):
        """ Find GATK varianteval logs and parse their data """

        self.gatk_varianteval = dict()
        for f in self.find_log_files('gatk/varianteval', filehandles=True):
            parsed_data = parse_single_report(f['f'])
            if len(parsed_data) > 0:
                if f['s_name'] in self.gatk_varianteval:
                    log.debug("Duplicate sample name found! Overwriting: {}".format(f['s_name']))
                self.add_data_source(f, section='varianteval')
                self.gatk_varianteval[f['s_name']] = parsed_data

        # Filter to strip out ignored sample names
        self.gatk_varianteval = self.ignore_samples(self.gatk_varianteval)

        n_reports_found = len(self.gatk_varianteval)
        if n_reports_found > 0:
            log.info("Found {} VariantEval reports".format(n_reports_found))

            # Write parsed report data to a file (restructure first)
            self.write_data_file(self.gatk_varianteval, 'multiqc_gatk_varianteval')

            # Get consensus TiTv references
            titv_ref = None
            for s_name in self.gatk_varianteval:
                if titv_ref is None:
                    titv_ref = self.gatk_varianteval[s_name]['titv_reference']
                elif titv_ref != self.gatk_varianteval[s_name]['titv_reference']:
                    titv_ref = 'Multiple'
                    break

            # General Stats Table
            varianteval_headers = dict()
            varianteval_headers['known_titv'] = {
                'title': 'TiTV ratio (known)',
                'description': "TiTV ratio from variants found in '{}'".format(titv_ref),
                'min': 0,
                'scale': 'Blues',
                'shared_key': 'titv_ratio'
            }
            varianteval_headers['novel_titv'] = {
                'title': 'TiTV ratio (novel)',
                'description': "TiTV ratio from variants NOT found in '{}'".format(titv_ref),
                'min': 0,
                'scale': 'Blues',
                'shared_key': 'titv_ratio'
            }
            self.general_stats_addcols(self.gatk_varianteval, varianteval_headers, 'GATK VariantEval')

            # Variant Counts plot
            self.add_section (
                name = 'Variant Counts',
                anchor = 'gatk-count-variants',
                plot = count_variants_barplot(self.gatk_varianteval)
            )

            # Compare Overlap Table
            self.add_section (
                name = 'Compare Overlap',
                anchor = 'gatk-compare-overlap',
                plot = comp_overlap_table(self.gatk_varianteval)
            )

        return n_reports_found
Find GATK varianteval logs and parse their data