diff --git a/browser/src/GenePage/GenePage.tsx b/browser/src/GenePage/GenePage.tsx
index f93a8712b..11151dc64 100644
--- a/browser/src/GenePage/GenePage.tsx
+++ b/browser/src/GenePage/GenePage.tsx
@@ -22,6 +22,7 @@ import {
isExac,
hasCopyNumberVariants,
isV2,
+ isV4,
} from '@gnomad/dataset-metadata/metadata'
import ConstraintTable from '../ConstraintTable/ConstraintTable'
import VariantCooccurrenceCountsTable, {
@@ -134,7 +135,7 @@ export type Gene = GeneMetadata & {
id: string
}[]
exac_regional_missense_constraint_regions?: any
- gnomad_v2_regional_missense_constraint?: RegionalMissenseConstraint
+ gnomad_regional_missense_constraint?: RegionalMissenseConstraint
variants: Variant[]
structural_variants: StructuralVariant[]
copy_number_variants: CopyNumberVariant[]
@@ -552,9 +553,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 1b0cd7e47..53c0b487e 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 85c86cb51..de1799bee 100644
--- a/browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap
+++ b/browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap
@@ -1508,6 +1508,101 @@ exports[`GenePage with CNV dataset "gnomad_cnv_r4" has no unexpected changes 1`]
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -7536,6 +7631,101 @@ exports[`GenePage with SV dataset "gnomad_sv_r4" has no unexpected changes 1`] =
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -10595,6 +10785,101 @@ exports[`GenePage with non-SV dataset "gnomad_cnv_r4" has no unexpected changes
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -29545,6 +29830,101 @@ exports[`GenePage with non-SV dataset "gnomad_r4" has no unexpected changes 1`]
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -31086,6 +31466,101 @@ exports[`GenePage with non-SV dataset "gnomad_r4_non_ukb" has no unexpected chan
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
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 7b7ab14eb..be340c7ae 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",
diff --git a/graphql-api/src/graphql/types/gene.graphql b/graphql-api/src/graphql/types/gene.graphql
index e41c6bda5..5eeb68f52 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!]
diff --git a/graphql-api/src/queries/gene-queries.ts b/graphql-api/src/queries/gene-queries.ts
index 530e8eb76..95a4aef0d 100644
--- a/graphql-api/src/queries/gene-queries.ts
+++ b/graphql-api/src/queries/gene-queries.ts
@@ -1,12 +1,14 @@
-import { withCache } from '../cache'
+// import { withCache } from '../cache'
import { fetchAllSearchResults } from './helpers/elasticsearch-helpers'
const GENE_INDICES = {
// 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-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) => {
@@ -29,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({