diff --git a/browser/src/ConstraintTable/ConstraintTable.spec.tsx b/browser/src/ConstraintTable/ConstraintTable.spec.tsx index 6b5776d8b..61c4f920b 100644 --- a/browser/src/ConstraintTable/ConstraintTable.spec.tsx +++ b/browser/src/ConstraintTable/ConstraintTable.spec.tsx @@ -11,6 +11,10 @@ import { BrowserRouter } from 'react-router-dom' import ConstraintTable from './ConstraintTable' import { ExacConstraint } from './ExacConstraintTable' import { GnomadConstraint } from './GnomadConstraintTable' +import { + ProteinMitochondrialGeneConstraint, + RNAMitochondrialGeneConstraint, +} from '../GenePage/GenePage' const exacConstraintFactory = Factory.define(() => ({ exp_lof: 0.123, @@ -42,6 +46,34 @@ const gnomadConstraintFactory = Factory.define(() => ({ oe_syn_upper: 0.95, })) +const proteinMitochondrialConstraintFactory = Factory.define( + () => ({ + exp_lof: 0.123, + exp_syn: 0.234, + exp_mis: 0.345, + oe_lof: 0.789, + oe_lof_lower: 0.6, + oe_lof_upper: 0.9, + oe_mis: 0.891, + oe_mis_lower: 0.8, + oe_mis_upper: 0.99, + oe_syn: 0.912, + oe_syn_lower: 0.8, + oe_syn_upper: 0.95, + obs_lof: 0.111, + obs_syn: 0.222, + obs_mis: 0.333, + }) +) + +const rnaMitochondrialConstraintFactory = Factory.define(() => ({ + observed: 0.11, + expected: 0.22, + oe: 0.33, + oe_lower: 0.31, + oe_upper: 0.35, +})) + forAllDatasets('ConstraintTable with "%s" dataset selected', (datasetId) => { describe('with a minimal gene', () => { test('has no unexpected changes', () => { @@ -65,13 +97,35 @@ forAllDatasets('ConstraintTable with "%s" dataset selected', (datasetId) => { }) }) - describe('with a mitochondrial gene', () => { + describe('with a mitochondrial protein gene', () => { + test('has no unexpected changes', () => { + const constraint = proteinMitochondrialConstraintFactory.build() + const tree = renderer.create( + + + + ) + expect(tree).toMatchSnapshot() + }) + }) + + describe('with a mitochondrial RNA gene', () => { test('has no unexpected changes', () => { + const constraint = rnaMitochondrialConstraintFactory.build() const tree = renderer.create( ) @@ -79,6 +133,20 @@ forAllDatasets('ConstraintTable with "%s" dataset selected', (datasetId) => { }) }) + describe('with a mitochondrial gene missing constraint data', () => { + const tree = renderer.create( + + + + ) + expect(tree).toMatchSnapshot() + }) + describe('with a mitochondrial transcript', () => { test('has no unexpected changes', () => { const tree = renderer.create( diff --git a/browser/src/ConstraintTable/ConstraintTable.tsx b/browser/src/ConstraintTable/ConstraintTable.tsx index 659665ef6..87f18865e 100644 --- a/browser/src/ConstraintTable/ConstraintTable.tsx +++ b/browser/src/ConstraintTable/ConstraintTable.tsx @@ -8,6 +8,7 @@ import Link from '../Link' import ExacConstraintTable from './ExacConstraintTable' import GnomadConstraintTable from './GnomadConstraintTable' +import MitochondrialConstraintTable from './MitochondrialConstraintTable' type Props = { datasetId: DatasetId @@ -65,18 +66,16 @@ const ConstraintTable = ({ datasetId, geneOrTranscript }: Props) => { const { transcriptId, transcriptVersion, transcriptDescription } = transcriptDetails(geneOrTranscript) - const gnomadConstraint = geneOrTranscript.gnomad_constraint - const exacConstraint = geneOrTranscript.exac_constraint - if (geneOrTranscript.chrom === 'M') { - return ( -

- Constraint is not available for mitochondrial{' '} - {isGene(geneOrTranscript) ? 'genes' : 'transcripts'} -

- ) + if (isGene(geneOrTranscript)) { + return + } + return

Constraint is not available for mitochondrial transcripts

} + const gnomadConstraint = geneOrTranscript.gnomad_constraint + const exacConstraint = geneOrTranscript.exac_constraint + if (datasetId === 'exac') { if (!exacConstraint) { return ( diff --git a/browser/src/ConstraintTable/MitochondrialConstraintTable.tsx b/browser/src/ConstraintTable/MitochondrialConstraintTable.tsx new file mode 100644 index 000000000..806740038 --- /dev/null +++ b/browser/src/ConstraintTable/MitochondrialConstraintTable.tsx @@ -0,0 +1,136 @@ +import React from 'react' +import { + MitochondrialGeneConstraint, + ProteinMitochondrialGeneConstraint, + RNAMitochondrialGeneConstraint, +} from '../GenePage/GenePage' +import { BaseTable } from '@gnomad/ui' + +const isProteinMitochondrialGeneConstraint = ( + constraint: MitochondrialGeneConstraint +): constraint is ProteinMitochondrialGeneConstraint => + Object.prototype.hasOwnProperty.call(constraint, 'exp_lof') + +const ConstraintRow = ({ + category, + expected, + observed, + oe, + oeLower, + oeUpper, +}: { + category: string + expected: number + observed: number + oe: number + oeLower: number + oeUpper: number +}) => ( + + {category} + {expected.toFixed(1)} + {observed.toFixed(1)} + + {oe.toFixed(2)} ({oeLower.toFixed(2)}-{oeUpper.toFixed(2)}) + + +) + +const ProteinConstraintMetrics = ({ + constraint, +}: { + constraint: ProteinMitochondrialGeneConstraint +}) => { + const { + exp_lof, + exp_mis, + exp_syn, + obs_lof, + obs_mis, + obs_syn, + oe_lof, + oe_lof_lower, + oe_lof_upper, + oe_mis, + oe_mis_lower, + oe_mis_upper, + oe_syn, + oe_syn_lower, + oe_syn_upper, + } = constraint + return ( + + + + + + ) +} + +const RNAConstraintMetrics = ({ constraint }: { constraint: RNAMitochondrialGeneConstraint }) => { + const { expected, observed, oe, oe_lower, oe_upper } = constraint + return ( + + + + ) +} + +const MitochondrialConstraintTable = ({ + constraint, +}: { + constraint: MitochondrialGeneConstraint | null +}) => { + if (constraint === null) { + return

Constraint is not available on this gene

+ } + + return ( + // @ts-expect-error + + + + Category + Expected SNVs + Observed SNVs + Observed/Expected + + + {isProteinMitochondrialGeneConstraint(constraint) ? ( + + ) : ( + + )} + + ) +} + +export default MitochondrialConstraintTable diff --git a/browser/src/ConstraintTable/__snapshots__/ConstraintTable.spec.tsx.snap b/browser/src/ConstraintTable/__snapshots__/ConstraintTable.spec.tsx.snap index 98f96d45f..30f63de6c 100644 --- a/browser/src/ConstraintTable/__snapshots__/ConstraintTable.spec.tsx.snap +++ b/browser/src/ConstraintTable/__snapshots__/ConstraintTable.spec.tsx.snap @@ -1,5 +1,131 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[` 1`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 2`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 3`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 4`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 5`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 6`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 7`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 + . +

+`; + +exports[` 8`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (controls/biobanks) + . +

+`; + +exports[` 9`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-cancer) + . +

+`; + +exports[` 10`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-neuro) + . +

+`; + +exports[` 11`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-TOPMed) + . +

+`; + +exports[` 12`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-v2) + . +

+`; + +exports[` 13`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 14`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 15`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 16`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 17`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 18`] = ` +

+ Constraint is not available on this gene +

+`; + +exports[` 19`] = ` +

+ Constraint is not available on this gene +

+`; + exports[`ConstraintTable with "exac" dataset selected with a minimal gene has no unexpected changes 1`] = `

Constraint not available for this @@ -14,19 +140,159 @@ exports[`ConstraintTable with "exac" dataset selected with a minimal transcript

`; -exports[`ConstraintTable with "exac" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "exac" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "exac" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "exac" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -791,19 +1057,159 @@ exports[`ConstraintTable with "gnomad_cnv_r4" dataset selected with a minimal tr

`; -exports[`ConstraintTable with "gnomad_cnv_r4" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_cnv_r4" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_cnv_r4" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_cnv_r4" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -1568,19 +1974,159 @@ exports[`ConstraintTable with "gnomad_r2_1" dataset selected with a minimal tran

`; -exports[`ConstraintTable with "gnomad_r2_1" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r2_1" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r2_1" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r2_1" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -2353,19 +2899,159 @@ exports[`ConstraintTable with "gnomad_r2_1_controls" dataset selected with a min

`; -exports[`ConstraintTable with "gnomad_r2_1_controls" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r2_1_controls" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r2_1_controls" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r2_1_controls" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -3138,19 +3824,159 @@ exports[`ConstraintTable with "gnomad_r2_1_non_cancer" dataset selected with a m

`; -exports[`ConstraintTable with "gnomad_r2_1_non_cancer" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r2_1_non_cancer" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r2_1_non_cancer" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r2_1_non_cancer" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -3923,19 +4749,159 @@ exports[`ConstraintTable with "gnomad_r2_1_non_neuro" dataset selected with a mi

`; -exports[`ConstraintTable with "gnomad_r2_1_non_neuro" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r2_1_non_neuro" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r2_1_non_neuro" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r2_1_non_neuro" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -4708,19 +5674,159 @@ exports[`ConstraintTable with "gnomad_r2_1_non_topmed" dataset selected with a m

`; -exports[`ConstraintTable with "gnomad_r2_1_non_topmed" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r2_1_non_topmed" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r2_1_non_topmed" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r2_1_non_topmed" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -4756,7 +5862,15 @@ exports[`ConstraintTable with "gnomad_r3" dataset selected with a minimal transc

`; -exports[`ConstraintTable with "gnomad_r3" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` +exports[`ConstraintTable with "gnomad_r3" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 + . +

+`; + +exports[`ConstraintTable with "gnomad_r3" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = `

Constraint not yet available for gnomAD v3.1.2 @@ -4804,7 +5918,15 @@ exports[`ConstraintTable with "gnomad_r3_controls_and_biobanks" dataset selected

`; -exports[`ConstraintTable with "gnomad_r3_controls_and_biobanks" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` +exports[`ConstraintTable with "gnomad_r3_controls_and_biobanks" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (controls/biobanks) + . +

+`; + +exports[`ConstraintTable with "gnomad_r3_controls_and_biobanks" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = `

Constraint not yet available for gnomAD v3.1.2 (controls/biobanks) @@ -4852,7 +5974,15 @@ exports[`ConstraintTable with "gnomad_r3_non_cancer" dataset selected with a min

`; -exports[`ConstraintTable with "gnomad_r3_non_cancer" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` +exports[`ConstraintTable with "gnomad_r3_non_cancer" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-cancer) + . +

+`; + +exports[`ConstraintTable with "gnomad_r3_non_cancer" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = `

Constraint not yet available for gnomAD v3.1.2 (non-cancer) @@ -4900,7 +6030,15 @@ exports[`ConstraintTable with "gnomad_r3_non_neuro" dataset selected with a mini

`; -exports[`ConstraintTable with "gnomad_r3_non_neuro" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` +exports[`ConstraintTable with "gnomad_r3_non_neuro" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-neuro) + . +

+`; + +exports[`ConstraintTable with "gnomad_r3_non_neuro" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = `

Constraint not yet available for gnomAD v3.1.2 (non-neuro) @@ -4948,7 +6086,15 @@ exports[`ConstraintTable with "gnomad_r3_non_topmed" dataset selected with a min

`; -exports[`ConstraintTable with "gnomad_r3_non_topmed" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` +exports[`ConstraintTable with "gnomad_r3_non_topmed" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-TOPMed) + . +

+`; + +exports[`ConstraintTable with "gnomad_r3_non_topmed" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = `

Constraint not yet available for gnomAD v3.1.2 (non-TOPMed) @@ -4996,7 +6142,15 @@ exports[`ConstraintTable with "gnomad_r3_non_v2" dataset selected with a minimal

`; -exports[`ConstraintTable with "gnomad_r3_non_v2" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` +exports[`ConstraintTable with "gnomad_r3_non_v2" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` +

+ Constraint not yet available for + gnomAD v3.1.2 (non-v2) + . +

+`; + +exports[`ConstraintTable with "gnomad_r3_non_v2" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = `

Constraint not yet available for gnomAD v3.1.2 (non-v2) @@ -5773,19 +6927,159 @@ exports[`ConstraintTable with "gnomad_r4" dataset selected with a minimal transc

`; -exports[`ConstraintTable with "gnomad_r4" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r4" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r4" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r4" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -6550,19 +7844,159 @@ exports[`ConstraintTable with "gnomad_r4_non_ukb" dataset selected with a minima

`; -exports[`ConstraintTable with "gnomad_r4_non_ukb" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_r4_non_ukb" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_r4_non_ukb" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_r4_non_ukb" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -7327,19 +8761,159 @@ exports[`ConstraintTable with "gnomad_sv_r2_1" dataset selected with a minimal t

`; -exports[`ConstraintTable with "gnomad_sv_r2_1" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_sv_r2_1" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_sv_r2_1" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_sv_r2_1" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -8112,19 +9686,159 @@ exports[`ConstraintTable with "gnomad_sv_r2_1_controls" dataset selected with a

`; -exports[`ConstraintTable with "gnomad_sv_r2_1_controls" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_sv_r2_1_controls" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_sv_r2_1_controls" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_sv_r2_1_controls" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -8897,19 +10611,159 @@ exports[`ConstraintTable with "gnomad_sv_r2_1_non_neuro" dataset selected with a

`; -exports[`ConstraintTable with "gnomad_sv_r2_1_non_neuro" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_sv_r2_1_non_neuro" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_sv_r2_1_non_neuro" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_sv_r2_1_non_neuro" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; @@ -9674,19 +11528,159 @@ exports[`ConstraintTable with "gnomad_sv_r4" dataset selected with a minimal tra

`; -exports[`ConstraintTable with "gnomad_sv_r4" dataset selected with a mitochondrial gene has no unexpected changes 1`] = ` -

- Constraint is not available for mitochondrial - - genes -

+exports[`ConstraintTable with "gnomad_sv_r4" dataset selected with a mitochondrial RNA gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ RNA variant + + 0.2 + + 0.1 + + 0.33 + ( + 0.31 + - + 0.35 + ) +
+`; + +exports[`ConstraintTable with "gnomad_sv_r4" dataset selected with a mitochondrial protein gene has no unexpected changes 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category + + Expected SNVs + + Observed SNVs + + Observed/Expected +
+ Synonymous + + 0.2 + + 0.2 + + 0.91 + ( + 0.80 + - + 0.95 + ) +
+ Missense + + 0.3 + + 0.3 + + 0.89 + ( + 0.80 + - + 0.99 + ) +
+ pLoF + + 0.1 + + 0.1 + + 0.79 + ( + 0.60 + - + 0.90 + ) +
`; exports[`ConstraintTable with "gnomad_sv_r4" dataset selected with a mitochondrial transcript has no unexpected changes 1`] = `

- Constraint is not available for mitochondrial - - transcripts + Constraint is not available for mitochondrial transcripts

`; diff --git a/browser/src/GenePage/GenePage.tsx b/browser/src/GenePage/GenePage.tsx index c1c1c976c..ccfaad9b2 100644 --- a/browser/src/GenePage/GenePage.tsx +++ b/browser/src/GenePage/GenePage.tsx @@ -75,7 +75,7 @@ import { } from '../ChartStyles' import { logButtonClick } from '../analytics' -type ProteinMitochondrialGeneConstraint = { +export type ProteinMitochondrialGeneConstraint = { exp_lof: number exp_mis: number exp_syn: number @@ -97,7 +97,7 @@ type ProteinMitochondrialGeneConstraint = { oe_syn_upper: number } -type RNAMitochondrialGeneConstraint = { +export type RNAMitochondrialGeneConstraint = { observed: number expected: number oe: number @@ -105,7 +105,7 @@ type RNAMitochondrialGeneConstraint = { oe_lower: number } -type MitochondrialGeneConstraint = +export type MitochondrialGeneConstraint = | ProteinMitochondrialGeneConstraint | RNAMitochondrialGeneConstraint