diff --git a/bin/coverage_report_single.py b/bin/coverage_report_single.py index 800a657f..eadd3bc9 100644 --- a/bin/coverage_report_single.py +++ b/bin/coverage_report_single.py @@ -597,7 +597,7 @@ def style_cov_summary(self): - cov_summary (df): df of gene coverage stats - threshold_cols (list): list of threshold values Returns: - - gene_stats (str): HTML formatted str of gene summary df + - gene_stats (list): HTML formatted str of gene summary df - total_genes (int): total number of genes """ # rename columns for displaying in report @@ -632,7 +632,7 @@ def style_snps_cov(self, snps_cov): Args: - snps_cov (df): df of snps above / below threshold Returns: - - snps_cov (str): list of snps to render in report + - snps_cov (list): list of snps to render in report - total_snps (int): total number of snps in df """ if not snps_cov.empty: @@ -667,15 +667,11 @@ def style_snps_no_cov(snps_no_cov): Args: - snps_no_cov (df): df of snps with no coverage values Returns: - - snps_no_cov (str): list of snps for rendering in report + - snps_no_cov (list): list of snps for rendering in report - snps_out_panel (int): total number snps with no cov """ # if variants from vcf found that span exon boundaries if not snps_no_cov.empty: - # manually add div and styling around rendered table, allows - # to be fully absent from the report if the table is empty - snps_no_cov.index = np.arange(1, len(snps_no_cov) + 1) - # get number of variants to display in report snps_out_panel = len(snps_no_cov.index) diff --git a/data/templates/single_template.html b/data/templates/single_template.html index 2b24a274..fd545ea6 100644 --- a/data/templates/single_template.html +++ b/data/templates/single_template.html @@ -344,7 +344,7 @@

Coverage of Known Variants

// $total_snps is int passed from report script, set to JS snp_check var on writing to template to check against var snp_check = $total_snps if (snp_check == 0) { - document.getElementById('snps').style.display = "none"; + document.getElementById('snps').style.display = "none"; } @@ -354,7 +354,7 @@

Coverage of Known Variants

// $exon_issues is int passed from report script var exon_check = $exon_issues if (exon_check == 0) { - document.getElementById('low_exon_plots').style.display = "none"; + document.getElementById('low_exon_plots').style.display = "none"; } @@ -367,11 +367,12 @@

Coverage of Known Variants

for (i = 0; i < coll.length; i++) { coll[i].addEventListener("click", function() { this.classList.toggle("active"); + var content = this.nextElementSibling; - if (content.style.maxHeight){ - content.style.maxHeight = null; + if (content.style.maxHeight) { + content.style.maxHeight = null; } else { - content.style.maxHeight = content.scrollHeight * 2 + "px"; + content.style.maxHeight = content.scrollHeight * 2 + "px"; } }); }