diff --git a/browser/src/GenePage/GenePage.spec.tsx b/browser/src/GenePage/GenePage.spec.tsx index 01bdd22c7..cfaebfd78 100644 --- a/browser/src/GenePage/GenePage.spec.tsx +++ b/browser/src/GenePage/GenePage.spec.tsx @@ -3,7 +3,11 @@ import renderer from 'react-test-renderer' import { jest, describe, expect, test } from '@jest/globals' import { render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { DatasetId, ReferenceGenome } from '@gnomad/dataset-metadata/metadata' +import { + DatasetId, + hasVariantCoocurrence, + ReferenceGenome, +} from '@gnomad/dataset-metadata/metadata' import { mockQueries } from '../../../tests/__helpers__/queries' import Query, { BaseQuery } from '../Query' @@ -89,7 +93,11 @@ forDatasetsNotMatching(svRegexp, 'GenePage with non-SV dataset "%s"', (datasetId await userEvent.click(cooccurrenceButton) expect(screen.queryByText(constraintModeMatcher)).toBeNull() - expect(screen.queryAllByText(cooccurrenceModeMatcher)).not.toEqual([]) + if (hasVariantCoocurrence(datasetId)) { + expect(screen.queryAllByText(cooccurrenceModeMatcher)).not.toEqual([]) + } else { + expect(screen.queryAllByText(cooccurrenceModeMatcher)).toEqual([]) + } await userEvent.click(constraintButton) expect(screen.queryByText(constraintModeMatcher)).not.toBeNull() diff --git a/browser/src/GenePage/GenePage.tsx b/browser/src/GenePage/GenePage.tsx index ba0bf77bb..33b414ecc 100644 --- a/browser/src/GenePage/GenePage.tsx +++ b/browser/src/GenePage/GenePage.tsx @@ -388,6 +388,7 @@ const GenePage = ({ datasetId, gene, geneId }: Props) => { ) : ( { + test('has no unexpected changes and renders as placeholder text', () => { + const heterozygousCounts = + HeterozygousVariantCooccurrenceCountsPerSeverityAndAfFactory.build() + const homozygousCounts = HomozygousVariantCooccurrenceCountsPerSeverityAndAfFactory.build() + const tableContent = render( + + ) + const normalContentFragment = tableContent.asFragment() + expect(normalContentFragment.querySelectorAll('p').length).toEqual(1) + expect(normalContentFragment.querySelectorAll('table').length).toEqual(0) + expect(normalContentFragment).toMatchSnapshot() + }) + } +) + +forDatasetsMatching(v2Regexp, 'VariantCoocurrenceCountsTable with v2 dataset "%s"', (datasetId) => { + test('has no unexpected changes and renders as a table', () => { + const heterozygousCounts = HeterozygousVariantCooccurrenceCountsPerSeverityAndAfFactory.build() + const homozygousCounts = HomozygousVariantCooccurrenceCountsPerSeverityAndAfFactory.build() + const tableContent = render( + + ) + const normalContentFragment = tableContent.asFragment() + expect(normalContentFragment.querySelectorAll('p').length).toEqual(0) + expect(normalContentFragment.querySelectorAll('table').length).toEqual(2) + expect(normalContentFragment).toMatchSnapshot() + }) +}) describe('VariantCooccurrenceCountsTable', () => { test('renders correct data into correct table cells in both regular and extended mode', () => { @@ -14,6 +58,7 @@ describe('VariantCooccurrenceCountsTable', () => { const homozygousCounts = HomozygousVariantCooccurrenceCountsPerSeverityAndAfFactory.build() const tableContent = render( @@ -42,6 +87,7 @@ describe('VariantCooccurrenceCountsTable', () => { test('fills in missing data with zeroes', () => { const tableContent = render( diff --git a/browser/src/GenePage/VariantCooccurrenceCountsTable.tsx b/browser/src/GenePage/VariantCooccurrenceCountsTable.tsx index 059a27500..bb3e558b5 100644 --- a/browser/src/GenePage/VariantCooccurrenceCountsTable.tsx +++ b/browser/src/GenePage/VariantCooccurrenceCountsTable.tsx @@ -2,6 +2,7 @@ import React, { useState, Dispatch, SetStateAction, ReactNode } from 'react' import styled from 'styled-components' import { BaseTable, TooltipAnchor, TooltipHint, Button } from '@gnomad/ui' +import { DatasetId, hasVariantCoocurrence } from '@gnomad/dataset-metadata/metadata' export const heterozygousVariantCooccurrenceSeverities = [ 'lof_lof', @@ -505,14 +506,20 @@ const HomozygousCaption = () => ( ) const VariantCooccurrenceCountsTable = ({ + datasetId, heterozygous_variant_cooccurrence_counts, homozygous_variant_cooccurrence_counts, }: { + datasetId: DatasetId heterozygous_variant_cooccurrence_counts: HeterozygousVariantCooccurrenceCountsPerSeverityAndAf homozygous_variant_cooccurrence_counts: HomozygousVariantCooccurrenceCountsPerSeverityAndAf }) => { const [tableMode, setTableMode] = useState('normal') + if (!hasVariantCoocurrence(datasetId)) { + return

Variant co-occurrence is only available for gnomAD v2.

+ } + const buttonLabel = tableMode === 'normal' ? 'expand' : 'collapse' const clickCallback = () => toggleTableMode(tableMode, setTableMode) const toggleButton = {buttonLabel} diff --git a/browser/src/GenePage/__snapshots__/VariantCooccurrenceCountsTable.spec.tsx.snap b/browser/src/GenePage/__snapshots__/VariantCooccurrenceCountsTable.spec.tsx.snap index 54113372a..ddbb1e08c 100644 --- a/browser/src/GenePage/__snapshots__/VariantCooccurrenceCountsTable.spec.tsx.snap +++ b/browser/src/GenePage/__snapshots__/VariantCooccurrenceCountsTable.spec.tsx.snap @@ -1985,3 +1985,3419 @@ exports[`VariantCooccurrenceCountsTable renders correct data into correct table `; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "exac" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "gnomad_r3" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "gnomad_r3_controls_and_biobanks" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "gnomad_r3_non_cancer" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "gnomad_r3_non_neuro" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "gnomad_r3_non_topmed" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with non v2 dataset "gnomad_r3_non_v2" has no unexpected changes and renders as placeholder text 1`] = ` + +

+ Variant co-occurrence is only available for gnomAD v2. +

+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_r2_1" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_r2_1_controls" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_r2_1_non_cancer" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_r2_1_non_neuro" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_r2_1_non_topmed" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_sv_r2_1" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_sv_r2_1_controls" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; + +exports[`VariantCoocurrenceCountsTable with v2 dataset "gnomad_sv_r2_1_non_neuro" has no unexpected changes and renders as a table 1`] = ` + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + two heterozygous + + rare variants + + (number predicted in + + trans + + ) + +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + pLoF + + + + 28512 (14859) + + + + 28524 (14863) + + + + 16027 (8917) + +
+ + strong missense or worse + strong missense or worse + + + + 17591 (1669) + + + + 17603 (1673) + + + + 40907 (19183) + +
+ + moderate missense or worse + moderate missense or worse + + + + 42889 (18949) + + + + 42901 (18953) + + + + 42749 (13007) + +
+ + weak missense or worse + weak missense or worse + + + + 34432 (13475) + + + + 34444 (13479) + + + + 21947 (7533) + +
+ + missense or worse + missense or worse + + + + 18922 (3251) + + + + 18934 (3255) + + + + 42238 (20765) + +
+ + synonymous or worse + synonymous or worse + + + + 47943 (18569) + + + + 47955 (18573) + + + + 47803 (12627) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Individuals with + + homozygous + + rare variants +
+ Consequence + + Allele frequency +
+ + ≤ 5% + + ≤ 1% + + ≤ 0.5% +
+ + pLoF + + + 20287 + + 20291 + + 23379 +
+ + strong missense or worse + + + 44405 + + 44409 + + 1819 +
+ + moderate missense or worse + + + 13167 + + 13171 + + 16259 +
+ + weak missense or worse + + + 13501 + + 13505 + + 16593 +
+ + missense or worse + + + 14048 + + 14052 + + 17140 +
+ + synonymous or worse + + + 4233 + + 4237 + + 7325 +
+
+
+`; diff --git a/dataset-metadata/metadata.ts b/dataset-metadata/metadata.ts index 2a792cacf..e7420e201 100644 --- a/dataset-metadata/metadata.ts +++ b/dataset-metadata/metadata.ts @@ -75,6 +75,7 @@ type DatasetMetadata = { hasShortVariants: boolean hasStructuralVariants: boolean hasConstraints: boolean + hasVariantCoocurrence: boolean hasNonCodingConstraints: boolean hasExome: boolean genesHaveExomeCoverage: boolean @@ -118,6 +119,7 @@ const metadataForDataset = (datasetId: DatasetId): DatasetMetadata => ({ hasShortVariants: !structuralVariantDatasetIds.includes(datasetId), hasStructuralVariants: structuralVariantDatasetIds.includes(datasetId), hasConstraints: !datasetId.startsWith('gnomad_r3'), + hasVariantCoocurrence: datasetId.startsWith('gnomad') && datasetId.includes('r2'), hasNonCodingConstraints: datasetId.startsWith('gnomad_r3'), referenceGenome: datasetId.startsWith('gnomad_r3') ? 'GRCh38' : 'GRCh37', hasExome: !datasetId.startsWith('gnomad_r3'), @@ -171,6 +173,9 @@ export const labelForDataset = (datasetId: DatasetId) => getMetadata(datasetId, export const hasConstraints = (datsetId: DatasetId) => getMetadata(datsetId, 'hasConstraints') +export const hasVariantCoocurrence = (datasetId: DatasetId) => + getMetadata(datasetId, 'hasVariantCoocurrence') + export const hasNonCodingConstraints = (datasetId: DatasetId) => getMetadata(datasetId, 'hasNonCodingConstraints')