diff --git a/browser/src/GenePage/GenePage.tsx b/browser/src/GenePage/GenePage.tsx
index 58a054dcb..ec83acc1c 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,8 +609,17 @@ const GenePage = ({ datasetId, gene, geneId }: Props) => {
/>
)}
- {isV2(datasetId) && (
+ {(isV2(datasetId) || isV4(datasetId)) && (
+ )}
+
+ {isV4(datasetId) && (
+
diff --git a/browser/src/GenePage/GenePageContainer.tsx b/browser/src/GenePage/GenePageContainer.tsx
index fbb9041a7..37fea0d6e 100644
--- a/browser/src/GenePage/GenePageContainer.tsx
+++ b/browser/src/GenePage/GenePageContainer.tsx
@@ -123,6 +123,25 @@ query ${operationName}($geneId: String, $geneSymbol: String, $referenceGenome: R
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
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
+
+
+
+
+
+
+
+
+
+
+
@@ -7531,6 +7626,101 @@ exports[`GenePage with SV dataset "gnomad_sv_r4" has no unexpected changes 1`] =
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -10588,6 +10778,101 @@ exports[`GenePage with non-SV dataset "gnomad_cnv_r4" has no unexpected changes
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -29526,6 +29811,101 @@ exports[`GenePage with non-SV dataset "gnomad_r4" has no unexpected changes 1`]
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
@@ -32589,6 +32969,101 @@ exports[`gene page for a mitochondrial gene doesn't include a show-transcripts b
+
+
+
+
+
+ Regional missense constraint
+
+
+
+
+
+
+
+
+
+
+
diff --git a/browser/src/RegionalMissenseConstraintTrack.tsx b/browser/src/RegionalMissenseConstraintTrack.tsx
index ca370855f..933b57c67 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,47 +174,59 @@ export type RegionalMissenseConstraint = {
const formattedOE = (region: RegionalMissenseConstraintRegion) => region.obs_exp.toFixed(2)
type Props = {
+ trackTitle: string
regionalMissenseConstraint: RegionalMissenseConstraint | null
gene: Gene
}
-const NoRMCConstraint = () => (
-
-)
+type NoRMCProps = {
+ trackTitle?: string
+}
+
+const NoRMCConstraint = ({ trackTitle }: NoRMCProps) => {
+ const title = trackTitle ? trackTitle : 'Regional missense constraint'
+ return (
+
+ )
+}
-const RegionalMissenseConstraintTrack = ({ regionalMissenseConstraint, gene }: Props) => {
+const RegionalMissenseConstraintTrack = ({
+ trackTitle,
+ regionalMissenseConstraint,
+ gene,
+}: Props) => {
if (
!regionalMissenseConstraint ||
regionalMissenseConstraint.regions === null ||
(regionalMissenseConstraint.passed_qc === false &&
regionalMissenseConstraint.has_no_rmc_evidence === false)
) {
- return
+ return
}
// This transcript was searched, but no RMC evidence was found
@@ -246,7 +263,7 @@ const RegionalMissenseConstraintTrack = ({ regionalMissenseConstraint, gene }: P
return (
{
@@ -27,11 +37,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({