diff --git a/src/chanjo2/endpoints/overview.py b/src/chanjo2/endpoints/overview.py index 8b95034a..515d46e0 100644 --- a/src/chanjo2/endpoints/overview.py +++ b/src/chanjo2/endpoints/overview.py @@ -107,6 +107,8 @@ async def gene_overview( get_gene_overview_coverage_stats(form_data=validated_form, session=db) ) + print(gene_overview_content) + return templates.TemplateResponse( request=request, name="gene-overview.html", context=gene_overview_content ) diff --git a/src/chanjo2/meta/handle_report_contents.py b/src/chanjo2/meta/handle_report_contents.py index 8e593483..784cbb18 100644 --- a/src/chanjo2/meta/handle_report_contents.py +++ b/src/chanjo2/meta/handle_report_contents.py @@ -217,6 +217,7 @@ def get_gene_overview_coverage_stats(form_data: GeneReportForm, session: Session build=form_data.build, hgnc_id=form_data.hgnc_gene_id, db=session ) if gene is None: + gene_stats["gene"] = {"hgnc_id": form_data.hgnc_gene_id} return gene_stats gene_stats["gene"] = gene diff --git a/src/chanjo2/templates/gene-overview.html b/src/chanjo2/templates/gene-overview.html index 1b1d1f40..d1a6f804 100644 --- a/src/chanjo2/templates/gene-overview.html +++ b/src/chanjo2/templates/gene-overview.html @@ -58,7 +58,10 @@

Gene: {{ gene.hgnc_symbol or gene.hgnc_id }}


+ {% else %} + No intervals found in database for gene {{gene.hgnc_symbol or gene.hgnc_id}}. {% endfor %} + {% endmacro %} {% block title %}