From 12124695d8ff00b609951a8bc1c546a36a999bc3 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 26 Nov 2024 09:20:26 -0500 Subject: [PATCH 01/15] feat(data-pipeline): add steps for v4 rmc --- .../gnomad_v2_regional_missense_constraint.py | 2 +- .../src/data_pipeline/pipelines/genes.py | 43 +++++++++++++++---- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py index 73621b5f0..da0d8da65 100644 --- a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py +++ b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py @@ -1,7 +1,7 @@ import hail as hl -def prepare_gnomad_v2_regional_missense_constraint(path): +def prepare_gnomad_regional_missense_constraint(path): ds = hl.read_table(path) # rename key field transcript_id to transcript to allow merging in genes pipeline diff --git a/data-pipeline/src/data_pipeline/pipelines/genes.py b/data-pipeline/src/data_pipeline/pipelines/genes.py index 96ed9e156..d0540e7c0 100644 --- a/data-pipeline/src/data_pipeline/pipelines/genes.py +++ b/data-pipeline/src/data_pipeline/pipelines/genes.py @@ -24,7 +24,7 @@ from data_pipeline.datasets.exac.exac_regional_missense_constraint import prepare_exac_regional_missense_constraint from data_pipeline.datasets.gnomad_v2.gnomad_v2_constraint import prepare_gnomad_v2_constraint from data_pipeline.datasets.gnomad_v2.gnomad_v2_regional_missense_constraint import ( - prepare_gnomad_v2_regional_missense_constraint, + prepare_gnomad_regional_missense_constraint, ) from data_pipeline.pipelines.variant_cooccurrence_counts import ( @@ -256,6 +256,9 @@ { "gtex_struct_path": pipeline.get_task("prepare_gtex_v10_expression_data"), }, + { + "exclude_v10_tissues": True, + }, ) pipeline.add_task( @@ -315,9 +318,20 @@ pipeline.add_task( "prepare_gnomad_v2_regional_missense_constraint", - prepare_gnomad_v2_regional_missense_constraint, + prepare_gnomad_regional_missense_constraint, f"/{constraint_subdir}/gnomad_v2_regional_missense_constraint.ht", - {"path": "gs://gcp-public-data--gnomad/release/2.1.1/regional_missense_constraint/gnomad_v2.1.1_rmc.ht"}, + { + "path": "gs://gcp-public-data--gnomad/release/2.1.1/regional_missense_constraint/gnomad_v2.1.1_rmc.ht", + }, +) + +pipeline.add_task( + "prepare_gnomad_v4_regional_missense_constraint", + prepare_gnomad_regional_missense_constraint, + f"/{constraint_subdir}/gnomad_v4_regional_missense_constraint.ht", + { + "path": "gs://gnomad-v4-data-pipeline/inputs/regional_missense_constraint/rmc_browser.ht", + }, ) ############################################### @@ -377,7 +391,7 @@ def annotate_with_preferred_transcript(table_path): "exac_constraint": pipeline.get_task("prepare_exac_constraint"), "exac_regional_missense_constraint": pipeline.get_task("prepare_exac_regional_missense_constraint"), "gnomad_constraint": pipeline.get_task("prepare_gnomad_v2_constraint"), - "gnomad_v2_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v2_regional_missense_constraint"), + "gnomad_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v2_regional_missense_constraint"), }, {"join_on": "preferred_transcript_id"}, ) @@ -469,19 +483,30 @@ def annotate_with_constraint(genes_path, constraint_path): pipeline.add_task( "annotate_grch38_genes_step_6", - reject_par_y_genes, + annotate_table, f"/{genes_subdir}/genes_grch38_annotated_6.ht", { - "genes_path": pipeline.get_task("annotate_grch38_genes_step_5"), + "table_path": pipeline.get_task("annotate_grch38_genes_step_5"), + "gnomad_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v4_regional_missense_constraint"), + }, + {"join_on": "preferred_transcript_id"}, +) + +pipeline.add_task( + "annotate_grch38_genes_step_7", + reject_par_y_genes, + f"/{genes_subdir}/genes_grch38_annotated_7.ht", + { + "genes_path": pipeline.get_task("annotate_grch38_genes_step_6"), }, ) pipeline.add_task( "remove_grch38_genes_constraint_for_release", remove_gnomad_v4_constraint, - f"/{genes_subdir}/genes_grch38_annotate_5_removed_constraint", + f"/{genes_subdir}/genes_grch38_annotate_7_removed_constraint", { - "genes_path": pipeline.get_task("annotate_grch38_genes_step_5"), + "genes_path": pipeline.get_task("annotate_grch38_genes_step_7"), }, ) @@ -548,7 +573,7 @@ def annotate_with_constraint(genes_path, constraint_path): pipeline.set_outputs( { "genes_grch37": "annotate_grch37_genes_step_5", - "genes_grch38": "annotate_grch38_genes_step_6", + "genes_grch38": "annotate_grch38_genes_step_7", "base_transcripts_grch37": "extract_grch37_transcripts", "base_transcripts_grch38": "extract_grch38_transcripts", "transcripts_grch37": "annotate_grch37_transcripts", From 4bf909abfcffd96d9afc95908f2700b6a0ca4c72 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 26 Nov 2024 15:29:57 -0500 Subject: [PATCH 02/15] feat(graphql-api): update api types --- graphql-api/src/graphql/types/gene.graphql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphql-api/src/graphql/types/gene.graphql b/graphql-api/src/graphql/types/gene.graphql index 67c967f5b..da345756f 100644 --- a/graphql-api/src/graphql/types/gene.graphql +++ b/graphql-api/src/graphql/types/gene.graphql @@ -64,7 +64,8 @@ type Gene { pext: Pext gnomad_constraint: GnomadConstraint - gnomad_v2_regional_missense_constraint: GnomadV2RegionalMissenseConstraint + # gnomad_v2_regional_missense_constraint: GnomadV2RegionalMissenseConstraint + gnomad_regional_missense_constraint: GnomadV2RegionalMissenseConstraint exac_constraint: ExacConstraint exac_regional_missense_constraint_regions: [ExacRegionalMissenseConstraintRegion!] From bd36b6684f2ad044ab8ee45fb6afa5316a6e68de Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 26 Nov 2024 15:30:16 -0500 Subject: [PATCH 03/15] DONTMERGE(graphql-api): rig genes indices --- graphql-api/src/queries/gene-queries.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/graphql-api/src/queries/gene-queries.ts b/graphql-api/src/queries/gene-queries.ts index ac7858c21..eb1d6400c 100644 --- a/graphql-api/src/queries/gene-queries.ts +++ b/graphql-api/src/queries/gene-queries.ts @@ -3,8 +3,12 @@ import { withCache } from '../cache' import { fetchAllSearchResults } from './helpers/elasticsearch-helpers' const GENE_INDICES = { - GRCh37: 'genes_grch37', - GRCh38: 'genes_grch38', + // GRCh37: 'genes_grch37', + // GRCh38: 'genes_grch38', + // GRCh37: 'genes_grch37-2024-11-15--15-23', + // GRCh38: 'genes_grch38-2024-11-20--16-28', + GRCh37: 'genes_grch37-2024-11-25--15-55', + GRCh38: 'genes_grch38-2024-11-25--19-00', } const _fetchGeneById = async (esClient: any, geneId: any, referenceGenome: any) => { From 4a1967076b3139cffb2cee52d3faef974ea2117b Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 26 Nov 2024 15:30:42 -0500 Subject: [PATCH 04/15] DONTMERGE(graphql-api): dont use gene cache to allow demo --- graphql-api/src/queries/gene-queries.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/graphql-api/src/queries/gene-queries.ts b/graphql-api/src/queries/gene-queries.ts index eb1d6400c..95a4aef0d 100644 --- a/graphql-api/src/queries/gene-queries.ts +++ b/graphql-api/src/queries/gene-queries.ts @@ -1,4 +1,4 @@ -import { withCache } from '../cache' +// import { withCache } from '../cache' import { fetchAllSearchResults } from './helpers/elasticsearch-helpers' @@ -31,11 +31,12 @@ const _fetchGeneById = async (esClient: any, geneId: any, referenceGenome: any) } } -export const fetchGeneById = withCache( - _fetchGeneById, - (_: any, geneId: any, referenceGenome: any) => `gene:${geneId}:${referenceGenome}`, - { expiration: 86400 } -) +// export const fetchGeneById = withCache( +// _fetchGeneById, +// (_: any, geneId: any, referenceGenome: any) => `gene:${geneId}:${referenceGenome}`, +// { expiration: 86400 } +// ) +export const fetchGeneById = _fetchGeneById export const fetchGeneBySymbol = async (esClient: any, geneSymbol: any, referenceGenome: any) => { const response = await esClient.search({ From 1343ab251251dfa3515218e065057122286a50ae Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 26 Nov 2024 14:52:39 -0500 Subject: [PATCH 05/15] feat(browser): update rmc with v4 --- browser/src/GenePage/GenePage.tsx | 5 +- browser/src/GenePage/GenePageContainer.tsx | 2 +- .../__snapshots__/GenePage.spec.tsx.snap | 475 ++++++++++++++++++ 3 files changed, 479 insertions(+), 3 deletions(-) diff --git a/browser/src/GenePage/GenePage.tsx b/browser/src/GenePage/GenePage.tsx index 58a054dcb..58fdd5a47 100644 --- a/browser/src/GenePage/GenePage.tsx +++ b/browser/src/GenePage/GenePage.tsx @@ -24,6 +24,7 @@ import { isExac, hasCopyNumberVariants, isV2, + isV4, } from '@gnomad/dataset-metadata/metadata' import ConstraintTable from '../ConstraintTable/ConstraintTable' import VariantCooccurrenceCountsTable, { @@ -608,9 +609,9 @@ const GenePage = ({ datasetId, gene, geneId }: Props) => { /> )} - {isV2(datasetId) && ( + {(isV2(datasetId) || isV4(datasetId)) && ( )} diff --git a/browser/src/GenePage/GenePageContainer.tsx b/browser/src/GenePage/GenePageContainer.tsx index fbb9041a7..0c9186b15 100644 --- a/browser/src/GenePage/GenePageContainer.tsx +++ b/browser/src/GenePage/GenePageContainer.tsx @@ -122,7 +122,7 @@ query ${operationName}($geneId: String, $geneSymbol: String, $referenceGenome: R obs_exp chisq_diff_null } - gnomad_v2_regional_missense_constraint { + gnomad_regional_missense_constraint { passed_qc has_no_rmc_evidence regions { diff --git a/browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap b/browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap index 5207a3b4b..9a021e324 100644 --- a/browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap +++ b/browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap @@ -1507,6 +1507,101 @@ exports[`GenePage with CNV dataset "gnomad_cnv_r4" has no unexpected changes 1`] +
+
+
+
+ + Regional missense constraint + + +
+
+
+
+ + + + This gene was not searched for evidence of regional missense constraint. See our + + + + + help page + + + + for additional information. + + + +
+
+
+
@@ -7531,6 +7626,101 @@ exports[`GenePage with SV dataset "gnomad_sv_r4" has no unexpected changes 1`] =
+
+
+
+
+ + Regional missense constraint + + +
+
+
+
+ + + + This gene was not searched for evidence of regional missense constraint. See our + + + + + help page + + + + for additional information. + + + +
+
+
+
@@ -10588,6 +10778,101 @@ exports[`GenePage with non-SV dataset "gnomad_cnv_r4" has no unexpected changes
+
+
+
+
+ + Regional missense constraint + + +
+
+
+
+ + + + This gene was not searched for evidence of regional missense constraint. See our + + + + + help page + + + + for additional information. + + + +
+
+
+
@@ -29526,6 +29811,101 @@ exports[`GenePage with non-SV dataset "gnomad_r4" has no unexpected changes 1`]
+
+
+
+
+ + Regional missense constraint + + +
+
+
+
+ + + + This gene was not searched for evidence of regional missense constraint. See our + + + + + help page + + + + for additional information. + + + +
+
+
+
@@ -32589,6 +32969,101 @@ exports[`gene page for a mitochondrial gene doesn't include a show-transcripts b
+
+
+
+
+ + Regional missense constraint + + +
+
+
+
+ + + + This gene was not searched for evidence of regional missense constraint. See our + + + + + help page + + + + for additional information. + + + +
+
+
+
From 8e5bcb2632fa936381068ccf8c5e8990e02f27fc Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Mon, 30 Jun 2025 13:21:18 -0500 Subject: [PATCH 06/15] feat(pipelines): annotate v2 rmc with liftover coords --- .../gnomad_v2_regional_missense_constraint.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py index da0d8da65..4c494a77b 100644 --- a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py +++ b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py @@ -1,7 +1,7 @@ import hail as hl -def prepare_gnomad_regional_missense_constraint(path): +def prepare_gnomad_regional_missense_constraint(path, liftover=False): ds = hl.read_table(path) # rename key field transcript_id to transcript to allow merging in genes pipeline @@ -25,6 +25,22 @@ def prepare_gnomad_regional_missense_constraint(path): p_value=ds_with_rmc.regions.p, ), ) + + if liftover: + rg37 = hl.get_reference("GRCh37") + rg38 = hl.get_reference("GRCh38") + + if not rg37.has_liftover(rg38): + chain_file_path = "gs://hail-common-references/grch38_to_grch38.over.chain.gz" + rg37.add_liftover(chain_file_path, rg38) + + ds_with_rmc = ds_with_rmc.annotate( + start=hl.liftover(ds_with_rmc.start, "GRCh38"), + stop=hl.liftover(ds_with_rmc.stop, "GRCh38"), + start_grch37=ds_with_rmc.start, + stop_grch38=ds_with_rmc.stop, + ) + ds_with_rmc = ds_with_rmc.group_by("transcript_id").aggregate(regions=hl.agg.collect(ds_with_rmc.row_value).regions) ds_with_rmc = ds_with_rmc.group_by("transcript_id").aggregate(regions_array=hl.agg.collect(ds_with_rmc.row_value)) From 85ff2610e5e26c82770daca2f73b6e2359c59ff9 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Mon, 30 Jun 2025 16:55:31 -0500 Subject: [PATCH 07/15] feat(pipelines): update v4 rmc input --- data-pipeline/src/data_pipeline/pipelines/genes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/data-pipeline/src/data_pipeline/pipelines/genes.py b/data-pipeline/src/data_pipeline/pipelines/genes.py index d0540e7c0..f9cabc2f0 100644 --- a/data-pipeline/src/data_pipeline/pipelines/genes.py +++ b/data-pipeline/src/data_pipeline/pipelines/genes.py @@ -321,7 +321,9 @@ prepare_gnomad_regional_missense_constraint, f"/{constraint_subdir}/gnomad_v2_regional_missense_constraint.ht", { - "path": "gs://gcp-public-data--gnomad/release/2.1.1/regional_missense_constraint/gnomad_v2.1.1_rmc.ht", + # "path": "gs://gcp-public-data--gnomad/release/2.1.1/regional_missense_constraint/gnomad_v2.1.1_rmc.ht", + # "path": "gs://gcp-public-data--gnomad/release/2.1.1/regional_missense_constraint/gnomad_v2.1.1_rmc.ht", + "path": "gs://gnomad-v4-data-pipeline/inputs/secondary-analyses/constraint/2025-05-19_gnomad_v2_regional_missense_constraint.ht", }, ) @@ -330,7 +332,8 @@ prepare_gnomad_regional_missense_constraint, f"/{constraint_subdir}/gnomad_v4_regional_missense_constraint.ht", { - "path": "gs://gnomad-v4-data-pipeline/inputs/regional_missense_constraint/rmc_browser.ht", + # "path": "gs://gnomad-v4-data-pipeline/inputs/regional_missense_constraint/rmc_browser.ht", + "path": "gs://gnomad-v4-data-pipeline/inputs/secondary-analyses/constraint/2025-05-19_gnomad_v4_regional_missense_constraint.ht", }, ) @@ -488,6 +491,7 @@ def annotate_with_constraint(genes_path, constraint_path): { "table_path": pipeline.get_task("annotate_grch38_genes_step_5"), "gnomad_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v4_regional_missense_constraint"), + "gnomad_v2_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v2_regional_missense_constraint"), }, {"join_on": "preferred_transcript_id"}, ) From 2eee864a5d7dd86b743dfe8c7bd8cb87f7cd3789 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Mon, 30 Jun 2025 16:56:00 -0500 Subject: [PATCH 08/15] feat(api): update v4 rmc types, es indices --- graphql-api/src/graphql/types/gene.graphql | 4 +++- graphql-api/src/queries/gene-queries.ts | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/graphql-api/src/graphql/types/gene.graphql b/graphql-api/src/graphql/types/gene.graphql index da345756f..23375031c 100644 --- a/graphql-api/src/graphql/types/gene.graphql +++ b/graphql-api/src/graphql/types/gene.graphql @@ -64,7 +64,9 @@ type Gene { pext: Pext gnomad_constraint: GnomadConstraint - # gnomad_v2_regional_missense_constraint: GnomadV2RegionalMissenseConstraint + # TODO: we've renamed this to not include the 'v2' + # but for this demo, we display them both side by side + gnomad_v2_regional_missense_constraint: GnomadV2RegionalMissenseConstraint gnomad_regional_missense_constraint: GnomadV2RegionalMissenseConstraint exac_constraint: ExacConstraint diff --git a/graphql-api/src/queries/gene-queries.ts b/graphql-api/src/queries/gene-queries.ts index 95a4aef0d..f5b251d13 100644 --- a/graphql-api/src/queries/gene-queries.ts +++ b/graphql-api/src/queries/gene-queries.ts @@ -5,10 +5,15 @@ import { fetchAllSearchResults } from './helpers/elasticsearch-helpers' const GENE_INDICES = { // GRCh37: 'genes_grch37', // GRCh38: 'genes_grch38', + // TODO: Winter 2024 v4 RMC indices 1 // GRCh37: 'genes_grch37-2024-11-15--15-23', // GRCh38: 'genes_grch38-2024-11-20--16-28', - GRCh37: 'genes_grch37-2024-11-25--15-55', - GRCh38: 'genes_grch38-2024-11-25--19-00', + // TODO: Winter 2024 v4 RMC indices 2 + // GRCh37: 'genes_grch37-2024-11-25--15-55', + // GRCh38: 'genes_grch38-2024-11-25--19-00', + // TODO: June 2025 v4 RMC indices + GRCh37: 'genes_grch37-2025-06-30--21-15', + GRCh38: 'genes_grch38-2025-06-30--21-13', } const _fetchGeneById = async (esClient: any, geneId: any, referenceGenome: any) => { From 2703de3dec9931c76afcf1720261f72ce3d6fe96 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 1 Jul 2025 13:06:08 -0500 Subject: [PATCH 09/15] feat(pipelines): update pipelines for v4 rmc demo --- .../gnomad_v2_regional_missense_constraint.py | 203 ++++++++++++++++-- .../src/data_pipeline/pipelines/genes.py | 36 +++- 2 files changed, 220 insertions(+), 19 deletions(-) diff --git a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py index 4c494a77b..30331087e 100644 --- a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py +++ b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py @@ -1,7 +1,11 @@ import hail as hl -def prepare_gnomad_regional_missense_constraint(path, liftover=False): +# TODO: temp, just for v2 track to show with v4 +# need to: +# - liftover regions +# - key by gene_id instead of transcript for a better join +def prepare_gnomad_regional_missense_constraint_liftover(path): ds = hl.read_table(path) # rename key field transcript_id to transcript to allow merging in genes pipeline @@ -13,6 +17,8 @@ def prepare_gnomad_regional_missense_constraint(path, liftover=False): ds_with_rmc = ds_with_rmc.explode("regions") ds_with_rmc = ds_with_rmc.select( regions=hl.struct( + start_locus=ds_with_rmc.regions.start_coordinate, + stop_locus=ds_with_rmc.regions.stop_coordinate, chrom=ds_with_rmc.regions.start_coordinate.contig, start=hl.min(ds_with_rmc.regions.start_coordinate.position, ds_with_rmc.regions.stop_coordinate.position), stop=hl.max(ds_with_rmc.regions.start_coordinate.position, ds_with_rmc.regions.stop_coordinate.position), @@ -26,20 +32,189 @@ def prepare_gnomad_regional_missense_constraint(path, liftover=False): ), ) - if liftover: - rg37 = hl.get_reference("GRCh37") - rg38 = hl.get_reference("GRCh38") + # --- + # liftover coordinates + # --- + + # print("running liftover!") + rg37 = hl.get_reference("GRCh37") + rg38 = hl.get_reference("GRCh38") + + if not rg37.has_liftover(rg38): + chain_file_path = "gs://hail-common/references/grch37_to_grch38.over.chain.gz" + rg37.add_liftover(chain_file_path, rg38) + + ds_with_rmc = ds_with_rmc.select( + regions=hl.struct( + start_locus_grch38=hl.liftover(ds_with_rmc.regions.start_locus, "GRCh38"), + stop_locus_grch38=hl.liftover(ds_with_rmc.regions.stop_locus, "GRCh38"), + chrom_grch37=ds_with_rmc.regions.chrom, + start_grch37=ds_with_rmc.regions.start, + stop_grch37=ds_with_rmc.regions.stop, + aa_start=ds_with_rmc.regions.aa_start, + aa_stop=ds_with_rmc.regions.aa_stop, + obs_mis=ds_with_rmc.regions.obs_mis, + exp_mis=ds_with_rmc.regions.exp_mis, + obs_exp=ds_with_rmc.regions.obs_exp, + chisq_diff_null=ds_with_rmc.regions.chisq_diff_null, + p_value=ds_with_rmc.regions.p_value, + ), + ) + ds_with_rmc = ds_with_rmc.select( + regions=hl.struct( + chrom=ds_with_rmc.regions.start_locus_grch38.contig, + start=hl.min( + ds_with_rmc.regions.start_locus_grch38.position, ds_with_rmc.regions.stop_locus_grch38.position + ), + stop=hl.max( + ds_with_rmc.regions.start_locus_grch38.position, ds_with_rmc.regions.stop_locus_grch38.position + ), + chrom_grch37=ds_with_rmc.regions.chrom_grch37, + start_grch37=ds_with_rmc.regions.start_grch37, + stop_grch37=ds_with_rmc.regions.stop_grch37, + aa_start=ds_with_rmc.regions.aa_start, + aa_stop=ds_with_rmc.regions.aa_stop, + obs_mis=ds_with_rmc.regions.obs_mis, + exp_mis=ds_with_rmc.regions.exp_mis, + obs_exp=ds_with_rmc.regions.obs_exp, + chisq_diff_null=ds_with_rmc.regions.chisq_diff_null, + p_value=ds_with_rmc.regions.p_value, + ), + ) + + # --- + # Key by gene_id instead of transcript_id + # --- + gene_grch37_annotated_3_path = ( + "gs://gnomad-v4-data-pipeline/2025-06-30_rhg/output/genes/genes_grch37_annotated_3.ht" + ) + gene_grch37_annotated_3_ht = hl.read_table(gene_grch37_annotated_3_path) + gene_grch37_annotated_3_ht = gene_grch37_annotated_3_ht.select( + transcript_id=gene_grch37_annotated_3_ht.preferred_transcript_id, + ) + transcript_gene_join_ht = gene_grch37_annotated_3_ht.key_by("transcript_id") + + # join the two + ds_with_rmc = ds_with_rmc.annotate(**transcript_gene_join_ht[ds_with_rmc.transcript_id]) + + print("Just joined with the table!") + print(ds_with_rmc.describe()) + + ds_with_rmc = ds_with_rmc.key_by("gene_id") + ds_with_rmc = ds_with_rmc.drop("transcript_id") + + # ds_with_rmc = ds_with_rmc.group_by("transcript_id").aggregate(regions=hl.agg.collect(ds_with_rmc.row_value).regions) + ds_with_rmc = ds_with_rmc.group_by("gene_id").aggregate(regions=hl.agg.collect(ds_with_rmc.row_value).regions) + + # ds_with_rmc = ds_with_rmc.group_by("transcript_id").aggregate(regions_array=hl.agg.collect(ds_with_rmc.row_value)) + ds_with_rmc = ds_with_rmc.group_by("gene_id").aggregate(regions_array=hl.agg.collect(ds_with_rmc.row_value)) + ds_with_rmc = ds_with_rmc.annotate(has_no_rmc_evidence=hl.bool(False)) + ds_with_rmc = ds_with_rmc.annotate(passed_qc=hl.bool(True)) + ds_with_rmc = ds_with_rmc.select( + has_no_rmc_evidence=ds_with_rmc.has_no_rmc_evidence, + passed_qc=ds_with_rmc.passed_qc, + regions=hl.sorted(ds_with_rmc.regions_array[0].regions, lambda region: region.start), + ) + + print("Munging things to turn transcript list into gene list ...") + # create a hailtable with a row for every transcript included in the no_rmc set + # the browser needs to be able to distinguish between transcripts that were + # searched and had no RMC evidence, vs those that were not searched, for display + # purposes + no_rmc_set = ds.globals.transcripts_no_rmc + no_rmc_list = list(no_rmc_set.collect()[0]) + print(f"transcript list created, count is {len(no_rmc_list)}") + + no_rmc_transcripts_ht = hl.Table.parallelize( + [{"transcript_id": t} for t in no_rmc_list], hl.tstruct(transcript_id=hl.tstr), key="transcript_id" + ) + + print("Just made no_transcripts table, showing some things:") + no_rmc_transcripts_ht.describe() + no_rmc_transcripts_ht.show(5) + + no_rmc_transcripts_ht = no_rmc_transcripts_ht.annotate( + **transcript_gene_join_ht[no_rmc_transcripts_ht.transcript_id] + ) + + print("Just joined no_transcripts table, showing some things:") + no_rmc_transcripts_ht.describe() + no_rmc_transcripts_ht.show(5) + + no_rmc_set_by_gene_id = no_rmc_transcripts_ht.aggregate(hl.agg.collect_as_set(no_rmc_transcripts_ht.gene_id)) + no_rmc_list_by_gene_id = list(no_rmc_set_by_gene_id) + + print(f"gene_id set created, count is {len(no_rmc_list_by_gene_id)}") + + ds_no_rmc = hl.utils.range_table(1) + ds_no_rmc = ds_no_rmc.annotate( + # transcript_id=(hl.array(no_rmc_list)), + gene_id=(hl.array(no_rmc_list_by_gene_id)), + has_no_rmc_evidence=hl.bool(True), + passed_qc=hl.bool(False), + regions=hl.empty_array( + hl.tstruct( + chrom=hl.tstr, + start=hl.tint32, + stop=hl.tint32, + chrom_grch37=hl.tstr, + start_grch37=hl.tint32, + stop_grch37=hl.tint32, + aa_start=hl.tstr, + aa_stop=hl.tstr, + obs_mis=hl.tint64, + exp_mis=hl.tfloat64, + obs_exp=hl.tfloat64, + chisq_diff_null=hl.tfloat64, + p_value=hl.tfloat64, + ) + ), + ) + + ds_no_rmc = ds_no_rmc.explode(ds_no_rmc["gene_id"]) + ds_no_rmc = ds_no_rmc.key_by("gene_id") + ds_no_rmc = ds_no_rmc.drop("idx") + + # combine the hail table of those transcripts with evidence, and those transcripts + # searched without evidence + ds_all_searched = ds_with_rmc.union(ds_no_rmc) + + # Don't need the information in globals for the browser + ds_all_searched = ds_all_searched.select_globals() + + print("Final struct:") + print(ds_all_searched.describe()) + print(ds_all_searched.show(5)) + + return ds_all_searched + - if not rg37.has_liftover(rg38): - chain_file_path = "gs://hail-common-references/grch38_to_grch38.over.chain.gz" - rg37.add_liftover(chain_file_path, rg38) +def prepare_gnomad_regional_missense_constraint(path, liftover=False): + ds = hl.read_table(path) - ds_with_rmc = ds_with_rmc.annotate( - start=hl.liftover(ds_with_rmc.start, "GRCh38"), - stop=hl.liftover(ds_with_rmc.stop, "GRCh38"), - start_grch37=ds_with_rmc.start, - stop_grch38=ds_with_rmc.stop, - ) + # rename key field transcript_id to transcript to allow merging in genes pipeline + ds_with_rmc = ds.transmute(transcript_id=ds.transcript) + ds_with_rmc = ds_with_rmc.key_by("transcript_id") + ds_with_rmc = ds_with_rmc.drop("transcript") + + # explode then collect to rename fields for consistency with ExAC RMC + ds_with_rmc = ds_with_rmc.explode("regions") + ds_with_rmc = ds_with_rmc.select( + regions=hl.struct( + start_locus=ds_with_rmc.regions.start_coordinate, + stop_locus=ds_with_rmc.regions.stop_coordinate, + chrom=ds_with_rmc.regions.start_coordinate.contig, + start=hl.min(ds_with_rmc.regions.start_coordinate.position, ds_with_rmc.regions.stop_coordinate.position), + stop=hl.max(ds_with_rmc.regions.start_coordinate.position, ds_with_rmc.regions.stop_coordinate.position), + aa_start=ds_with_rmc.regions.start_aa, + aa_stop=ds_with_rmc.regions.stop_aa, + obs_mis=ds_with_rmc.regions.obs, + exp_mis=ds_with_rmc.regions.exp, + obs_exp=ds_with_rmc.regions.oe, + chisq_diff_null=ds_with_rmc.regions.chisq, + p_value=ds_with_rmc.regions.p, + ), + ) ds_with_rmc = ds_with_rmc.group_by("transcript_id").aggregate(regions=hl.agg.collect(ds_with_rmc.row_value).regions) @@ -59,6 +234,7 @@ def prepare_gnomad_regional_missense_constraint(path, liftover=False): no_rmc_set = ds.globals.transcripts_no_rmc no_rmc_list = list(no_rmc_set.collect()[0]) ds_no_rmc = hl.utils.range_table(1) + ds_no_rmc = ds_no_rmc.annotate( transcript_id=(hl.array(no_rmc_list)), has_no_rmc_evidence=hl.bool(True), @@ -78,6 +254,7 @@ def prepare_gnomad_regional_missense_constraint(path, liftover=False): ) ), ) + ds_no_rmc = ds_no_rmc.explode(ds_no_rmc["transcript_id"]) ds_no_rmc = ds_no_rmc.key_by("transcript_id") ds_no_rmc = ds_no_rmc.drop("idx") diff --git a/data-pipeline/src/data_pipeline/pipelines/genes.py b/data-pipeline/src/data_pipeline/pipelines/genes.py index f9cabc2f0..0ef269139 100644 --- a/data-pipeline/src/data_pipeline/pipelines/genes.py +++ b/data-pipeline/src/data_pipeline/pipelines/genes.py @@ -25,6 +25,7 @@ from data_pipeline.datasets.gnomad_v2.gnomad_v2_constraint import prepare_gnomad_v2_constraint from data_pipeline.datasets.gnomad_v2.gnomad_v2_regional_missense_constraint import ( prepare_gnomad_regional_missense_constraint, + prepare_gnomad_regional_missense_constraint_liftover, ) from data_pipeline.pipelines.variant_cooccurrence_counts import ( @@ -327,6 +328,16 @@ }, ) + +pipeline.add_task( + "prepare_gnomad_v2_regional_missense_constraint_liftover", + prepare_gnomad_regional_missense_constraint_liftover, + f"/{constraint_subdir}/gnomad_v2_regional_missense_constraint_liftover.ht", + { + "path": "gs://gnomad-v4-data-pipeline/inputs/secondary-analyses/constraint/2025-05-19_gnomad_v2_regional_missense_constraint.ht", + }, +) + pipeline.add_task( "prepare_gnomad_v4_regional_missense_constraint", prepare_gnomad_regional_missense_constraint, @@ -491,26 +502,39 @@ def annotate_with_constraint(genes_path, constraint_path): { "table_path": pipeline.get_task("annotate_grch38_genes_step_5"), "gnomad_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v4_regional_missense_constraint"), - "gnomad_v2_regional_missense_constraint": pipeline.get_task("prepare_gnomad_v2_regional_missense_constraint"), }, {"join_on": "preferred_transcript_id"}, ) + pipeline.add_task( "annotate_grch38_genes_step_7", - reject_par_y_genes, + annotate_table, f"/{genes_subdir}/genes_grch38_annotated_7.ht", { - "genes_path": pipeline.get_task("annotate_grch38_genes_step_6"), + "table_path": pipeline.get_task("annotate_grch38_genes_step_6"), + "gnomad_v2_regional_missense_constraint": pipeline.get_task( + "prepare_gnomad_v2_regional_missense_constraint_liftover" + ), + }, + # {"join_on": "gene_id"}, +) + +pipeline.add_task( + "annotate_grch38_genes_step_8", + reject_par_y_genes, + f"/{genes_subdir}/genes_grch38_annotated_8.ht", + { + "genes_path": pipeline.get_task("annotate_grch38_genes_step_7"), }, ) pipeline.add_task( "remove_grch38_genes_constraint_for_release", remove_gnomad_v4_constraint, - f"/{genes_subdir}/genes_grch38_annotate_7_removed_constraint", + f"/{genes_subdir}/genes_grch38_annotate_8_removed_constraint", { - "genes_path": pipeline.get_task("annotate_grch38_genes_step_7"), + "genes_path": pipeline.get_task("annotate_grch38_genes_step_8"), }, ) @@ -577,7 +601,7 @@ def annotate_with_constraint(genes_path, constraint_path): pipeline.set_outputs( { "genes_grch37": "annotate_grch37_genes_step_5", - "genes_grch38": "annotate_grch38_genes_step_7", + "genes_grch38": "annotate_grch38_genes_step_8", "base_transcripts_grch37": "extract_grch37_transcripts", "base_transcripts_grch38": "extract_grch38_transcripts", "transcripts_grch37": "annotate_grch37_transcripts", From 4df0e0fe93bda618b729721929d36ea02ab3e1e4 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 1 Jul 2025 13:06:28 -0500 Subject: [PATCH 10/15] feat(api): update api for v4 rmc demo --- ...nomad-regional-missense-constraint.graphql | 22 +++++++++++++++++++ graphql-api/src/graphql/types/gene.graphql | 2 +- graphql-api/src/queries/gene-queries.ts | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/graphql-api/src/graphql/types/constraint/gnomad-regional-missense-constraint.graphql b/graphql-api/src/graphql/types/constraint/gnomad-regional-missense-constraint.graphql index 310f3080f..245cbfd7d 100644 --- a/graphql-api/src/graphql/types/constraint/gnomad-regional-missense-constraint.graphql +++ b/graphql-api/src/graphql/types/constraint/gnomad-regional-missense-constraint.graphql @@ -16,3 +16,25 @@ type GnomadV2RegionalMissenseConstraint { passed_qc: Boolean regions: [GnomadV2RegionalMissenseConstraintRegion] } + +type GnomadV2RegionalMissenseConstraintRegionLiftover { + chrom: String + start: Int + stop: Int + chrom_grch37: String + start_grch37: Int + stop_grch37: Int + aa_start: String + aa_stop: String + obs_mis: Int + exp_mis: Float + obs_exp: Float + chisq_diff_null: Float + p_value: Float +} + +type GnomadV2RegionalMissenseConstraintLiftover { + has_no_rmc_evidence: Boolean + passed_qc: Boolean + regions: [GnomadV2RegionalMissenseConstraintRegionLiftover] +} diff --git a/graphql-api/src/graphql/types/gene.graphql b/graphql-api/src/graphql/types/gene.graphql index 23375031c..79d46e310 100644 --- a/graphql-api/src/graphql/types/gene.graphql +++ b/graphql-api/src/graphql/types/gene.graphql @@ -66,7 +66,7 @@ type Gene { gnomad_constraint: GnomadConstraint # TODO: we've renamed this to not include the 'v2' # but for this demo, we display them both side by side - gnomad_v2_regional_missense_constraint: GnomadV2RegionalMissenseConstraint + gnomad_v2_regional_missense_constraint: GnomadV2RegionalMissenseConstraintLiftover gnomad_regional_missense_constraint: GnomadV2RegionalMissenseConstraint exac_constraint: ExacConstraint diff --git a/graphql-api/src/queries/gene-queries.ts b/graphql-api/src/queries/gene-queries.ts index f5b251d13..008ee1643 100644 --- a/graphql-api/src/queries/gene-queries.ts +++ b/graphql-api/src/queries/gene-queries.ts @@ -13,7 +13,7 @@ const GENE_INDICES = { // GRCh38: 'genes_grch38-2024-11-25--19-00', // TODO: June 2025 v4 RMC indices GRCh37: 'genes_grch37-2025-06-30--21-15', - GRCh38: 'genes_grch38-2025-06-30--21-13', + GRCh38: 'genes_grch38-2025-07-01--16-53', } const _fetchGeneById = async (esClient: any, geneId: any, referenceGenome: any) => { From a76944b121efb00b2621e5a89f037b439aed7d5a Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Tue, 1 Jul 2025 13:06:51 -0500 Subject: [PATCH 11/15] feat(frontend): update browser for v4 rmc demo --- browser/src/GenePage/GenePage.tsx | 9 +++++++++ browser/src/GenePage/GenePageContainer.tsx | 19 +++++++++++++++++++ .../src/RegionalMissenseConstraintTrack.tsx | 16 +++++++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/browser/src/GenePage/GenePage.tsx b/browser/src/GenePage/GenePage.tsx index 58fdd5a47..ec83acc1c 100644 --- a/browser/src/GenePage/GenePage.tsx +++ b/browser/src/GenePage/GenePage.tsx @@ -611,11 +611,20 @@ const GenePage = ({ datasetId, gene, geneId }: Props) => { {(isV2(datasetId) || isV4(datasetId)) && ( )} + {isV4(datasetId) && ( + + )} + {/* eslint-disable-next-line no-nested-ternary */} {hasStructuralVariants(datasetId) ? ( diff --git a/browser/src/GenePage/GenePageContainer.tsx b/browser/src/GenePage/GenePageContainer.tsx index 0c9186b15..37fea0d6e 100644 --- a/browser/src/GenePage/GenePageContainer.tsx +++ b/browser/src/GenePage/GenePageContainer.tsx @@ -122,6 +122,25 @@ query ${operationName}($geneId: String, $geneSymbol: String, $referenceGenome: R obs_exp chisq_diff_null } + gnomad_v2_regional_missense_constraint { + passed_qc + has_no_rmc_evidence + regions { + chrom + start + stop + chrom_grch37 + start_grch37 + stop_grch37 + aa_start + aa_stop + obs_mis + exp_mis + obs_exp + chisq_diff_null + p_value + } + } gnomad_regional_missense_constraint { passed_qc has_no_rmc_evidence diff --git a/browser/src/RegionalMissenseConstraintTrack.tsx b/browser/src/RegionalMissenseConstraintTrack.tsx index ca370855f..555ddc31e 100644 --- a/browser/src/RegionalMissenseConstraintTrack.tsx +++ b/browser/src/RegionalMissenseConstraintTrack.tsx @@ -116,9 +116,14 @@ const printAAorNA = (aa: string | null) => { type RegionTooltipProps = { region: RegionWithUnclamped isTranscriptWide: boolean + includeLiftover: boolean } -export const RegionTooltip = ({ region, isTranscriptWide }: RegionTooltipProps) => { +export const RegionTooltip = ({ + region, + isTranscriptWide, + includeLiftover, +}: RegionTooltipProps) => { if (isTranscriptWide) { return ( @@ -169,6 +174,7 @@ export type RegionalMissenseConstraint = { const formattedOE = (region: RegionalMissenseConstraintRegion) => region.obs_exp.toFixed(2) type Props = { + trackTitle: string regionalMissenseConstraint: RegionalMissenseConstraint | null gene: Gene } @@ -202,7 +208,11 @@ const NoRMCConstraint = () => ( ) -const RegionalMissenseConstraintTrack = ({ regionalMissenseConstraint, gene }: Props) => { +const RegionalMissenseConstraintTrack = ({ + trackTitle, + regionalMissenseConstraint, + gene, +}: Props) => { if ( !regionalMissenseConstraint || regionalMissenseConstraint.regions === null || @@ -246,7 +256,7 @@ const RegionalMissenseConstraintTrack = ({ regionalMissenseConstraint, gene }: P return ( Date: Thu, 3 Jul 2025 16:12:22 -0500 Subject: [PATCH 12/15] wip: fix non liftover rmc pipeline task --- .../gnomad_v2/gnomad_v2_regional_missense_constraint.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py index 30331087e..8cac5e651 100644 --- a/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py +++ b/data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_regional_missense_constraint.py @@ -201,8 +201,6 @@ def prepare_gnomad_regional_missense_constraint(path, liftover=False): ds_with_rmc = ds_with_rmc.explode("regions") ds_with_rmc = ds_with_rmc.select( regions=hl.struct( - start_locus=ds_with_rmc.regions.start_coordinate, - stop_locus=ds_with_rmc.regions.stop_coordinate, chrom=ds_with_rmc.regions.start_coordinate.contig, start=hl.min(ds_with_rmc.regions.start_coordinate.position, ds_with_rmc.regions.stop_coordinate.position), stop=hl.max(ds_with_rmc.regions.start_coordinate.position, ds_with_rmc.regions.stop_coordinate.position), From aabc721af04e91c96d49205cc4ccd067188a4786 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Thu, 3 Jul 2025 16:12:44 -0500 Subject: [PATCH 13/15] wip: genes pipeline uses new rmc data --- data-pipeline/src/data_pipeline/pipelines/genes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data-pipeline/src/data_pipeline/pipelines/genes.py b/data-pipeline/src/data_pipeline/pipelines/genes.py index 0ef269139..52aa17b9e 100644 --- a/data-pipeline/src/data_pipeline/pipelines/genes.py +++ b/data-pipeline/src/data_pipeline/pipelines/genes.py @@ -344,7 +344,8 @@ f"/{constraint_subdir}/gnomad_v4_regional_missense_constraint.ht", { # "path": "gs://gnomad-v4-data-pipeline/inputs/regional_missense_constraint/rmc_browser.ht", - "path": "gs://gnomad-v4-data-pipeline/inputs/secondary-analyses/constraint/2025-05-19_gnomad_v4_regional_missense_constraint.ht", + # "path": "gs://gnomad-v4-data-pipeline/inputs/secondary-analyses/constraint/2025-05-19_gnomad_v4_regional_missense_constraint.ht", + "path": "gs://gnomad-v4-data-pipeline/inputs/secondary-analyses/constraint/2025-07-02_gnomad_v4_regional_missense_constraint.ht", }, ) From 61b169beb38e086689b041e20367f54c64fc2ccf Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Thu, 3 Jul 2025 16:13:03 -0500 Subject: [PATCH 14/15] wip: graphql api uses new gene index for rmc --- graphql-api/src/queries/gene-queries.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphql-api/src/queries/gene-queries.ts b/graphql-api/src/queries/gene-queries.ts index 008ee1643..c38806600 100644 --- a/graphql-api/src/queries/gene-queries.ts +++ b/graphql-api/src/queries/gene-queries.ts @@ -13,7 +13,8 @@ const GENE_INDICES = { // GRCh38: 'genes_grch38-2024-11-25--19-00', // TODO: June 2025 v4 RMC indices GRCh37: 'genes_grch37-2025-06-30--21-15', - GRCh38: 'genes_grch38-2025-07-01--16-53', + // GRCh38: 'genes_grch38-2025-07-01--16-53', + GRCh38: 'genes_grch38-2025-07-03--16-55', } const _fetchGeneById = async (esClient: any, geneId: any, referenceGenome: any) => { From 988bbd2b79cf01c8635e2cbe7ec013ec4c7f5838 Mon Sep 17 00:00:00 2001 From: Riley Grant Date: Thu, 3 Jul 2025 16:21:35 -0500 Subject: [PATCH 15/15] wip: frontend rmc track uses title for no rmc --- .../src/RegionalMissenseConstraintTrack.tsx | 65 ++++++++++--------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/browser/src/RegionalMissenseConstraintTrack.tsx b/browser/src/RegionalMissenseConstraintTrack.tsx index 555ddc31e..933b57c67 100644 --- a/browser/src/RegionalMissenseConstraintTrack.tsx +++ b/browser/src/RegionalMissenseConstraintTrack.tsx @@ -179,34 +179,41 @@ type Props = { gene: Gene } -const NoRMCConstraint = () => ( - ( - - Regional missense constraint - - - )} - > - {({ width }: { width: number }) => ( - <> - - - - - This gene was not searched for evidence of regional missense constraint. See our{' '} - - - help page - - for additional information. - - - - - )} - -) +type NoRMCProps = { + trackTitle?: string +} + +const NoRMCConstraint = ({ trackTitle }: NoRMCProps) => { + const title = trackTitle ? trackTitle : 'Regional missense constraint' + return ( + ( + + {title} + + + )} + > + {({ width }: { width: number }) => ( + <> + + + + + This gene was not searched for evidence of regional missense constraint. See our{' '} + + + help page + + for additional information. + + + + + )} + + ) +} const RegionalMissenseConstraintTrack = ({ trackTitle, @@ -219,7 +226,7 @@ const RegionalMissenseConstraintTrack = ({ (regionalMissenseConstraint.passed_qc === false && regionalMissenseConstraint.has_no_rmc_evidence === false) ) { - return + return } // This transcript was searched, but no RMC evidence was found