From ed8776c44b8607904e8b8dc9291759c50e13a4fb Mon Sep 17 00:00:00 2001 From: Andy Boughton Date: Thu, 19 Dec 2019 11:07:24 -0500 Subject: [PATCH 1/2] Fix display of tooltips when -log10p=Infinity --- locuszoom_plotting_service/templates/gwas/gwas_summary.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locuszoom_plotting_service/templates/gwas/gwas_summary.html b/locuszoom_plotting_service/templates/gwas/gwas_summary.html index 8809785..7da3d3e 100644 --- a/locuszoom_plotting_service/templates/gwas/gwas_summary.html +++ b/locuszoom_plotting_service/templates/gwas/gwas_summary.html @@ -150,7 +150,7 @@

QQ Plot:

// Required as hardcoded global reference in PheWeb pheno.js window.model = { urlprefix: '{% filter add_token:token %}{% url 'gwas:region' gwas.slug %}{% endfilter %}', - tooltip_underscoretemplate: '<%- d.chrom %>:<%- d.pos.toLocaleString() %> <%- d.ref %> / <%- d.alt %>
-log10(p): <%- d.neg_log_pvalue && d.neg_log_pvalue.toFixed(3) %>
Nearest gene(s): <%- d.nearest_genes && d.nearest_genes.length && d.nearest_genes.map(function(gene) { return gene.symbol; }).join(", ") %>' + tooltip_underscoretemplate: '<%- d.chrom %>:<%- d.pos.toLocaleString() %> <%- d.ref %> / <%- d.alt %>
-log10(p): <%- d.neg_log_pvalue && (+d.neg_log_pvalue).toFixed(3) %>
Nearest gene(s): <%- d.nearest_genes && d.nearest_genes.length && d.nearest_genes.map(function(gene) { return gene.symbol; }).join(", ") %>' }; window.pheno = ''; From c69cc51a4f6a7fe07ce5e2b75c473bc08dcfdba1 Mon Sep 17 00:00:00 2001 From: Andy Boughton Date: Thu, 19 Dec 2019 11:31:34 -0500 Subject: [PATCH 2/2] Fix "top hit" calculation near start of chromosome --- locuszoom_plotting_service/taskapp/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locuszoom_plotting_service/taskapp/tasks.py b/locuszoom_plotting_service/taskapp/tasks.py index 006a1e7..d4b4a84 100644 --- a/locuszoom_plotting_service/taskapp/tasks.py +++ b/locuszoom_plotting_service/taskapp/tasks.py @@ -122,7 +122,7 @@ def summarize_gwas(self, instance: models.AnalysisFileset): gwas=instance.metadata, label='Top hit', chrom=best_row.chrom, - start=best_row.pos - 250_000, + start=max(best_row.pos - 250_000, 1), end=best_row.pos + 250_000 ) instance.metadata.top_hit_view = top_hit