From 51303274ed20f326aeb5fb18d17613ea1e88aed3 Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Tue, 26 Mar 2024 13:43:42 -0400 Subject: [PATCH 1/9] Update schema and API to prefer term "ancestry group" to "population" Old field names will still work (don't want to break anyone else's gnomAD clients) but are now marked deprecated. --- graphql-api/src/graphql/resolvers/aliases.ts | 27 ++++++ .../graphql/types/copy-number-variant.graphql | 86 ++++++++++--------- .../src/graphql/types/mitochondria.graphql | 14 ++- .../graphql/types/short-tandem-repeat.graphql | 24 +++++- .../graphql/types/structural-variant.graphql | 19 ++-- .../types/variant-cooccurrence.graphql | 15 +++- graphql-api/src/graphql/types/variant.graphql | 58 +++++++++++-- 7 files changed, 184 insertions(+), 59 deletions(-) diff --git a/graphql-api/src/graphql/resolvers/aliases.ts b/graphql-api/src/graphql/resolvers/aliases.ts index b85025f4d..554761e7e 100644 --- a/graphql-api/src/graphql/resolvers/aliases.ts +++ b/graphql-api/src/graphql/resolvers/aliases.ts @@ -54,12 +54,15 @@ const resolvers = { ac_hom: fieldAliasResolver('homozygote_count'), ac_hemi: fieldAliasResolver('hemizygote_count'), af: (obj: any) => (obj.an === 0 ? 0 : obj.ac / obj.an), + ancestry_groups: fieldAliasResolver('populations'), }, VariantDetailsSequencingTypeData: { qualityMetrics: fieldAliasResolver('quality_metrics'), ac_hom: fieldAliasResolver('homozygote_count'), ac_hemi: fieldAliasResolver('hemizygote_count'), af: (obj: any) => (obj.an === 0 ? 0 : obj.ac / obj.an), + ancestry_groups: fieldAliasResolver('populations'), + local_ancestry_groups: fieldAliasResolver('local_ancestry_populations'), }, VariantPopulation: { ac_hom: fieldAliasResolver('homozygote_count'), @@ -84,6 +87,7 @@ const resolvers = { consequence: fieldAliasResolver('major_consequence'), ac_hom: fieldAliasResolver('homozygote_count'), ac_hemi: fieldAliasResolver('hemizygote_count'), + ancestry_groups: fieldAliasResolver('populations'), }, StructuralVariantPopulation: { ac_hom: fieldAliasResolver('homozygote_count'), @@ -106,6 +110,29 @@ const resolvers = { MitochondrialVariantDetails: { // Single rsID rsid: (obj: any) => (obj.rsids || [])[0], + ancestry_groups: fieldAliasResolver('populations'), + }, + CopyNumberVariantDetails: { + ancestry_groups: fieldAliasResolver('populations'), + }, + ShortTandemRepeatAlleleSizeDistribution: { + ancestry_groups: fieldAliasResolver('populations'), + }, + ShortTandemRepeatAlleleSizeDistributionRepeatUnit: { + ancestry_groups: fieldAliasResolver('populations'), + }, + ShortTandemRepeatGenotypeDistribution: { + ancestry_groups: fieldAliasResolver('populations'), + }, + ShortTandemRepeatGenotypeDistributionRepeatUnit: { + ancestry_groups: fieldAliasResolver('populations'), + }, + VariantCooccurrence: { + ancestry_groups: fieldAliasResolver('populations'), + }, + VariantFilteringAlleleFrequency: { + grpmax: fieldAliasResolver('popmax'), + grpmax_ancestry_group: fieldAliasResolver('popmax_population'), }, } diff --git a/graphql-api/src/graphql/types/copy-number-variant.graphql b/graphql-api/src/graphql/types/copy-number-variant.graphql index f9fe1af07..e8efc198d 100644 --- a/graphql-api/src/graphql/types/copy-number-variant.graphql +++ b/graphql-api/src/graphql/types/copy-number-variant.graphql @@ -1,51 +1,59 @@ +type CopyNumberVariantAncestryGroup { + id: String! + sc: Float! + sn: Float! + sf: Float! +} + type CopyNumberVariantPopulation { - id: String! - sc: Float! - sn: Float! - sf: Float! + id: String! @deprecated(reason: "Use CopyNumberVariantAncestryGroup.id") + sc: Float! @deprecated(reason: "Use CopyNumberVariantAncestryGroup.sc") + sn: Float! @deprecated(reason: "Use CopyNumberVariantAncestryGroup.sn") + sf: Float! @deprecated(reason: "Use CopyNumberVariantAncestryGroup.sf") } type CopyNumberVariant { - sc: Float! - sn: Float! - sf: Float! - reference_genome: ReferenceGenomeId! - chrom: String! - end: Int! - filters: [String!] - length: Int - pos: Int! - type: String - posmin: Int - posmax: Int - endmin: Int - endmax: Int - variant_id: String! + sc: Float! + sn: Float! + sf: Float! + reference_genome: ReferenceGenomeId! + chrom: String! + end: Int! + filters: [String!] + length: Int + pos: Int! + type: String + posmin: Int + posmax: Int + endmin: Int + endmax: Int + variant_id: String! } type CopyNumberVariantDetails { - alts: [String!] - sc: Float! - sn: Float! - sf: Float! - chrom: String! - end: Int! - filters: [String!] - genes: [String!] - length: Int - populations: [CopyNumberVariantPopulation!] - pos: Int! - qual: Float - reference_genome: ReferenceGenomeId! - type: String - posmin: Int - posmax: Int - endmin: Int - endmax: Int - variant_id: String! + alts: [String!] + sc: Float! + sn: Float! + sf: Float! + chrom: String! + end: Int! + filters: [String!] + genes: [String!] + length: Int + ancestry_groups: [CopyNumberVariantAncestryGroup!] + populations: [CopyNumberVariantPopulation!] @deprecated(reason: "Use ancestry_groups") + pos: Int! + qual: Float + reference_genome: ReferenceGenomeId! + type: String + posmin: Int + posmax: Int + endmin: Int + endmax: Int + variant_id: String! } type CNVTrackCallableCoverageBin { xpos: Float! percent_callable: Float -} \ No newline at end of file +} diff --git a/graphql-api/src/graphql/types/mitochondria.graphql b/graphql-api/src/graphql/types/mitochondria.graphql index 78f38d8ed..024e94fd5 100644 --- a/graphql-api/src/graphql/types/mitochondria.graphql +++ b/graphql-api/src/graphql/types/mitochondria.graphql @@ -26,7 +26,7 @@ type MitochondrialVariantAgeDistribution { hom: Histogram } -type MitochondrialVariantPopulation { +type MitochondrialVariantAncestryGroup { id: String! an: Int! ac_het: Int! @@ -34,6 +34,15 @@ type MitochondrialVariantPopulation { heteroplasmy_distribution: Histogram! } +type MitochondrialVariantPopulation { + id: String! @deprecated(reason: "Use MitochondrialVariantAncestryGroup.id") + an: Int! @deprecated(reason: "Use MitochondrialVariantAncestryGroup.an") + ac_het: Int! @deprecated(reason: "Use MitochondrialVariantAncestryGroup.ac_het") + ac_hom: Int! @deprecated(reason: "Use MitochondrialVariantAncestryGroup.ac_hom") + heteroplasmy_distribution: Histogram! + @deprecated(reason: "Use MitochondrialVariantAncestryGroup.heteroplasmy_distribution") +} + type MitochondrialVariantHaplogroup { id: String an: Float @@ -79,7 +88,8 @@ type MitochondrialVariantDetails { mitotip_trna_prediction: String pon_ml_probability_of_pathogenicity: Float pon_mt_trna_prediction: String - populations: [MitochondrialVariantPopulation!]! + ancestry_groups: [MitochondrialVariantAncestryGroup!]! + populations: [MitochondrialVariantPopulation!]! @deprecated(reason: "Use ancestry_groups") pos: Int! ref: String! reference_genome: ReferenceGenomeId! diff --git a/graphql-api/src/graphql/types/short-tandem-repeat.graphql b/graphql-api/src/graphql/types/short-tandem-repeat.graphql index 52dd64ae0..95b80363e 100644 --- a/graphql-api/src/graphql/types/short-tandem-repeat.graphql +++ b/graphql-api/src/graphql/types/short-tandem-repeat.graphql @@ -31,37 +31,57 @@ type ShortTandemRepeatRepeatUnit { classification: String! } -type ShortTandemRepeatAlleleSizeDistributionPopulation { +type ShortTandemRepeatAlleleSizeDistributionAncestryGroup { id: String! distribution: [[Int!]!]! } +type ShortTandemRepeatAlleleSizeDistributionPopulation { + id: String! @deprecated(reason: "Use ShortTandemRepeatAlleleSizeDistributionAncestryGroup.id") + distribution: [[Int!]!]! + @deprecated(reason: "Use ShortTandemRepeatAlleleSizeDistributionAncestryGroup.distribution") +} + type ShortTandemRepeatAlleleSizeDistributionRepeatUnit { repeat_unit: String! distribution: [[Int!]!]! + ancestry_groups: [ShortTandemRepeatAlleleSizeDistributionAncestryGroup!]! populations: [ShortTandemRepeatAlleleSizeDistributionPopulation!]! + @deprecated(reason: "Use ancestry_groups") } type ShortTandemRepeatAlleleSizeDistribution { distribution: [[Int!]!]! + ancestry_groups: [ShortTandemRepeatAlleleSizeDistributionAncestryGroup!]! populations: [ShortTandemRepeatAlleleSizeDistributionPopulation!]! + @deprecated(reason: "Use ancestry_groups") repeat_units: [ShortTandemRepeatAlleleSizeDistributionRepeatUnit!]! } -type ShortTandemRepeatGenotypeDistributionPopulation { +type ShortTandemRepeatGenotypeDistributionAncestryGroup { id: String! distribution: [[Int!]!]! } +type ShortTandemRepeatGenotypeDistributionPopulation { + id: String! @deprecated(reason: "Use ShortTandemRepeatGenotypeDistributionAncestryGroup.id") + distribution: [[Int!]!]! + @deprecated(reason: "Use ShortTandemRepeatGenotypeDistributionAncestryGroup.distribution") +} + type ShortTandemRepeatGenotypeDistributionRepeatUnit { repeat_units: [String!]! distribution: [[Int!]!]! + ancestry_groups: [ShortTandemRepeatGenotypeDistributionAncestryGroup!]! populations: [ShortTandemRepeatGenotypeDistributionPopulation!]! + @deprecated(reason: "Use ancestry_groups") } type ShortTandemRepeatGenotypeDistribution { distribution: [[Int!]!]! + ancestry_groups: [ShortTandemRepeatGenotypeDistributionAncestryGroup!]! populations: [ShortTandemRepeatGenotypeDistributionPopulation!]! + @deprecated(reason: "Use ancestry_groups") repeat_units: [ShortTandemRepeatGenotypeDistributionRepeatUnit!]! } diff --git a/graphql-api/src/graphql/types/structural-variant.graphql b/graphql-api/src/graphql/types/structural-variant.graphql index 2061969cb..5de3a4210 100644 --- a/graphql-api/src/graphql/types/structural-variant.graphql +++ b/graphql-api/src/graphql/types/structural-variant.graphql @@ -1,13 +1,21 @@ -type StructuralVariantPopulation { +type StructuralVariantAncestryGroup { id: String! ac: Int! an: Int! homozygote_count: Int hemizygote_count: Int + ac_hemi: Int @deprecated(reason: "Use hemizygote_count") + ac_hom: Int @deprecated(reason: "Use homozygote_count") +} - # Deprecated - replaced by homozygote/hemizygote count - ac_hemi: Int - ac_hom: Int +type StructuralVariantPopulation { + id: String! @deprecated(reason: "Use StructuralVariantAncestryGroup.id") + ac: Int! @deprecated(reason: "Use StructuralVariantAncestryGroup.ac") + an: Int! @deprecated(reason: "Use StructuralVariantAncestryGroup.an") + homozygote_count: Int @deprecated(reason: "Use StructuralVariantAncestryGroup.homozygote_count") + hemizygote_count: Int @deprecated(reason: "Use StructuralVariantAncestryGroup.hemizygote_count") + ac_hemi: Int @deprecated(reason: "Use StructuralVariantAncestryGroup.hemizygote_count") + ac_hom: Int @deprecated(reason: "Use StructuralVariantAncestryGroup.homozygote_count") } type StructuralVariantAgeDistribution { @@ -87,7 +95,8 @@ type StructuralVariantDetails { genes: [String!] genotype_quality: StructuralVariantGenotypeQuality length: Int - populations: [StructuralVariantPopulation!] + ancestry_groups: [StructuralVariantAncestryGroup!] + populations: [StructuralVariantPopulation!] @deprecated(reason: "Use ancestry_groups") pos: Int! pos2: Int qual: Float diff --git a/graphql-api/src/graphql/types/variant-cooccurrence.graphql b/graphql-api/src/graphql/types/variant-cooccurrence.graphql index a7c21ce94..e2b83730c 100644 --- a/graphql-api/src/graphql/types/variant-cooccurrence.graphql +++ b/graphql-api/src/graphql/types/variant-cooccurrence.graphql @@ -1,14 +1,25 @@ -type VariantCooccurrenceInPopulation { +type VariantCooccurrenceInAncestryGroup { id: String! genotype_counts: [Int!]! haplotype_counts: [Float!]! p_compound_heterozygous: Float } +type VariantCooccurrenceInPopulation { + id: String! @deprecated(reason: "Use VariantCooccurrenceInAncestryGroup.id") + genotype_counts: [Int!]! + @deprecated(reason: "Use VariantCooccurrenceInAncestryGroup.genotype_counts") + haplotype_counts: [Float!]! + @deprecated(reason: "Use VariantCooccurrenceInAncestryGroup.haplotype_counts") + p_compound_heterozygous: Float + @deprecated(reason: "Use VariantCooccurrenceInAncestryGroup.p_compound_heterozygous") +} + type VariantCooccurrence { variant_ids: [String!]! genotype_counts: [Int!]! haplotype_counts: [Float!]! p_compound_heterozygous: Float - populations: [VariantCooccurrenceInPopulation!]! + ancestry_groups: [VariantCooccurrenceInAncestryGroup!]! + populations: [VariantCooccurrenceInPopulation!]! @deprecated(reason: "Use ancestry_groups") } diff --git a/graphql-api/src/graphql/types/variant.graphql b/graphql-api/src/graphql/types/variant.graphql index 8639db322..6a87fe217 100644 --- a/graphql-api/src/graphql/types/variant.graphql +++ b/graphql-api/src/graphql/types/variant.graphql @@ -1,21 +1,55 @@ -type VariantPopulation { +type VariantAncestryGroup { id: String! ac: Int! an: Int! homozygote_count: Int! hemizygote_count: Int + ac_hom: Int! @deprecated(reason: "Use homozygote_count") + ac_hemi: Int @deprecated(reason: "Use hemizygote_count") +} - # Deprecated - replaced by homozygote/hemizygote count - ac_hom: Int! - ac_hemi: Int +type VariantLocalAncestryGroup { + id: String! + ac: Int! + an: Int! } type VariantLocalAncestryPopulation { + id: String! @deprecated(reason: "Use VariantLocalAncestryGroup.id") + ac: Int! @deprecated(reason: "Use VariantLocalAncestryGroup.ac") + an: Int! @deprecated(reason: "Use VariantLocalAncestryGroup.an") +} + +type VariantAlleleBalance { + alt: Histogram +} + +type VariantGenotypeDepth { + all: Histogram +} + +type VariantPopulation { + id: String! @deprecated(reason: "Use VariantAncestryGroup.id") + ac: Int! @deprecated(reason: "Use VariantAncestryGroup.ac") + an: Int! @deprecated(reason: "Use VariantAncestryGroup.an") + homozygote_count: Int! @deprecated(reason: "Use VariantAncestryGroup.homozygote_count") + hemizygote_count: Int @deprecated(reason: "Use VariantAncestryGroup.heterozygote_count") + ac_hom: Int! @deprecated(reason: "Use VariantAncestryGroup.homozygote_count") + ac_hemi: Int @deprecated(reason: "Use VariantAncestryGroup.hemizygote_count") +} + +type VariantLocalAncestryGroup { id: String! ac: Int! an: Int! } +type VariantLocalAncestryPopulation { + id: String! @deprecated(reason: "Use VariantLocalAncestryGroup.id") + ac: Int! @deprecated(reason: "Use VariantLocalAncestryGroup.ac") + an: Int! @deprecated(reason: "Use VariantLocalAncestryGroup.an") +} + type VariantAlleleBalance { alt: Histogram } @@ -49,8 +83,10 @@ type VariantQualityMetrics { } type VariantFilteringAlleleFrequency { - popmax: Float - popmax_population: String + grpmax: Float + popmax: Float @deprecated(reason: "Use grpmax") + grpmax_ancestry_group: String + popmax_population: String @deprecated(reason: "Use grpmax_ancestry_group") } type VariantAgeDistribution { @@ -105,7 +141,8 @@ type VariantSequencingTypeData { homozygote_count: Int hemizygote_count: Int filters: [String!] - populations: [VariantPopulation] + ancestry_groups: [VariantAncestryGroup] + populations: [VariantPopulation] @deprecated(reason: "Use ancestry_groups") faf95: VariantFilteringAlleleFrequency # Deprecated - calculate from AC and AN @@ -199,8 +236,11 @@ type VariantDetailsSequencingTypeData { faf95: VariantFilteringAlleleFrequency faf99: VariantFilteringAlleleFrequency filters: [String!] - populations: [VariantPopulation] - local_ancestry_populations: [VariantLocalAncestryPopulation]! + ancestry_groups: [VariantAncestryGroup] + local_ancestry_groups: [VariantLocalAncestryGroup] + populations: [VariantPopulation] @deprecated(reason: "Use ancestry_groups") + local_ancestry_populations: [VariantLocalAncestryPopulation] + @deprecated(reason: "Use local_ancestry_groups") age_distribution: VariantAgeDistribution quality_metrics: VariantQualityMetrics From 9b524e47c888e2ea419e1d28d65d9d55e2495cc8 Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Tue, 26 Mar 2024 14:42:55 -0400 Subject: [PATCH 2/9] Clean up CopyNumberVariant associated types This is prep to changing its "populations" field to "ancestry_groups". Note that, following the GraphQL API schema, "length" and other fields that don't seem like they should be null-able can be null. We should check the actual data, ensure there's no nulls in the fields in question, and assuming not tighten these types up. --- .../CopyNumberVariantPlot.tsx | 1 - .../CopyNumberVariantPropType.ts | 61 ---------------- .../CopyNumberVariantTracks.tsx | 6 +- .../CopyNumberVariants.tsx | 4 +- .../CopyNumberVariants.spec.tsx.snap | 9 +++ .../copyNumberVariantTableColumns.tsx | 2 +- .../CopyNumberVariantAttributeList.tsx | 69 ++++++++++--------- .../CopyNumberVariantPage.tsx | 32 +++++---- .../src/__factories__/CopyNumberVariant.ts | 2 + 9 files changed, 71 insertions(+), 115 deletions(-) delete mode 100644 browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx b/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx index ea107a570..37d79aa9b 100644 --- a/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx +++ b/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx @@ -8,7 +8,6 @@ type Props = { variant: { pos: number end: number - type: string } width: number } diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts b/browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts deleted file mode 100644 index 1a36868e5..000000000 --- a/browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts +++ /dev/null @@ -1,61 +0,0 @@ -import PropTypes from 'prop-types' - -// TODO: MATCH EVERYTHING WITH THE API TYPE -type CopyNumberVariantPropType = { - alts?: string[] | null - sc: number - sn: number - sf: number - chrom: string - end: number - filters?: string[] - genes?: string[] - length: number - populations?: { - id: string - sc: number - sn: number - sf: number - }[] - pos: number - qual?: number - type: string - posmin?: number - posmax?: number - endmin?: number - endmax?: number - variant_id: string -} - -const PopulationPropType = PropTypes.shape({ - id: PropTypes.string.isRequired, - sc: PropTypes.number.isRequired, - sn: PropTypes.number.isRequired, - sf: PropTypes.number.isRequired, -}) - -// @ts-expect-error TS(2322) FIXME: Type 'Requireable = PropTypes.shape( - { - alts: PropTypes.arrayOf(PropTypes.string), - sc: PropTypes.number.isRequired, - sn: PropTypes.number.isRequired, - sf: PropTypes.number, - chrom: PropTypes.string.isRequired, - end: PropTypes.number.isRequired, - filters: PropTypes.arrayOf(PropTypes.string.isRequired), - genes: PropTypes.arrayOf(PropTypes.string), - length: PropTypes.number.isRequired, - populations: PropTypes.arrayOf(PopulationPropType), - pos: PropTypes.number.isRequired, - qual: PropTypes.number, - type: PropTypes.string.isRequired, - posmin: PropTypes.number.isRequired, - posmax: PropTypes.number.isRequired, - endmin: PropTypes.number.isRequired, - endmax: PropTypes.number.isRequired, - variant_id: PropTypes.string.isRequired, - } -) - -export default CopyNumberVariantPropType diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx b/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx index ba82ea98d..08c701681 100644 --- a/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx +++ b/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx @@ -6,7 +6,7 @@ import { Track } from '@gnomad/region-viewer' import Link from '../Link' import CopyNumberVariantPlot from './CopyNumberVariantPlot' -import CopyNumberVariantPropType from './CopyNumberVariantPropType' +import { CopyNumberVariant } from '../CopyNumberVariantPage/CopyNumberVariantPage' type RowProps = { data: { @@ -15,7 +15,7 @@ type RowProps = { onHover: (...args: any[]) => any scalePosition: (...args: any[]) => any trackColor: (...args: any[]) => any - variants: CopyNumberVariantPropType[] + variants: CopyNumberVariant[] width: number } index: number @@ -67,7 +67,7 @@ type OwnCopyNumberVariantTracksProps = { onScroll: (...args: any[]) => any trackColor: (...args: any[]) => any trackHeight: number - variants: CopyNumberVariantPropType[] + variants: CopyNumberVariant[] } // @ts-expect-error TS(2456) FIXME: Type alias 'OwnCopyNumberVariantTracksProps' circular... Remove this comment to see the full error message diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx b/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx index 51e1571ed..475fb7501 100644 --- a/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx +++ b/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx @@ -16,7 +16,7 @@ import filterCopyNumberVariants from './filterCopyNumberVariants' import CopyNumberVariantFilterControls from './CopyNumberVariantFilterControls' import { cnvTypeColors } from './copyNumberVariantTypes' -import CopyNumberVariantPropType from './CopyNumberVariantPropType' +import { CopyNumberVariant } from '../CopyNumberVariantPage/CopyNumberVariantPage' import copyNumberVariantTableColumns, { getColumnsForContext, } from './copyNumberVariantTableColumns' @@ -48,7 +48,7 @@ export interface Context { type CopyNumberVariantsProps = { context: Context exportFileName: string - variants: CopyNumberVariantPropType[] + variants: CopyNumberVariant[] } const CopyNumberVariants = ({ context, exportFileName, variants }: CopyNumberVariantsProps) => { diff --git a/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap b/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap index 8c47770f3..da494d81e 100644 --- a/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap +++ b/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap @@ -26,6 +26,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -46,6 +47,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -66,6 +68,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -120,6 +123,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -140,6 +144,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -160,6 +165,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -299,6 +305,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -319,6 +326,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -339,6 +347,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "posmax": 100121284, "posmin": 100121281, "qual": 99, + "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, diff --git a/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx b/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx index b20f904c1..afba7f3d2 100644 --- a/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx +++ b/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx @@ -79,7 +79,7 @@ const copyNumberVariantTableColumns = [ if (variant.length === -1) { s = '—' } else { - const size = variant.length + const size = variant.length || 0 if (size >= 1e6) { s = `${(size / 1e6).toPrecision(3)} Mb` } else if (size >= 1e3) { diff --git a/browser/src/CopyNumberVariantPage/CopyNumberVariantAttributeList.tsx b/browser/src/CopyNumberVariantPage/CopyNumberVariantAttributeList.tsx index e8c3593c9..0a607cfe6 100644 --- a/browser/src/CopyNumberVariantPage/CopyNumberVariantAttributeList.tsx +++ b/browser/src/CopyNumberVariantPage/CopyNumberVariantAttributeList.tsx @@ -26,38 +26,41 @@ type CopyNumberVariantAttributeListProps = { variant: CopyNumberVariant } -const CopyNumberVariantAttributeList = ({ variant }: CopyNumberVariantAttributeListProps) => ( - - - {variant.filters.length > 0 ? ( - variant.filters.map((filter) => ( - - {filterLabel(filter)} - - )) - ) : ( - Pass - )} - - - {variant.sc} - {variant.sn} - - {(variant.sn === 0 ? 0 : variant.sc / variant.sn).toPrecision(4)} - - - - {variant.chrom}:{variant.pos}-{variant.end} - - - - {variant.length === -1 ? '—' : `${variant.length.toLocaleString()} bp`} - - - {/* @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message */} - {cnvTypeLabels[variant.type]} - - -) +const CopyNumberVariantAttributeList = ({ variant }: CopyNumberVariantAttributeListProps) => { + const filters = variant.filters || [] + return ( + + + {filters.length > 0 ? ( + filters.map((filter) => ( + + {filterLabel(filter)} + + )) + ) : ( + Pass + )} + + + {variant.sc} + {variant.sn} + + {(variant.sn === 0 ? 0 : variant.sc / variant.sn).toPrecision(4)} + + + + {variant.chrom}:{variant.pos}-{variant.end} + + + + {variant.length === -1 ? '—' : `${(variant.length || 0).toLocaleString()} bp`} + + + {/* @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message */} + {cnvTypeLabels[variant.type]} + + + ) +} export default CopyNumberVariantAttributeList diff --git a/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx b/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx index 5e1f624dd..db5bc07ab 100644 --- a/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx +++ b/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx @@ -12,6 +12,7 @@ import { variantFeedbackUrl } from '../variantFeedback' import CopyNumberVariantAttributeList from './CopyNumberVariantAttributeList' import CopyNumberVariantPopulationsTable from './CopyNumberVariantPopulationsTable' import CNVReferenceList from './CNVReferenceList' +import { ReferenceGenome } from '@gnomad/dataset-metadata/metadata' const Wrapper = styled.div` display: flex; @@ -34,22 +35,25 @@ export type CopyNumberVariant = { sf: number chrom: string end: number - filters: string[] + filters: string[] | null genes: string[] - length: number - populations: { - id: string - sc: number - sn: number - sf: number - }[] + length: number | null + populations: + | { + id: string + sc: number + sn: number + sf: number + }[] + | null pos: number - qual: number - type: string - posmin: number - posmax: number - endmin: number - endmax: number + qual: number | null + reference_genome: ReferenceGenome + type: string | null + posmin: number | null + posmax: number | null + endmin: number | null + endmax: number | null variant_id: string } diff --git a/browser/src/__factories__/CopyNumberVariant.ts b/browser/src/__factories__/CopyNumberVariant.ts index 6c911d844..19a59bff7 100644 --- a/browser/src/__factories__/CopyNumberVariant.ts +++ b/browser/src/__factories__/CopyNumberVariant.ts @@ -20,6 +20,7 @@ const cnvFactory = Factory.define(({ params }) => { posmax = 100121284, endmin = 100168738, endmax = 100168742, + reference_genome = 'GRCh38', } = params const variant_id = `${chrom}__${type}` @@ -43,6 +44,7 @@ const cnvFactory = Factory.define(({ params }) => { endmin, endmax, variant_id, + reference_genome, } }) From f218a0e108e5a543f427c88f4b2511537c1ca22e Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Tue, 26 Mar 2024 15:32:42 -0400 Subject: [PATCH 3/9] Change populations to ancestry_groups in CNV page query and associated fields --- .../CopyNumberVariants.spec.tsx.snap | 18 ++++---- .../CNVPopulationsTable.tsx | 37 ++++++++-------- .../CopyNumberVariantPage.tsx | 21 +++++---- .../CopyNumberVariantPopulationsTable.tsx | 44 ++++++++++--------- .../src/__factories__/CopyNumberVariant.ts | 4 +- 5 files changed, 62 insertions(+), 62 deletions(-) diff --git a/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap b/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap index da494d81e..9d5bc59c2 100644 --- a/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap +++ b/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap @@ -14,6 +14,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` [ { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -21,7 +22,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -35,6 +35,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -42,7 +43,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -56,6 +56,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -63,7 +64,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -111,6 +111,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` [ { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -118,7 +119,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -132,6 +132,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -139,7 +140,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -153,6 +153,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -160,7 +161,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -293,6 +293,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` [ { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -300,7 +301,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -314,6 +314,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -321,7 +322,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, @@ -335,6 +335,7 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, + "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -342,7 +343,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, - "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, diff --git a/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx b/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx index f4b3ce6e8..3baaab0a0 100644 --- a/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx +++ b/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx @@ -62,18 +62,18 @@ const renderPopSF = (sf: number | string) => { return sf } -type OwnPopulationsTableProps = { +type CNVPopulationsTableProps = { columnLabels?: { sc?: string sn?: string sf?: string } - populations: { + ancestry_groups: { id: string name: string sc: number sn: number - subpopulations?: { + subancestry_groups?: { id: string name: string sc: number @@ -86,25 +86,23 @@ type OwnPopulationsTableProps = { type CNVPopulationsTableState = any -type CNVPopulationsTableProps = OwnPopulationsTableProps & typeof CNVPopulationsTable.defaultProps - export class CNVPopulationsTable extends Component< - CNVPopulationsTableProps & { variant: CopyNumberVariant}, + CNVPopulationsTableProps & { variant: CopyNumberVariant }, CNVPopulationsTableState > { static defaultProps = { columnLabels: {}, initiallyExpandRows: false, - variant: {} + variant: {}, } - constructor(props: CNVPopulationsTableProps ) { + constructor(props: CNVPopulationsTableProps) { super(props) this.state = { sortBy: 'sf', sortAscending: false, - expandedPopulations: props.populations.reduce( + expandedPopulations: props.ancestry_groups.reduce( (acc, pop) => ({ ...acc, [pop.name]: props.initiallyExpandRows }), {} ), @@ -157,10 +155,10 @@ export class CNVPopulationsTable extends Component< const { expandedPopulations } = this.state const isExpanded = expandedPopulations[pop.name] const colSpan = isExpanded ? 1 : 2 - const rowSpan = isExpanded ? pop.subpopulations.length + 1 : 1 + const rowSpan = isExpanded ? pop.subancestry_groups.length + 1 : 1 return ( - {pop.subpopulations.length > 0 ? ( + {pop.subancestry_groups.length > 0 ? ( { - const transformedSubpopulations = (pop.subpopulations || []) + const transformedSubpopulations = (pop.subancestry_groups || []) .map((subPop) => ({ id: subPop.id, name: subPop.name, @@ -211,7 +210,7 @@ export class CNVPopulationsTable extends Component< sc: pop.sc, sn: pop.sn, sf: calculatePopSF(pop.sc, pop.sn), - subpopulations: transformedSubpopulations, + subancestry_groups: transformedSubpopulations, } }) .sort((a, b) => { @@ -275,7 +274,7 @@ export class CNVPopulationsTable extends Component< {renderedPopulations.map((pop, i) => ( - + 0 && @@ -291,15 +290,15 @@ export class CNVPopulationsTable extends Component< {pop.sn} {renderPopSF(pop.sf)} - {pop.subpopulations && + {pop.subancestry_groups && expandedPopulations[pop.name] && - pop.subpopulations.map((subPop, j) => ( + pop.subancestry_groups.map((subPop, j) => ( { +const nestPopulations = (ancestry_groups: NamedCopyNumberVariantPopulation[]) => { const popIndices = [] - const subpopulations: Subpopulations = {} + const subancestry_groups: SubancestryGroups = {} - for (let i = 0; i < populations.length; i += 1) { - const pop = populations[i] + for (let i = 0; i < ancestry_groups.length; i += 1) { + const pop = ancestry_groups[i] const divisions = pop.id.split('_') if (divisions.length === 1) { popIndices.push(i) } else { const parentPop = divisions[0] - if (subpopulations[parentPop] === undefined) { - subpopulations[parentPop] = [{ ...pop }] + if (subancestry_groups[parentPop] === undefined) { + subancestry_groups[parentPop] = [{ ...pop }] } else { - subpopulations[parentPop].push({ ...pop }) + subancestry_groups[parentPop].push({ ...pop }) } } } return popIndices.map((index) => { - const pop = populations[index] + const pop = ancestry_groups[index] return { ...pop, - subpopulations: subpopulations[pop.id], + subancestry_groups: subancestry_groups[pop.id], } }) } -const addPopulationNames = (populations: CopyNumberVariantPopulation[]) => { - return populations.map((pop: CopyNumberVariantPopulation) => { +const addPopulationNames = (ancestry_groups: CopyNumberVariantPopulation[] | null) => { + return (ancestry_groups || []).map((pop: CopyNumberVariantPopulation) => { let name if (pop.id === 'XX' || pop.id.endsWith('_XX')) { name = 'XX' @@ -64,7 +60,7 @@ type CopyNumberVariantPopulationsTableProps = { } const CopyNumberVariantPopulationsTable = ({ variant }: CopyNumberVariantPopulationsTableProps) => { - const populations = nestPopulations(addPopulationNames((variant as any).populations)) + const ancestry_groups = nestPopulations(addPopulationNames(variant.ancestry_groups)) const columnLabels = { sc: 'Site Count', @@ -72,7 +68,13 @@ const CopyNumberVariantPopulationsTable = ({ variant }: CopyNumberVariantPopulat sf: 'Site Frequency', } - return + return ( + + ) } export default CopyNumberVariantPopulationsTable diff --git a/browser/src/__factories__/CopyNumberVariant.ts b/browser/src/__factories__/CopyNumberVariant.ts index 19a59bff7..bb72dcb3b 100644 --- a/browser/src/__factories__/CopyNumberVariant.ts +++ b/browser/src/__factories__/CopyNumberVariant.ts @@ -12,7 +12,7 @@ const cnvFactory = Factory.define(({ params }) => { filters = [], genes = [], length = 333, - populations = [], + ancestry_groups = [], pos = 123, qual = 99, type = 'DUP', @@ -35,7 +35,6 @@ const cnvFactory = Factory.define(({ params }) => { filters, genes, length, - populations, pos, qual, type, @@ -45,6 +44,7 @@ const cnvFactory = Factory.define(({ params }) => { endmax, variant_id, reference_genome, + ancestry_groups, } }) From 540099a0aec8b2b0664e1bf05b4f9689b8574b12 Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Tue, 26 Mar 2024 15:45:35 -0400 Subject: [PATCH 4/9] Change populations to ancestry_groups in mitochondrial variant query and associated fields --- .../src/MitochondrialVariantPage/MitochondrialVariantPage.tsx | 4 ++-- .../MitochondrialVariantPopulationFrequenciesTable.tsx | 2 +- browser/src/__factories__/MitochondrialVariant.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx b/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx index aa98db5a4..4cbffee0d 100644 --- a/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx +++ b/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx @@ -99,7 +99,7 @@ export type MitochondrialVariant = { ac_het: number }[] max_heteroplasmy: number | null - populations: { + ancestry_groups: { id: PopulationId an: number ac_het: number @@ -330,7 +330,7 @@ query ${operationName}($variantId: String!, $datasetId: DatasetId!, $referenceGe mitotip_trna_prediction pon_ml_probability_of_pathogenicity pon_mt_trna_prediction - populations { + ancestry_groups { id ac_het ac_hom diff --git a/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx b/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx index cb7c7a3ff..3741190b9 100644 --- a/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx +++ b/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx @@ -84,7 +84,7 @@ const MitochondrialVariantPopulationFrequenciesTable = ({ ) } - const renderedPopulations = variant.populations + const renderedPopulations = variant.ancestry_groups .map((population) => ({ ...population, af_hom: population.an !== 0 ? population.ac_hom / population.an : 0, diff --git a/browser/src/__factories__/MitochondrialVariant.ts b/browser/src/__factories__/MitochondrialVariant.ts index 5895e4eac..2066651f5 100644 --- a/browser/src/__factories__/MitochondrialVariant.ts +++ b/browser/src/__factories__/MitochondrialVariant.ts @@ -15,7 +15,7 @@ const mitochondrialVariantFactory = Factory.define( haplogroup_defining = null, haplogroups = [], max_heteroplasmy = 0.1, - populations = [], + ancestry_groups = [], pos = 123, ref = 'A', rsids = null, @@ -50,7 +50,7 @@ const mitochondrialVariantFactory = Factory.define( haplogroup_defining, haplogroups, max_heteroplasmy, - populations, + ancestry_groups, pos, ref, reference_genome: 'GRCh38', From a42e0e3af5bd0c1269c5206c29dd3745ee3d76e2 Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Tue, 26 Mar 2024 16:02:16 -0400 Subject: [PATCH 5/9] Change populations to ancestry_groups in short tandem repat page query and associated fields --- .../ShortTandemRepeatPage.tsx | 18 +- .../ShortTandemRepeatPageContainer.tsx | 16 +- .../ShortTandemRepeatPage.spec.tsx.snap | 288 +++++++++--------- ...ortTandemRepeatPageContainer.spec.tsx.snap | 288 +++++++++--------- .../src/__factories__/ShortTandemRepeat.ts | 4 +- 5 files changed, 308 insertions(+), 306 deletions(-) diff --git a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx index 833e19460..808c3e4e6 100644 --- a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx +++ b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx @@ -29,7 +29,7 @@ import ShortTandemRepeatAdjacentRepeatSection from './ShortTandemRepeatAdjacentR type ShortTandemRepeatRepeatUnit = { repeat_unit: string distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] @@ -46,7 +46,7 @@ export type ShortTandemRepeatAdjacentRepeat = { repeat_units: string[] allele_size_distribution: { distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] @@ -54,14 +54,14 @@ export type ShortTandemRepeatAdjacentRepeat = { } genotype_distribution: { distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] repeat_units: { repeat_units: string[] distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] @@ -101,7 +101,7 @@ export type ShortTandemRepeat = { }[] allele_size_distribution: { distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] @@ -109,14 +109,14 @@ export type ShortTandemRepeat = { } genotype_distribution: { distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] repeat_units: { repeat_units: string[] distribution: number[][] - populations: { + ancestry_groups: { id: string distribution: number[][] }[] @@ -183,7 +183,9 @@ const ShortTandemRepeatPage = ({ datasetId, shortTandemRepeat }: ShortTandemRepe const [showAdjacentRepeats, setShowAdjacentRepeats] = useState(false) - const populationIds = shortTandemRepeat.allele_size_distribution.populations.map((pop) => pop.id) + const populationIds = shortTandemRepeat.allele_size_distribution.ancestry_groups.map( + (pop) => pop.id + ) const allRepeatUnitsByClassification: Record = {} shortTandemRepeat.repeat_units.forEach((repeatUnit) => { diff --git a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx index ba8d0cd18..f09dfd722 100644 --- a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx +++ b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx @@ -43,14 +43,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -58,14 +58,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -87,14 +87,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -102,14 +102,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } diff --git a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap index 2e24e057c..6e386515e 100644 --- a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap +++ b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap @@ -15,13 +15,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -56,8 +56,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -120,13 +120,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -161,8 +161,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -364,13 +364,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -405,8 +405,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -508,13 +508,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -549,8 +549,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -584,13 +584,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -625,8 +625,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -689,13 +689,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -730,8 +730,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -933,13 +933,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -974,8 +974,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1077,13 +1077,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1118,8 +1118,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1153,13 +1153,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1194,8 +1194,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1258,13 +1258,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1299,8 +1299,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1502,13 +1502,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1543,8 +1543,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1646,13 +1646,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1687,8 +1687,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1722,13 +1722,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1763,8 +1763,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1827,13 +1827,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1868,8 +1868,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2071,13 +2071,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2112,8 +2112,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2215,13 +2215,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2256,8 +2256,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2291,13 +2291,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2332,8 +2332,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2396,13 +2396,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2437,8 +2437,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2640,13 +2640,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2681,8 +2681,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2784,13 +2784,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2825,8 +2825,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2860,13 +2860,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2901,8 +2901,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2965,13 +2965,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3006,8 +3006,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3209,13 +3209,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3250,8 +3250,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3353,13 +3353,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3394,8 +3394,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3429,13 +3429,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3470,8 +3470,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3534,13 +3534,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3575,8 +3575,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3778,13 +3778,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3819,8 +3819,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3922,13 +3922,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3963,8 +3963,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3998,13 +3998,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4039,8 +4039,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4103,13 +4103,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4144,8 +4144,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4347,13 +4347,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4388,8 +4388,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4491,13 +4491,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4532,8 +4532,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4567,13 +4567,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4608,8 +4608,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4672,13 +4672,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4713,8 +4713,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4916,13 +4916,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4957,8 +4957,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5060,13 +5060,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5101,8 +5101,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5136,13 +5136,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5177,8 +5177,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5241,13 +5241,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5282,8 +5282,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5485,13 +5485,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5526,8 +5526,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5629,13 +5629,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5670,8 +5670,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5705,13 +5705,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5746,8 +5746,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5810,13 +5810,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5851,8 +5851,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6054,13 +6054,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6095,8 +6095,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6198,13 +6198,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6239,8 +6239,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6274,13 +6274,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6315,8 +6315,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6379,13 +6379,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6420,8 +6420,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6623,13 +6623,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6664,8 +6664,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6767,13 +6767,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6808,8 +6808,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6843,13 +6843,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6884,8 +6884,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6948,13 +6948,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6989,8 +6989,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7192,13 +7192,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7233,8 +7233,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7336,13 +7336,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7377,8 +7377,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7412,13 +7412,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7453,8 +7453,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7517,13 +7517,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7558,8 +7558,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7761,13 +7761,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7802,8 +7802,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7905,13 +7905,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7946,8 +7946,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7981,13 +7981,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8022,8 +8022,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8086,13 +8086,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8127,8 +8127,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8330,13 +8330,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8371,8 +8371,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8474,13 +8474,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8515,8 +8515,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8550,13 +8550,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8591,8 +8591,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8655,13 +8655,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8696,8 +8696,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8899,13 +8899,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8940,8 +8940,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9043,13 +9043,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9084,8 +9084,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9119,13 +9119,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9160,8 +9160,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9224,13 +9224,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9265,8 +9265,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9468,13 +9468,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9509,8 +9509,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9612,13 +9612,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9653,8 +9653,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9688,13 +9688,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9729,8 +9729,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9793,13 +9793,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9834,8 +9834,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -10037,13 +10037,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -10078,8 +10078,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", @@ -10181,13 +10181,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { + "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], - "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -10222,8 +10222,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { + "ancestry_groups": [], "distribution": [], - "populations": [], "repeat_units": [], }, "id": "STR1", diff --git a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap index bf08ae377..e00f8304e 100644 --- a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap +++ b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap @@ -61,14 +61,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -76,14 +76,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -105,14 +105,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -120,14 +120,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -212,14 +212,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -227,14 +227,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -256,14 +256,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -271,14 +271,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -363,14 +363,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -378,14 +378,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -407,14 +407,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -422,14 +422,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -514,14 +514,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -529,14 +529,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -558,14 +558,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -573,14 +573,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -665,14 +665,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -680,14 +680,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -709,14 +709,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -724,14 +724,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -816,14 +816,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -831,14 +831,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -860,14 +860,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -875,14 +875,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -967,14 +967,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -982,14 +982,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1011,14 +1011,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1026,14 +1026,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1118,14 +1118,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1133,14 +1133,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1162,14 +1162,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1177,14 +1177,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1269,14 +1269,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1284,14 +1284,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1313,14 +1313,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1328,14 +1328,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1420,14 +1420,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1435,14 +1435,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1464,14 +1464,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1479,14 +1479,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1571,14 +1571,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1586,14 +1586,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1615,14 +1615,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1630,14 +1630,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1722,14 +1722,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1737,14 +1737,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1766,14 +1766,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1781,14 +1781,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1873,14 +1873,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1888,14 +1888,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -1917,14 +1917,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -1932,14 +1932,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2024,14 +2024,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2039,14 +2039,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2068,14 +2068,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2083,14 +2083,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2175,14 +2175,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2190,14 +2190,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2219,14 +2219,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2234,14 +2234,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2326,14 +2326,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2341,14 +2341,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2370,14 +2370,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2385,14 +2385,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2477,14 +2477,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2492,14 +2492,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2521,14 +2521,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2536,14 +2536,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2628,14 +2628,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2643,14 +2643,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } @@ -2672,14 +2672,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_unit distribution - populations { + ancestry_groups { id distribution } @@ -2687,14 +2687,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - populations { + ancestry_groups { id distribution } repeat_units { repeat_units distribution - populations { + ancestry_groups { id distribution } diff --git a/browser/src/__factories__/ShortTandemRepeat.ts b/browser/src/__factories__/ShortTandemRepeat.ts index c2d8ff741..61515a971 100644 --- a/browser/src/__factories__/ShortTandemRepeat.ts +++ b/browser/src/__factories__/ShortTandemRepeat.ts @@ -30,10 +30,10 @@ const shortTandemRepeatFactory = Factory.define(({ params, as reference_region = { chrom: '1', start: 10000000, stop: 15000000 }, allele_size_distribution = { distribution: [[1, 1]], - populations: [], + ancestry_groups: [], repeat_units: [], }, - genotype_distribution = { distribution: [], populations: [], repeat_units: [] }, + genotype_distribution = { distribution: [], ancestry_groups: [], repeat_units: [] }, } = associations return { From 99641ff228bf7b88ee9755122e6911d80d43e085 Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Wed, 27 Mar 2024 11:26:51 -0400 Subject: [PATCH 6/9] Change populations to ancestry_groups in structural variant page --- .../StructuralVariants.spec.tsx.snap | 18 ++++++------- .../StructuralVariantPage.tsx | 6 ++--- .../StructuralVariantPopulationsTable.tsx | 26 +++++++++---------- .../src/__factories__/StructuralVariant.ts | 4 +-- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap b/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap index e7ac41817..5b1102e5b 100644 --- a/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap +++ b/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap @@ -53,6 +53,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -70,7 +71,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -86,6 +86,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -103,7 +104,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -119,6 +119,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -136,7 +137,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -197,6 +197,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -214,7 +215,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -230,6 +230,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -247,7 +248,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -263,6 +263,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -280,7 +281,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -437,6 +437,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -454,7 +455,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -470,6 +470,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -487,7 +488,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -503,6 +503,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, + "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -520,7 +521,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, - "populations": [], "pos": 123, "pos2": null, "qual": 99, diff --git a/browser/src/StructuralVariantPage/StructuralVariantPage.tsx b/browser/src/StructuralVariantPage/StructuralVariantPage.tsx index 1aaba756e..71bd3c225 100644 --- a/browser/src/StructuralVariantPage/StructuralVariantPage.tsx +++ b/browser/src/StructuralVariantPage/StructuralVariantPage.tsx @@ -72,15 +72,13 @@ export type StructuralVariant = { alt: Histogram | null } | null length: number | null - populations: + ancestry_groups: | { id: string ac: number an: number homozygote_count: number | null hemizygote_count: number | null - ac_hemi: number | null - ac_hom: number | null }[] | null pos: number @@ -243,7 +241,7 @@ const ConnectedStructuralVariantPage = ({ } } length - populations { + ancestry_groups { id ac an diff --git a/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx b/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx index 552123eaf..bbf096e0a 100644 --- a/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx +++ b/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx @@ -4,12 +4,12 @@ import { PopulationsTable } from '../VariantPage/PopulationsTable' import { StructuralVariant } from './StructuralVariantPage' import { populationName } from '@gnomad/dataset-metadata/gnomadPopulations' -const nestPopulations = (populations: any) => { +const nestPopulations = (ancestry_groups: any) => { const popIndices = [] - const subpopulations = {} + const subancestry_groups = {} - for (let i = 0; i < populations.length; i += 1) { - const pop = populations[i] + for (let i = 0; i < ancestry_groups.length; i += 1) { + const pop = ancestry_groups[i] // IDs are one of: // * pop @@ -22,28 +22,28 @@ const nestPopulations = (populations: any) => { } else { const parentPop = divisions[0] // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - if (subpopulations[parentPop] === undefined) { + if (subancestry_groups[parentPop] === undefined) { // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - subpopulations[parentPop] = [{ ...pop }] + subancestry_groups[parentPop] = [{ ...pop }] } else { // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - subpopulations[parentPop].push({ ...pop }) + subancestry_groups[parentPop].push({ ...pop }) } } } return popIndices.map((index) => { - const pop = populations[index] + const pop = ancestry_groups[index] return { ...pop, // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - subpopulations: subpopulations[pop.id], + subancestry_groups: subancestry_groups[pop.id], } }) } -const addPopulationNames = (populations: any) => { - return populations.map((pop: any) => { +const addPopulationNames = (ancestry_groups: any) => { + return ancestry_groups.map((pop: any) => { let name if (pop.id === 'XX' || pop.id.endsWith('_XX')) { name = 'XX' @@ -61,7 +61,7 @@ type StructuralVariantPopulationsTableProps = { } const StructuralVariantPopulationsTable = ({ variant }: StructuralVariantPopulationsTableProps) => { - const populations = nestPopulations(addPopulationNames((variant as any).populations)) + const ancestry_groups = nestPopulations(addPopulationNames(variant.ancestry_groups)) const columnLabels = variant.type === 'MCNV' @@ -75,7 +75,7 @@ const StructuralVariantPopulationsTable = ({ variant }: StructuralVariantPopulat return ( diff --git a/browser/src/__factories__/StructuralVariant.ts b/browser/src/__factories__/StructuralVariant.ts index 6c5cfa750..43e3443bf 100644 --- a/browser/src/__factories__/StructuralVariant.ts +++ b/browser/src/__factories__/StructuralVariant.ts @@ -23,7 +23,7 @@ const structuralVariantFactory = Factory.define( filters = [], genes = [], length = 333, - populations = [], + ancestry_groups = [], pos = 123, pos2 = null, qual = 99, @@ -62,7 +62,7 @@ const structuralVariantFactory = Factory.define( genes, genotype_quality, length, - populations, + ancestry_groups, pos, pos2, qual, From 1c390b2c7a65fb71270e9ec2f016b2e0b16f6c8d Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Wed, 27 Mar 2024 11:37:26 -0400 Subject: [PATCH 7/9] Change populations to ancestry_groups in variant cooccurrence page --- .../VariantCooccurrencePage.spec.tsx | 2 +- .../VariantCooccurrencePage.tsx | 21 ++++++++++--------- .../VariantCooccurrenceSummaryTable.tsx | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx index e12f7b3b2..b18cebc7e 100644 --- a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx +++ b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx @@ -32,7 +32,7 @@ const baseApiResponse = { haplotype_counts: [10, 11, 12, 13], p_compound_heterozygous: 0.123, // TK calculate in real value - populations: [], + ancestry_groups: [], }, variant1: { exome: { ac: 999, an: 101010 }, diff --git a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx index e39a2842a..a3e12e1c3 100644 --- a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx +++ b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx @@ -44,7 +44,7 @@ export type CooccurrenceData = { genotype_counts: GenotypeCounts haplotype_counts: HaplotypeCounts p_compound_heterozygous: number | null - populations: { + ancestry_groups: { id: string genotype_counts: GenotypeCounts haplotype_counts: HaplotypeCounts @@ -193,7 +193,7 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => { const cooccurrenceInSelectedPopulation = selectedPopulation === 'All' ? cooccurrenceData - : cooccurrenceData.populations!.find((pop: any) => pop.id === selectedPopulation)! + : cooccurrenceData.ancestry_groups!.find((pop) => pop.id === selectedPopulation)! const prediction = makePrediction(cooccurrenceInSelectedPopulation) @@ -206,9 +206,10 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => { cooccurrenceData.genotype_counts.hom_hom > 0 - const anyPopulationWithoutPrediction = [cooccurrenceData, ...cooccurrenceData.populations].some( - noPredictionPossible - ) + const anyPopulationWithoutPrediction = [ + cooccurrenceData, + ...cooccurrenceData.ancestry_groups, + ].some(noPredictionPossible) const isDistantCis = prediction === 'in_cis' && variantDistance(cooccurrenceData) > distantCisThreshold @@ -325,7 +326,7 @@ query ${operationName}($variants: [String!]!, $variant1: String!, $variant2: Str genotype_counts haplotype_counts p_compound_heterozygous - populations { + ancestry_groups { id genotype_counts haplotype_counts @@ -444,12 +445,12 @@ const structureCounts = (population: ArrayCountPopulation): ObjectCountPopulatio } const normalizeCooccurrenceData = (cooccurrenceData: any): CooccurrenceData => { - const populations = cooccurrenceData.populations - ? cooccurrenceData.populations.map(structureCounts) - : cooccurrenceData.populations + const ancestry_groups = cooccurrenceData.ancestry_groups + ? cooccurrenceData.ancestry_groups.map(structureCounts) + : cooccurrenceData.ancestry_groups const topLevel = structureCounts(cooccurrenceData) - return { ...topLevel, populations } as CooccurrenceData + return { ...topLevel, ancestry_groups } as CooccurrenceData } const VariantCoocurrenceContainer = ({ diff --git a/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx b/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx index ff01453de..387273aea 100644 --- a/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx +++ b/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx @@ -80,7 +80,7 @@ const VariantCooccurrenceSummaryTable = ({ - {cooccurrenceData.populations.map((pop) => ( + {cooccurrenceData.ancestry_groups.map((pop) => ( Date: Wed, 27 Mar 2024 12:03:40 -0400 Subject: [PATCH 8/9] Change populations to ancestry_groups in variant page --- .../src/VariantList/ExportVariantsButton.tsx | 6 ++--- .../mergeExomeAndGenomeData.spec.ts | 24 +++++++++---------- .../VariantList/mergeExomeAndGenomeData.ts | 20 ++++++++-------- browser/src/VariantPage/VariantPage.tsx | 14 +++++------ .../VariantPopulationFrequencies.tsx | 14 +++++------ browser/src/__factories__/Variant.ts | 12 +++++----- 6 files changed, 45 insertions(+), 45 deletions(-) diff --git a/browser/src/VariantList/ExportVariantsButton.tsx b/browser/src/VariantList/ExportVariantsButton.tsx index 7f79c239f..3a9e93bba 100644 --- a/browser/src/VariantList/ExportVariantsButton.tsx +++ b/browser/src/VariantList/ExportVariantsButton.tsx @@ -22,8 +22,8 @@ const getValueGivenProperty = ( variant: VariantTableVariant, property: Property ) => { - return variant.populations.filter((v) => v.id === popId)[0] - ? JSON.stringify(variant.populations.filter((v) => v.id === popId)[0][property]) + return variant.ancestry_groups.filter((v) => v.id === popId)[0] + ? JSON.stringify(variant.ancestry_groups.filter((v) => v.id === popId)[0][property]) : '' } @@ -342,7 +342,7 @@ export type VariantTableVariant = { hgvs?: string hgvsc?: string hgvsp?: string - populations: Population[] + ancestry_groups: Population[] pos: number rsids?: string[] transcript_id: string diff --git a/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts b/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts index 7bef38bd1..58e859e74 100644 --- a/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts +++ b/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts @@ -26,7 +26,7 @@ const createAncestryGroupObjects = (shorthands: AncestryGroupShorthand[]) => { } describe('mergeExomeAndGenomePopulationData', () => { - it('returns expected values when exomes and genomes have the same populations', () => { + it('returns expected values when exomes and genomes have the same ancestry_groups', () => { const geneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'afr', value: 1 }, { id: 'remaining', value: 2 }, @@ -35,8 +35,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { populations: geneticAncestryGroupObjects }, - genome: { populations: geneticAncestryGroupObjects }, + exome: { ancestry_groups: geneticAncestryGroupObjects }, + genome: { ancestry_groups: geneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) @@ -50,7 +50,7 @@ describe('mergeExomeAndGenomePopulationData', () => { expect(result).toStrictEqual(expected) }) - it('returns expected values when exomes have less populations than genomes', () => { + it('returns expected values when exomes have less ancestry_groups than genomes', () => { const exomeGeneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'afr', value: 1 }, { id: 'remaining', value: 2 }, @@ -66,8 +66,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { populations: exomeGeneticAncestryGroupObjects }, - genome: { populations: genomeGeneticAncestryGroupObjects }, + exome: { ancestry_groups: exomeGeneticAncestryGroupObjects }, + genome: { ancestry_groups: genomeGeneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) @@ -82,7 +82,7 @@ describe('mergeExomeAndGenomePopulationData', () => { expect(result).toStrictEqual(expected) }) - it('returns expected values exomes have more populations than genomes', () => { + it('returns expected values exomes have more ancestry_groups than genomes', () => { const exomeGeneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'afr', value: 1 }, { id: 'remaining', value: 2 }, @@ -98,8 +98,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { populations: exomeGeneticAncestryGroupObjects }, - genome: { populations: genomeGeneticAncestryGroupObjects }, + exome: { ancestry_groups: exomeGeneticAncestryGroupObjects }, + genome: { ancestry_groups: genomeGeneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) @@ -114,7 +114,7 @@ describe('mergeExomeAndGenomePopulationData', () => { expect(result).toStrictEqual(expected) }) - it('returns expected values when exome and genome populations are in a different order', () => { + it('returns expected values when exome and genome ancestry_groups are in a different order', () => { const exomeGeneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'eur', value: 1 }, { id: 'afr', value: 2 }, @@ -129,8 +129,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { populations: exomeGeneticAncestryGroupObjects }, - genome: { populations: genomeGeneticAncestryGroupObjects }, + exome: { ancestry_groups: exomeGeneticAncestryGroupObjects }, + genome: { ancestry_groups: genomeGeneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) diff --git a/browser/src/VariantList/mergeExomeAndGenomeData.ts b/browser/src/VariantList/mergeExomeAndGenomeData.ts index 64f00fa43..203649671 100644 --- a/browser/src/VariantList/mergeExomeAndGenomeData.ts +++ b/browser/src/VariantList/mergeExomeAndGenomeData.ts @@ -7,10 +7,10 @@ export const mergeExomeAndGenomePopulationData = ( exome: SequencingType, genome: SequencingType ) => { - const populations: { [key: string]: Population } = {} + const ancestry_groups: { [key: string]: Population } = {} - exome.populations.forEach((exomePopulation: Population) => { - populations[exomePopulation.id] = { + exome.ancestry_groups.forEach((exomePopulation: Population) => { + ancestry_groups[exomePopulation.id] = { id: exomePopulation.id, ac: exomePopulation.ac, an: exomePopulation.an, @@ -19,10 +19,10 @@ export const mergeExomeAndGenomePopulationData = ( } }) - genome.populations.forEach((genomePopulation: Population) => { - if (genomePopulation.id in populations) { - const entry = populations[genomePopulation.id] - populations[genomePopulation.id] = { + genome.ancestry_groups.forEach((genomePopulation: Population) => { + if (genomePopulation.id in ancestry_groups) { + const entry = ancestry_groups[genomePopulation.id] + ancestry_groups[genomePopulation.id] = { id: genomePopulation.id, ac: add(entry.ac, genomePopulation.ac), an: add(entry.an, genomePopulation.an), @@ -30,7 +30,7 @@ export const mergeExomeAndGenomePopulationData = ( ac_hom: add(entry.ac_hom, genomePopulation.ac_hom), } } else { - populations[genomePopulation.id] = { + ancestry_groups[genomePopulation.id] = { id: genomePopulation.id, ac: genomePopulation.ac, an: genomePopulation.an, @@ -40,7 +40,7 @@ export const mergeExomeAndGenomePopulationData = ( } }) - return Object.values(populations) + return Object.values(ancestry_groups) } const mergeExomeAndGenomeData = (variants: any) => @@ -74,7 +74,7 @@ const mergeExomeAndGenomeData = (variants: any) => ac_hemi: add(exome.ac_hemi, genome.ac_hemi), ac_hom: add(exome.ac_hom, genome.ac_hom), filters: exome.filters.concat(genome.filters), - populations: mergeExomeAndGenomePopulationData(exome!, genome!), + ancestry_groups: mergeExomeAndGenomePopulationData(exome!, genome!), } }) diff --git a/browser/src/VariantPage/VariantPage.tsx b/browser/src/VariantPage/VariantPage.tsx index 9e3e63820..ec2eca357 100644 --- a/browser/src/VariantPage/VariantPage.tsx +++ b/browser/src/VariantPage/VariantPage.tsx @@ -194,8 +194,8 @@ export type SequencingType = { hemizygote_count: number | null faf95: Faf95 filters: string[] - populations: Population[] - local_ancestry_populations: LocalAncestryPopulation[] + ancestry_groups: Population[] + local_ancestry_groups: LocalAncestryPopulation[] age_distribution: AgeDistribution | null quality_metrics: VariantQualityMetrics } @@ -348,7 +348,7 @@ export const VariantPageContent = ({ datasetId, variant }: VariantPageContentPro Genetic Ancestry Group Frequencies {hasLocalAncestryPopulations(datasetId) && - ((variant.genome && variant.genome.local_ancestry_populations) || []).length > 0 && ( + ((variant.genome && variant.genome.local_ancestry_groups) || []).length > 0 && (
{ if (hasLocalAncestryPopulations(datasetId) && variant.genome) { const genome = variant.genome! - const genomePopulations = genome.populations.filter( + const genomePopulations = genome.ancestry_groups.filter( (pop) => !(pop.id.startsWith('hgdp:') || pop.id.startsWith('1kg:')) ) const exomePopulations = variant.exome - ? variant.exome.populations.filter( + ? variant.exome.ancestry_groups.filter( (pop) => !(pop.id.startsWith('hgdp:') || pop.id.startsWith('1kg:')) ) : [] - const hgdpPopulations = genome.populations + const hgdpPopulations = genome.ancestry_groups .filter((pop) => pop.id.startsWith('hgdp:')) .map((pop) => ({ ...pop, id: pop.id.slice(5) })) // Remove hgdp: prefix - const tgpPopulations = genome.populations + const tgpPopulations = genome.ancestry_groups .filter((pop) => pop.id.startsWith('1kg:')) .map((pop) => ({ ...pop, id: pop.id.slice(4) })) // Remove 1kg: prefix - const localAncestryPopulations = genome.local_ancestry_populations || [] + const localAncestryPopulations = genome.local_ancestry_groups || [] return ( // @ts-expect-error TS(2741) FIXME: Property 'onChange' is missing in type '{ tabs: { ... Remove this comment to see the full error message @@ -141,8 +141,8 @@ const VariantPopulationFrequencies = ({ datasetId, variant }: Props) => { diff --git a/browser/src/__factories__/Variant.ts b/browser/src/__factories__/Variant.ts index e52106d5b..e4b74092c 100644 --- a/browser/src/__factories__/Variant.ts +++ b/browser/src/__factories__/Variant.ts @@ -148,7 +148,7 @@ export const variantTableVariantFactory = Factory.define( hgvs = 'string', hgvsc = 'string', hgvsp = 'string', - populations = [], + ancestry_groups = [], pos = 1, rsids = [], variant_id = '', @@ -177,7 +177,7 @@ export const variantTableVariantFactory = Factory.define( hgvs, hgvsc, hgvsp, - populations, + ancestry_groups, pos, rsids, variant_id, @@ -198,8 +198,8 @@ export const sequencingFactory = Factory.define(({ params, assoc homozygote_count = null, hemizygote_count = null, filters = [], - populations = [], - local_ancestry_populations = [], + ancestry_groups = [], + local_ancestry_groups = [], ac_hemi = 1, ac_hom = 1, } = params @@ -226,8 +226,8 @@ export const sequencingFactory = Factory.define(({ params, assoc homozygote_count, hemizygote_count, filters, - populations, - local_ancestry_populations, + ancestry_groups, + local_ancestry_groups, age_distribution, quality_metrics, faf95, From 586e7269501e8369b55f1dd7ddd186efab21535e Mon Sep 17 00:00:00 2001 From: Phil Darnowsky Date: Tue, 2 Apr 2024 12:48:14 -0400 Subject: [PATCH 9/9] Revert frontend references to new ancestry_groups fields Trying to do this systematically with the unstructured queries we have is proving to be error-prone and risky. --- .../CopyNumberVariantPlot.tsx | 1 + .../CopyNumberVariantPropType.ts | 61 ++++ .../CopyNumberVariantTracks.tsx | 6 +- .../CopyNumberVariants.tsx | 4 +- .../CopyNumberVariants.spec.tsx.snap | 27 +- .../copyNumberVariantTableColumns.tsx | 2 +- .../CNVPopulationsTable.tsx | 37 +-- .../CopyNumberVariantAttributeList.tsx | 69 ++--- .../CopyNumberVariantPage.tsx | 35 +-- .../CopyNumberVariantPopulationsTable.tsx | 44 ++- .../MitochondrialVariantPage.tsx | 4 +- ...drialVariantPopulationFrequenciesTable.tsx | 2 +- .../ShortTandemRepeatPage.tsx | 18 +- .../ShortTandemRepeatPageContainer.tsx | 16 +- .../ShortTandemRepeatPage.spec.tsx.snap | 288 +++++++++--------- ...ortTandemRepeatPageContainer.spec.tsx.snap | 288 +++++++++--------- .../StructuralVariants.spec.tsx.snap | 18 +- .../StructuralVariantPage.tsx | 6 +- .../StructuralVariantPopulationsTable.tsx | 26 +- .../VariantCooccurrencePage.spec.tsx | 2 +- .../VariantCooccurrencePage.tsx | 21 +- .../VariantCooccurrenceSummaryTable.tsx | 2 +- .../src/VariantList/ExportVariantsButton.tsx | 6 +- .../mergeExomeAndGenomeData.spec.ts | 24 +- .../VariantList/mergeExomeAndGenomeData.ts | 20 +- browser/src/VariantPage/VariantPage.tsx | 14 +- .../VariantPopulationFrequencies.tsx | 14 +- .../src/__factories__/CopyNumberVariant.ts | 6 +- .../src/__factories__/MitochondrialVariant.ts | 4 +- .../src/__factories__/ShortTandemRepeat.ts | 4 +- .../src/__factories__/StructuralVariant.ts | 4 +- browser/src/__factories__/Variant.ts | 12 +- 32 files changed, 564 insertions(+), 521 deletions(-) create mode 100644 browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx b/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx index 37d79aa9b..ea107a570 100644 --- a/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx +++ b/browser/src/CopyNumberVariantList/CopyNumberVariantPlot.tsx @@ -8,6 +8,7 @@ type Props = { variant: { pos: number end: number + type: string } width: number } diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts b/browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts new file mode 100644 index 000000000..1a36868e5 --- /dev/null +++ b/browser/src/CopyNumberVariantList/CopyNumberVariantPropType.ts @@ -0,0 +1,61 @@ +import PropTypes from 'prop-types' + +// TODO: MATCH EVERYTHING WITH THE API TYPE +type CopyNumberVariantPropType = { + alts?: string[] | null + sc: number + sn: number + sf: number + chrom: string + end: number + filters?: string[] + genes?: string[] + length: number + populations?: { + id: string + sc: number + sn: number + sf: number + }[] + pos: number + qual?: number + type: string + posmin?: number + posmax?: number + endmin?: number + endmax?: number + variant_id: string +} + +const PopulationPropType = PropTypes.shape({ + id: PropTypes.string.isRequired, + sc: PropTypes.number.isRequired, + sn: PropTypes.number.isRequired, + sf: PropTypes.number.isRequired, +}) + +// @ts-expect-error TS(2322) FIXME: Type 'Requireable = PropTypes.shape( + { + alts: PropTypes.arrayOf(PropTypes.string), + sc: PropTypes.number.isRequired, + sn: PropTypes.number.isRequired, + sf: PropTypes.number, + chrom: PropTypes.string.isRequired, + end: PropTypes.number.isRequired, + filters: PropTypes.arrayOf(PropTypes.string.isRequired), + genes: PropTypes.arrayOf(PropTypes.string), + length: PropTypes.number.isRequired, + populations: PropTypes.arrayOf(PopulationPropType), + pos: PropTypes.number.isRequired, + qual: PropTypes.number, + type: PropTypes.string.isRequired, + posmin: PropTypes.number.isRequired, + posmax: PropTypes.number.isRequired, + endmin: PropTypes.number.isRequired, + endmax: PropTypes.number.isRequired, + variant_id: PropTypes.string.isRequired, + } +) + +export default CopyNumberVariantPropType diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx b/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx index 08c701681..ba82ea98d 100644 --- a/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx +++ b/browser/src/CopyNumberVariantList/CopyNumberVariantTracks.tsx @@ -6,7 +6,7 @@ import { Track } from '@gnomad/region-viewer' import Link from '../Link' import CopyNumberVariantPlot from './CopyNumberVariantPlot' -import { CopyNumberVariant } from '../CopyNumberVariantPage/CopyNumberVariantPage' +import CopyNumberVariantPropType from './CopyNumberVariantPropType' type RowProps = { data: { @@ -15,7 +15,7 @@ type RowProps = { onHover: (...args: any[]) => any scalePosition: (...args: any[]) => any trackColor: (...args: any[]) => any - variants: CopyNumberVariant[] + variants: CopyNumberVariantPropType[] width: number } index: number @@ -67,7 +67,7 @@ type OwnCopyNumberVariantTracksProps = { onScroll: (...args: any[]) => any trackColor: (...args: any[]) => any trackHeight: number - variants: CopyNumberVariant[] + variants: CopyNumberVariantPropType[] } // @ts-expect-error TS(2456) FIXME: Type alias 'OwnCopyNumberVariantTracksProps' circular... Remove this comment to see the full error message diff --git a/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx b/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx index 475fb7501..51e1571ed 100644 --- a/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx +++ b/browser/src/CopyNumberVariantList/CopyNumberVariants.tsx @@ -16,7 +16,7 @@ import filterCopyNumberVariants from './filterCopyNumberVariants' import CopyNumberVariantFilterControls from './CopyNumberVariantFilterControls' import { cnvTypeColors } from './copyNumberVariantTypes' -import { CopyNumberVariant } from '../CopyNumberVariantPage/CopyNumberVariantPage' +import CopyNumberVariantPropType from './CopyNumberVariantPropType' import copyNumberVariantTableColumns, { getColumnsForContext, } from './copyNumberVariantTableColumns' @@ -48,7 +48,7 @@ export interface Context { type CopyNumberVariantsProps = { context: Context exportFileName: string - variants: CopyNumberVariant[] + variants: CopyNumberVariantPropType[] } const CopyNumberVariants = ({ context, exportFileName, variants }: CopyNumberVariantsProps) => { diff --git a/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap b/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap index 9d5bc59c2..8c47770f3 100644 --- a/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap +++ b/browser/src/CopyNumberVariantList/__snapshots__/CopyNumberVariants.spec.tsx.snap @@ -14,7 +14,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` [ { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -22,11 +21,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -35,7 +34,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -43,11 +41,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -56,7 +54,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -64,11 +61,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -111,7 +108,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` [ { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -119,11 +115,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -132,7 +128,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -140,11 +135,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -153,7 +148,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -161,11 +155,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -293,7 +287,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` [ { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -301,11 +294,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -314,7 +307,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -322,11 +314,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, @@ -335,7 +327,6 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` }, { "alts": null, - "ancestry_groups": [], "chrom": "21", "end": 456, "endmax": 100168742, @@ -343,11 +334,11 @@ exports[`CopyNumberVariants has no unexpected changes 1`] = ` "filters": [], "genes": [], "length": 333, + "populations": [], "pos": 123, "posmax": 100121284, "posmin": 100121281, "qual": 99, - "reference_genome": "GRCh38", "sc": 123, "sf": 0.5, "sn": 345, diff --git a/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx b/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx index afba7f3d2..b20f904c1 100644 --- a/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx +++ b/browser/src/CopyNumberVariantList/copyNumberVariantTableColumns.tsx @@ -79,7 +79,7 @@ const copyNumberVariantTableColumns = [ if (variant.length === -1) { s = '—' } else { - const size = variant.length || 0 + const size = variant.length if (size >= 1e6) { s = `${(size / 1e6).toPrecision(3)} Mb` } else if (size >= 1e3) { diff --git a/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx b/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx index 3baaab0a0..f4b3ce6e8 100644 --- a/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx +++ b/browser/src/CopyNumberVariantPage/CNVPopulationsTable.tsx @@ -62,18 +62,18 @@ const renderPopSF = (sf: number | string) => { return sf } -type CNVPopulationsTableProps = { +type OwnPopulationsTableProps = { columnLabels?: { sc?: string sn?: string sf?: string } - ancestry_groups: { + populations: { id: string name: string sc: number sn: number - subancestry_groups?: { + subpopulations?: { id: string name: string sc: number @@ -86,23 +86,25 @@ type CNVPopulationsTableProps = { type CNVPopulationsTableState = any +type CNVPopulationsTableProps = OwnPopulationsTableProps & typeof CNVPopulationsTable.defaultProps + export class CNVPopulationsTable extends Component< - CNVPopulationsTableProps & { variant: CopyNumberVariant }, + CNVPopulationsTableProps & { variant: CopyNumberVariant}, CNVPopulationsTableState > { static defaultProps = { columnLabels: {}, initiallyExpandRows: false, - variant: {}, + variant: {} } - constructor(props: CNVPopulationsTableProps) { + constructor(props: CNVPopulationsTableProps ) { super(props) this.state = { sortBy: 'sf', sortAscending: false, - expandedPopulations: props.ancestry_groups.reduce( + expandedPopulations: props.populations.reduce( (acc, pop) => ({ ...acc, [pop.name]: props.initiallyExpandRows }), {} ), @@ -155,10 +157,10 @@ export class CNVPopulationsTable extends Component< const { expandedPopulations } = this.state const isExpanded = expandedPopulations[pop.name] const colSpan = isExpanded ? 1 : 2 - const rowSpan = isExpanded ? pop.subancestry_groups.length + 1 : 1 + const rowSpan = isExpanded ? pop.subpopulations.length + 1 : 1 return ( - {pop.subancestry_groups.length > 0 ? ( + {pop.subpopulations.length > 0 ? ( { - const transformedSubpopulations = (pop.subancestry_groups || []) + const transformedSubpopulations = (pop.subpopulations || []) .map((subPop) => ({ id: subPop.id, name: subPop.name, @@ -210,7 +211,7 @@ export class CNVPopulationsTable extends Component< sc: pop.sc, sn: pop.sn, sf: calculatePopSF(pop.sc, pop.sn), - subancestry_groups: transformedSubpopulations, + subpopulations: transformedSubpopulations, } }) .sort((a, b) => { @@ -274,7 +275,7 @@ export class CNVPopulationsTable extends Component< {renderedPopulations.map((pop, i) => ( - + 0 && @@ -290,15 +291,15 @@ export class CNVPopulationsTable extends Component< {pop.sn} {renderPopSF(pop.sf)} - {pop.subancestry_groups && + {pop.subpopulations && expandedPopulations[pop.name] && - pop.subancestry_groups.map((subPop, j) => ( + pop.subpopulations.map((subPop, j) => ( { - const filters = variant.filters || [] - return ( - - - {filters.length > 0 ? ( - filters.map((filter) => ( - - {filterLabel(filter)} - - )) - ) : ( - Pass - )} - - - {variant.sc} - {variant.sn} - - {(variant.sn === 0 ? 0 : variant.sc / variant.sn).toPrecision(4)} - - - - {variant.chrom}:{variant.pos}-{variant.end} - - - - {variant.length === -1 ? '—' : `${(variant.length || 0).toLocaleString()} bp`} - - - {/* @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message */} - {cnvTypeLabels[variant.type]} - - - ) -} +const CopyNumberVariantAttributeList = ({ variant }: CopyNumberVariantAttributeListProps) => ( + + + {variant.filters.length > 0 ? ( + variant.filters.map((filter) => ( + + {filterLabel(filter)} + + )) + ) : ( + Pass + )} + + + {variant.sc} + {variant.sn} + + {(variant.sn === 0 ? 0 : variant.sc / variant.sn).toPrecision(4)} + + + + {variant.chrom}:{variant.pos}-{variant.end} + + + + {variant.length === -1 ? '—' : `${variant.length.toLocaleString()} bp`} + + + {/* @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message */} + {cnvTypeLabels[variant.type]} + + +) export default CopyNumberVariantAttributeList diff --git a/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx b/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx index 7adc0f033..5e1f624dd 100644 --- a/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx +++ b/browser/src/CopyNumberVariantPage/CopyNumberVariantPage.tsx @@ -4,7 +4,7 @@ import styled from 'styled-components' import { ExternalLink, Page, ListItem } from '@gnomad/ui' import Link from '../Link' -import { DatasetId, labelForDataset, ReferenceGenome } from '@gnomad/dataset-metadata/metadata' +import { DatasetId, labelForDataset } from '@gnomad/dataset-metadata/metadata' import DocumentTitle from '../DocumentTitle' import GnomadPageHeading from '../GnomadPageHeading' import Query from '../Query' @@ -27,13 +27,6 @@ const ResponsiveSection = styled.section` } ` -export type CopyNumberVariantPopulation = { - id: string - sc: number - sn: number - sf: number -} - export type CopyNumberVariant = { alts: string[] | null sc: number @@ -41,18 +34,22 @@ export type CopyNumberVariant = { sf: number chrom: string end: number - filters: string[] | null + filters: string[] genes: string[] - length: number | null - ancestry_groups: CopyNumberVariantPopulation[] | null + length: number + populations: { + id: string + sc: number + sn: number + sf: number + }[] pos: number - qual: number | null - reference_genome: ReferenceGenome - type: string | null - posmin: number | null - posmax: number | null - endmin: number | null - endmax: number | null + qual: number + type: string + posmin: number + posmax: number + endmin: number + endmax: number variant_id: string } @@ -132,7 +129,7 @@ const ConnectedCopyNumberVariantPage = ({ filters genes length - ancestry_groups { + populations { id sc sn diff --git a/browser/src/CopyNumberVariantPage/CopyNumberVariantPopulationsTable.tsx b/browser/src/CopyNumberVariantPage/CopyNumberVariantPopulationsTable.tsx index 61c0d8a75..b5da20335 100644 --- a/browser/src/CopyNumberVariantPage/CopyNumberVariantPopulationsTable.tsx +++ b/browser/src/CopyNumberVariantPage/CopyNumberVariantPopulationsTable.tsx @@ -1,48 +1,52 @@ import React from 'react' -import { CopyNumberVariant, CopyNumberVariantPopulation } from './CopyNumberVariantPage' +import { CopyNumberVariant } from './CopyNumberVariantPage' import { populationName } from '@gnomad/dataset-metadata/gnomadPopulations' import { CNVPopulationsTable } from './CNVPopulationsTable' -type NamedCopyNumberVariantPopulation = CopyNumberVariantPopulation & { +type CopyNumberVariantPopulation = { + id: string + sc: number + sn: number + sf: number name: string } -type SubancestryGroups = { - [key: string]: NamedCopyNumberVariantPopulation[] +type Subpopulations = { + [key: string]: CopyNumberVariantPopulation[] } -const nestPopulations = (ancestry_groups: NamedCopyNumberVariantPopulation[]) => { +const nestPopulations = (populations: CopyNumberVariantPopulation[]) => { const popIndices = [] - const subancestry_groups: SubancestryGroups = {} + const subpopulations: Subpopulations = {} - for (let i = 0; i < ancestry_groups.length; i += 1) { - const pop = ancestry_groups[i] + for (let i = 0; i < populations.length; i += 1) { + const pop = populations[i] const divisions = pop.id.split('_') if (divisions.length === 1) { popIndices.push(i) } else { const parentPop = divisions[0] - if (subancestry_groups[parentPop] === undefined) { - subancestry_groups[parentPop] = [{ ...pop }] + if (subpopulations[parentPop] === undefined) { + subpopulations[parentPop] = [{ ...pop }] } else { - subancestry_groups[parentPop].push({ ...pop }) + subpopulations[parentPop].push({ ...pop }) } } } return popIndices.map((index) => { - const pop = ancestry_groups[index] + const pop = populations[index] return { ...pop, - subancestry_groups: subancestry_groups[pop.id], + subpopulations: subpopulations[pop.id], } }) } -const addPopulationNames = (ancestry_groups: CopyNumberVariantPopulation[] | null) => { - return (ancestry_groups || []).map((pop: CopyNumberVariantPopulation) => { +const addPopulationNames = (populations: CopyNumberVariantPopulation[]) => { + return populations.map((pop: CopyNumberVariantPopulation) => { let name if (pop.id === 'XX' || pop.id.endsWith('_XX')) { name = 'XX' @@ -60,7 +64,7 @@ type CopyNumberVariantPopulationsTableProps = { } const CopyNumberVariantPopulationsTable = ({ variant }: CopyNumberVariantPopulationsTableProps) => { - const ancestry_groups = nestPopulations(addPopulationNames(variant.ancestry_groups)) + const populations = nestPopulations(addPopulationNames((variant as any).populations)) const columnLabels = { sc: 'Site Count', @@ -68,13 +72,7 @@ const CopyNumberVariantPopulationsTable = ({ variant }: CopyNumberVariantPopulat sf: 'Site Frequency', } - return ( - - ) + return } export default CopyNumberVariantPopulationsTable diff --git a/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx b/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx index 4cbffee0d..aa98db5a4 100644 --- a/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx +++ b/browser/src/MitochondrialVariantPage/MitochondrialVariantPage.tsx @@ -99,7 +99,7 @@ export type MitochondrialVariant = { ac_het: number }[] max_heteroplasmy: number | null - ancestry_groups: { + populations: { id: PopulationId an: number ac_het: number @@ -330,7 +330,7 @@ query ${operationName}($variantId: String!, $datasetId: DatasetId!, $referenceGe mitotip_trna_prediction pon_ml_probability_of_pathogenicity pon_mt_trna_prediction - ancestry_groups { + populations { id ac_het ac_hom diff --git a/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx b/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx index 3741190b9..cb7c7a3ff 100644 --- a/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx +++ b/browser/src/MitochondrialVariantPage/MitochondrialVariantPopulationFrequenciesTable.tsx @@ -84,7 +84,7 @@ const MitochondrialVariantPopulationFrequenciesTable = ({ ) } - const renderedPopulations = variant.ancestry_groups + const renderedPopulations = variant.populations .map((population) => ({ ...population, af_hom: population.an !== 0 ? population.ac_hom / population.an : 0, diff --git a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx index 808c3e4e6..833e19460 100644 --- a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx +++ b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx @@ -29,7 +29,7 @@ import ShortTandemRepeatAdjacentRepeatSection from './ShortTandemRepeatAdjacentR type ShortTandemRepeatRepeatUnit = { repeat_unit: string distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] @@ -46,7 +46,7 @@ export type ShortTandemRepeatAdjacentRepeat = { repeat_units: string[] allele_size_distribution: { distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] @@ -54,14 +54,14 @@ export type ShortTandemRepeatAdjacentRepeat = { } genotype_distribution: { distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] repeat_units: { repeat_units: string[] distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] @@ -101,7 +101,7 @@ export type ShortTandemRepeat = { }[] allele_size_distribution: { distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] @@ -109,14 +109,14 @@ export type ShortTandemRepeat = { } genotype_distribution: { distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] repeat_units: { repeat_units: string[] distribution: number[][] - ancestry_groups: { + populations: { id: string distribution: number[][] }[] @@ -183,9 +183,7 @@ const ShortTandemRepeatPage = ({ datasetId, shortTandemRepeat }: ShortTandemRepe const [showAdjacentRepeats, setShowAdjacentRepeats] = useState(false) - const populationIds = shortTandemRepeat.allele_size_distribution.ancestry_groups.map( - (pop) => pop.id - ) + const populationIds = shortTandemRepeat.allele_size_distribution.populations.map((pop) => pop.id) const allRepeatUnitsByClassification: Record = {} shortTandemRepeat.repeat_units.forEach((repeatUnit) => { diff --git a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx index f09dfd722..ba8d0cd18 100644 --- a/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx +++ b/browser/src/ShortTandemRepeatPage/ShortTandemRepeatPageContainer.tsx @@ -43,14 +43,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -58,14 +58,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -87,14 +87,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -102,14 +102,14 @@ query ${operationName}($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } diff --git a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap index 6e386515e..2e24e057c 100644 --- a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap +++ b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPage.spec.tsx.snap @@ -15,13 +15,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -56,8 +56,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -120,13 +120,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -161,8 +161,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -364,13 +364,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -405,8 +405,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -508,13 +508,13 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -549,8 +549,8 @@ exports[`ShortTandemRepeatPage with "exac" dataset has no unexected changes 1`] "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -584,13 +584,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -625,8 +625,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -689,13 +689,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -730,8 +730,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -933,13 +933,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -974,8 +974,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1077,13 +1077,13 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1118,8 +1118,8 @@ exports[`ShortTandemRepeatPage with "gnomad_cnv_r4" dataset has no unexected cha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1153,13 +1153,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1194,8 +1194,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1258,13 +1258,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1299,8 +1299,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1502,13 +1502,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1543,8 +1543,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1646,13 +1646,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1687,8 +1687,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1" dataset has no unexected chang "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1722,13 +1722,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1763,8 +1763,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -1827,13 +1827,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -1868,8 +1868,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2071,13 +2071,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2112,8 +2112,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2215,13 +2215,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2256,8 +2256,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_controls" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2291,13 +2291,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2332,8 +2332,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2396,13 +2396,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2437,8 +2437,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2640,13 +2640,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2681,8 +2681,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2784,13 +2784,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2825,8 +2825,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_cancer" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2860,13 +2860,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -2901,8 +2901,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -2965,13 +2965,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3006,8 +3006,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3209,13 +3209,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3250,8 +3250,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3353,13 +3353,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3394,8 +3394,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_neuro" dataset has no unexe "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3429,13 +3429,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3470,8 +3470,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3534,13 +3534,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3575,8 +3575,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3778,13 +3778,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3819,8 +3819,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3922,13 +3922,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -3963,8 +3963,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r2_1_non_topmed" dataset has no unex "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -3998,13 +3998,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4039,8 +4039,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4103,13 +4103,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4144,8 +4144,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4347,13 +4347,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4388,8 +4388,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4491,13 +4491,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4532,8 +4532,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4567,13 +4567,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4608,8 +4608,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4672,13 +4672,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4713,8 +4713,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -4916,13 +4916,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -4957,8 +4957,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5060,13 +5060,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5101,8 +5101,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_controls_and_biobanks" dataset ha "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5136,13 +5136,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5177,8 +5177,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5241,13 +5241,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5282,8 +5282,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5485,13 +5485,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5526,8 +5526,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5629,13 +5629,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5670,8 +5670,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_cancer" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5705,13 +5705,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5746,8 +5746,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -5810,13 +5810,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -5851,8 +5851,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6054,13 +6054,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6095,8 +6095,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6198,13 +6198,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6239,8 +6239,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_neuro" dataset has no unexect "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6274,13 +6274,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6315,8 +6315,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6379,13 +6379,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6420,8 +6420,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6623,13 +6623,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6664,8 +6664,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6767,13 +6767,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6808,8 +6808,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_topmed" dataset has no unexec "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6843,13 +6843,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6884,8 +6884,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -6948,13 +6948,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -6989,8 +6989,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7192,13 +7192,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7233,8 +7233,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7336,13 +7336,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7377,8 +7377,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r3_non_v2" dataset has no unexected "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7412,13 +7412,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7453,8 +7453,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7517,13 +7517,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7558,8 +7558,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7761,13 +7761,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7802,8 +7802,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7905,13 +7905,13 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -7946,8 +7946,8 @@ exports[`ShortTandemRepeatPage with "gnomad_r4" dataset has no unexected changes "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -7981,13 +7981,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8022,8 +8022,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8086,13 +8086,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8127,8 +8127,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8330,13 +8330,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8371,8 +8371,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8474,13 +8474,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8515,8 +8515,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1" dataset has no unexected ch "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8550,13 +8550,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8591,8 +8591,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8655,13 +8655,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8696,8 +8696,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -8899,13 +8899,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -8940,8 +8940,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9043,13 +9043,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9084,8 +9084,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_controls" dataset has no une "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9119,13 +9119,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9160,8 +9160,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9224,13 +9224,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9265,8 +9265,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9468,13 +9468,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9509,8 +9509,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9612,13 +9612,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9653,8 +9653,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r2_1_non_neuro" dataset has no un "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9688,13 +9688,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9729,8 +9729,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -9793,13 +9793,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -9834,8 +9834,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -10037,13 +10037,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -10078,8 +10078,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", @@ -10181,13 +10181,13 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan { "adjacent_repeats": [], "allele_size_distribution": { - "ancestry_groups": [], "distribution": [ [ 1, 1, ], ], + "populations": [], "repeat_units": [], }, "associated_diseases": [ @@ -10222,8 +10222,8 @@ exports[`ShortTandemRepeatPage with "gnomad_sv_r4" dataset has no unexected chan "symbol": "ABCD1", }, "genotype_distribution": { - "ancestry_groups": [], "distribution": [], + "populations": [], "repeat_units": [], }, "id": "STR1", diff --git a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap index e00f8304e..bf08ae377 100644 --- a/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap +++ b/browser/src/ShortTandemRepeatPage/__snapshots__/ShortTandemRepeatPageContainer.spec.tsx.snap @@ -61,14 +61,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -76,14 +76,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -105,14 +105,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -120,14 +120,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -212,14 +212,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -227,14 +227,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -256,14 +256,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -271,14 +271,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -363,14 +363,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -378,14 +378,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -407,14 +407,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -422,14 +422,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -514,14 +514,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -529,14 +529,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -558,14 +558,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -573,14 +573,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -665,14 +665,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -680,14 +680,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -709,14 +709,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -724,14 +724,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -816,14 +816,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -831,14 +831,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -860,14 +860,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -875,14 +875,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -967,14 +967,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -982,14 +982,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1011,14 +1011,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1026,14 +1026,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1118,14 +1118,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1133,14 +1133,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1162,14 +1162,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1177,14 +1177,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1269,14 +1269,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1284,14 +1284,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1313,14 +1313,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1328,14 +1328,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1420,14 +1420,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1435,14 +1435,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1464,14 +1464,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1479,14 +1479,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1571,14 +1571,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1586,14 +1586,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1615,14 +1615,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1630,14 +1630,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1722,14 +1722,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1737,14 +1737,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1766,14 +1766,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1781,14 +1781,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1873,14 +1873,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1888,14 +1888,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -1917,14 +1917,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -1932,14 +1932,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2024,14 +2024,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2039,14 +2039,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2068,14 +2068,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2083,14 +2083,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2175,14 +2175,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2190,14 +2190,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2219,14 +2219,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2234,14 +2234,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2326,14 +2326,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2341,14 +2341,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2370,14 +2370,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2385,14 +2385,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2477,14 +2477,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2492,14 +2492,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2521,14 +2521,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2536,14 +2536,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2628,14 +2628,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2643,14 +2643,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } @@ -2672,14 +2672,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { repeat_units allele_size_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_unit distribution - ancestry_groups { + populations { id distribution } @@ -2687,14 +2687,14 @@ query ShortTandemRepeat($strId: String!, $datasetId: DatasetId!) { } genotype_distribution { distribution - ancestry_groups { + populations { id distribution } repeat_units { repeat_units distribution - ancestry_groups { + populations { id distribution } diff --git a/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap b/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap index 5b1102e5b..e7ac41817 100644 --- a/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap +++ b/browser/src/StructuralVariantList/__snapshots__/StructuralVariants.spec.tsx.snap @@ -53,7 +53,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -71,6 +70,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -86,7 +86,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -104,6 +103,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -119,7 +119,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -137,6 +136,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -197,7 +197,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -215,6 +214,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -230,7 +230,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -248,6 +247,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -263,7 +263,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -281,6 +280,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -437,7 +437,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -455,6 +454,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -470,7 +470,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -488,6 +487,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, @@ -503,7 +503,6 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "algorithms": [], "alts": null, "an": 345, - "ancestry_groups": [], "chrom": "21", "chrom2": null, "consequence": null, @@ -521,6 +520,7 @@ exports[`StructuralVariants has no unexpected changes 1`] = ` "homozygote_count": null, "length": 333, "major_consequence": null, + "populations": [], "pos": 123, "pos2": null, "qual": 99, diff --git a/browser/src/StructuralVariantPage/StructuralVariantPage.tsx b/browser/src/StructuralVariantPage/StructuralVariantPage.tsx index 71bd3c225..1aaba756e 100644 --- a/browser/src/StructuralVariantPage/StructuralVariantPage.tsx +++ b/browser/src/StructuralVariantPage/StructuralVariantPage.tsx @@ -72,13 +72,15 @@ export type StructuralVariant = { alt: Histogram | null } | null length: number | null - ancestry_groups: + populations: | { id: string ac: number an: number homozygote_count: number | null hemizygote_count: number | null + ac_hemi: number | null + ac_hom: number | null }[] | null pos: number @@ -241,7 +243,7 @@ const ConnectedStructuralVariantPage = ({ } } length - ancestry_groups { + populations { id ac an diff --git a/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx b/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx index bbf096e0a..552123eaf 100644 --- a/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx +++ b/browser/src/StructuralVariantPage/StructuralVariantPopulationsTable.tsx @@ -4,12 +4,12 @@ import { PopulationsTable } from '../VariantPage/PopulationsTable' import { StructuralVariant } from './StructuralVariantPage' import { populationName } from '@gnomad/dataset-metadata/gnomadPopulations' -const nestPopulations = (ancestry_groups: any) => { +const nestPopulations = (populations: any) => { const popIndices = [] - const subancestry_groups = {} + const subpopulations = {} - for (let i = 0; i < ancestry_groups.length; i += 1) { - const pop = ancestry_groups[i] + for (let i = 0; i < populations.length; i += 1) { + const pop = populations[i] // IDs are one of: // * pop @@ -22,28 +22,28 @@ const nestPopulations = (ancestry_groups: any) => { } else { const parentPop = divisions[0] // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - if (subancestry_groups[parentPop] === undefined) { + if (subpopulations[parentPop] === undefined) { // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - subancestry_groups[parentPop] = [{ ...pop }] + subpopulations[parentPop] = [{ ...pop }] } else { // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - subancestry_groups[parentPop].push({ ...pop }) + subpopulations[parentPop].push({ ...pop }) } } } return popIndices.map((index) => { - const pop = ancestry_groups[index] + const pop = populations[index] return { ...pop, // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - subancestry_groups: subancestry_groups[pop.id], + subpopulations: subpopulations[pop.id], } }) } -const addPopulationNames = (ancestry_groups: any) => { - return ancestry_groups.map((pop: any) => { +const addPopulationNames = (populations: any) => { + return populations.map((pop: any) => { let name if (pop.id === 'XX' || pop.id.endsWith('_XX')) { name = 'XX' @@ -61,7 +61,7 @@ type StructuralVariantPopulationsTableProps = { } const StructuralVariantPopulationsTable = ({ variant }: StructuralVariantPopulationsTableProps) => { - const ancestry_groups = nestPopulations(addPopulationNames(variant.ancestry_groups)) + const populations = nestPopulations(addPopulationNames((variant as any).populations)) const columnLabels = variant.type === 'MCNV' @@ -75,7 +75,7 @@ const StructuralVariantPopulationsTable = ({ variant }: StructuralVariantPopulat return ( diff --git a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx index b18cebc7e..e12f7b3b2 100644 --- a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx +++ b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.spec.tsx @@ -32,7 +32,7 @@ const baseApiResponse = { haplotype_counts: [10, 11, 12, 13], p_compound_heterozygous: 0.123, // TK calculate in real value - ancestry_groups: [], + populations: [], }, variant1: { exome: { ac: 999, an: 101010 }, diff --git a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx index a3e12e1c3..e39a2842a 100644 --- a/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx +++ b/browser/src/VariantCooccurrencePage/VariantCooccurrencePage.tsx @@ -44,7 +44,7 @@ export type CooccurrenceData = { genotype_counts: GenotypeCounts haplotype_counts: HaplotypeCounts p_compound_heterozygous: number | null - ancestry_groups: { + populations: { id: string genotype_counts: GenotypeCounts haplotype_counts: HaplotypeCounts @@ -193,7 +193,7 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => { const cooccurrenceInSelectedPopulation = selectedPopulation === 'All' ? cooccurrenceData - : cooccurrenceData.ancestry_groups!.find((pop) => pop.id === selectedPopulation)! + : cooccurrenceData.populations!.find((pop: any) => pop.id === selectedPopulation)! const prediction = makePrediction(cooccurrenceInSelectedPopulation) @@ -206,10 +206,9 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => { cooccurrenceData.genotype_counts.hom_hom > 0 - const anyPopulationWithoutPrediction = [ - cooccurrenceData, - ...cooccurrenceData.ancestry_groups, - ].some(noPredictionPossible) + const anyPopulationWithoutPrediction = [cooccurrenceData, ...cooccurrenceData.populations].some( + noPredictionPossible + ) const isDistantCis = prediction === 'in_cis' && variantDistance(cooccurrenceData) > distantCisThreshold @@ -326,7 +325,7 @@ query ${operationName}($variants: [String!]!, $variant1: String!, $variant2: Str genotype_counts haplotype_counts p_compound_heterozygous - ancestry_groups { + populations { id genotype_counts haplotype_counts @@ -445,12 +444,12 @@ const structureCounts = (population: ArrayCountPopulation): ObjectCountPopulatio } const normalizeCooccurrenceData = (cooccurrenceData: any): CooccurrenceData => { - const ancestry_groups = cooccurrenceData.ancestry_groups - ? cooccurrenceData.ancestry_groups.map(structureCounts) - : cooccurrenceData.ancestry_groups + const populations = cooccurrenceData.populations + ? cooccurrenceData.populations.map(structureCounts) + : cooccurrenceData.populations const topLevel = structureCounts(cooccurrenceData) - return { ...topLevel, ancestry_groups } as CooccurrenceData + return { ...topLevel, populations } as CooccurrenceData } const VariantCoocurrenceContainer = ({ diff --git a/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx b/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx index 387273aea..ff01453de 100644 --- a/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx +++ b/browser/src/VariantCooccurrencePage/VariantCooccurrenceSummaryTable.tsx @@ -80,7 +80,7 @@ const VariantCooccurrenceSummaryTable = ({ - {cooccurrenceData.ancestry_groups.map((pop) => ( + {cooccurrenceData.populations.map((pop) => ( { - return variant.ancestry_groups.filter((v) => v.id === popId)[0] - ? JSON.stringify(variant.ancestry_groups.filter((v) => v.id === popId)[0][property]) + return variant.populations.filter((v) => v.id === popId)[0] + ? JSON.stringify(variant.populations.filter((v) => v.id === popId)[0][property]) : '' } @@ -342,7 +342,7 @@ export type VariantTableVariant = { hgvs?: string hgvsc?: string hgvsp?: string - ancestry_groups: Population[] + populations: Population[] pos: number rsids?: string[] transcript_id: string diff --git a/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts b/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts index 58e859e74..7bef38bd1 100644 --- a/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts +++ b/browser/src/VariantList/mergeExomeAndGenomeData.spec.ts @@ -26,7 +26,7 @@ const createAncestryGroupObjects = (shorthands: AncestryGroupShorthand[]) => { } describe('mergeExomeAndGenomePopulationData', () => { - it('returns expected values when exomes and genomes have the same ancestry_groups', () => { + it('returns expected values when exomes and genomes have the same populations', () => { const geneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'afr', value: 1 }, { id: 'remaining', value: 2 }, @@ -35,8 +35,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { ancestry_groups: geneticAncestryGroupObjects }, - genome: { ancestry_groups: geneticAncestryGroupObjects }, + exome: { populations: geneticAncestryGroupObjects }, + genome: { populations: geneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) @@ -50,7 +50,7 @@ describe('mergeExomeAndGenomePopulationData', () => { expect(result).toStrictEqual(expected) }) - it('returns expected values when exomes have less ancestry_groups than genomes', () => { + it('returns expected values when exomes have less populations than genomes', () => { const exomeGeneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'afr', value: 1 }, { id: 'remaining', value: 2 }, @@ -66,8 +66,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { ancestry_groups: exomeGeneticAncestryGroupObjects }, - genome: { ancestry_groups: genomeGeneticAncestryGroupObjects }, + exome: { populations: exomeGeneticAncestryGroupObjects }, + genome: { populations: genomeGeneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) @@ -82,7 +82,7 @@ describe('mergeExomeAndGenomePopulationData', () => { expect(result).toStrictEqual(expected) }) - it('returns expected values exomes have more ancestry_groups than genomes', () => { + it('returns expected values exomes have more populations than genomes', () => { const exomeGeneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'afr', value: 1 }, { id: 'remaining', value: 2 }, @@ -98,8 +98,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { ancestry_groups: exomeGeneticAncestryGroupObjects }, - genome: { ancestry_groups: genomeGeneticAncestryGroupObjects }, + exome: { populations: exomeGeneticAncestryGroupObjects }, + genome: { populations: genomeGeneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) @@ -114,7 +114,7 @@ describe('mergeExomeAndGenomePopulationData', () => { expect(result).toStrictEqual(expected) }) - it('returns expected values when exome and genome ancestry_groups are in a different order', () => { + it('returns expected values when exome and genome populations are in a different order', () => { const exomeGeneticAncestryGroupObjects = createAncestryGroupObjects([ { id: 'eur', value: 1 }, { id: 'afr', value: 2 }, @@ -129,8 +129,8 @@ describe('mergeExomeAndGenomePopulationData', () => { const testVariant = variantFactory.build({ variant_id: 'test_variant', - exome: { ancestry_groups: exomeGeneticAncestryGroupObjects }, - genome: { ancestry_groups: genomeGeneticAncestryGroupObjects }, + exome: { populations: exomeGeneticAncestryGroupObjects }, + genome: { populations: genomeGeneticAncestryGroupObjects }, }) const result = mergeExomeAndGenomePopulationData(testVariant.exome!, testVariant.genome!) diff --git a/browser/src/VariantList/mergeExomeAndGenomeData.ts b/browser/src/VariantList/mergeExomeAndGenomeData.ts index 203649671..64f00fa43 100644 --- a/browser/src/VariantList/mergeExomeAndGenomeData.ts +++ b/browser/src/VariantList/mergeExomeAndGenomeData.ts @@ -7,10 +7,10 @@ export const mergeExomeAndGenomePopulationData = ( exome: SequencingType, genome: SequencingType ) => { - const ancestry_groups: { [key: string]: Population } = {} + const populations: { [key: string]: Population } = {} - exome.ancestry_groups.forEach((exomePopulation: Population) => { - ancestry_groups[exomePopulation.id] = { + exome.populations.forEach((exomePopulation: Population) => { + populations[exomePopulation.id] = { id: exomePopulation.id, ac: exomePopulation.ac, an: exomePopulation.an, @@ -19,10 +19,10 @@ export const mergeExomeAndGenomePopulationData = ( } }) - genome.ancestry_groups.forEach((genomePopulation: Population) => { - if (genomePopulation.id in ancestry_groups) { - const entry = ancestry_groups[genomePopulation.id] - ancestry_groups[genomePopulation.id] = { + genome.populations.forEach((genomePopulation: Population) => { + if (genomePopulation.id in populations) { + const entry = populations[genomePopulation.id] + populations[genomePopulation.id] = { id: genomePopulation.id, ac: add(entry.ac, genomePopulation.ac), an: add(entry.an, genomePopulation.an), @@ -30,7 +30,7 @@ export const mergeExomeAndGenomePopulationData = ( ac_hom: add(entry.ac_hom, genomePopulation.ac_hom), } } else { - ancestry_groups[genomePopulation.id] = { + populations[genomePopulation.id] = { id: genomePopulation.id, ac: genomePopulation.ac, an: genomePopulation.an, @@ -40,7 +40,7 @@ export const mergeExomeAndGenomePopulationData = ( } }) - return Object.values(ancestry_groups) + return Object.values(populations) } const mergeExomeAndGenomeData = (variants: any) => @@ -74,7 +74,7 @@ const mergeExomeAndGenomeData = (variants: any) => ac_hemi: add(exome.ac_hemi, genome.ac_hemi), ac_hom: add(exome.ac_hom, genome.ac_hom), filters: exome.filters.concat(genome.filters), - ancestry_groups: mergeExomeAndGenomePopulationData(exome!, genome!), + populations: mergeExomeAndGenomePopulationData(exome!, genome!), } }) diff --git a/browser/src/VariantPage/VariantPage.tsx b/browser/src/VariantPage/VariantPage.tsx index ec2eca357..9e3e63820 100644 --- a/browser/src/VariantPage/VariantPage.tsx +++ b/browser/src/VariantPage/VariantPage.tsx @@ -194,8 +194,8 @@ export type SequencingType = { hemizygote_count: number | null faf95: Faf95 filters: string[] - ancestry_groups: Population[] - local_ancestry_groups: LocalAncestryPopulation[] + populations: Population[] + local_ancestry_populations: LocalAncestryPopulation[] age_distribution: AgeDistribution | null quality_metrics: VariantQualityMetrics } @@ -348,7 +348,7 @@ export const VariantPageContent = ({ datasetId, variant }: VariantPageContentPro Genetic Ancestry Group Frequencies {hasLocalAncestryPopulations(datasetId) && - ((variant.genome && variant.genome.local_ancestry_groups) || []).length > 0 && ( + ((variant.genome && variant.genome.local_ancestry_populations) || []).length > 0 && (
{ if (hasLocalAncestryPopulations(datasetId) && variant.genome) { const genome = variant.genome! - const genomePopulations = genome.ancestry_groups.filter( + const genomePopulations = genome.populations.filter( (pop) => !(pop.id.startsWith('hgdp:') || pop.id.startsWith('1kg:')) ) const exomePopulations = variant.exome - ? variant.exome.ancestry_groups.filter( + ? variant.exome.populations.filter( (pop) => !(pop.id.startsWith('hgdp:') || pop.id.startsWith('1kg:')) ) : [] - const hgdpPopulations = genome.ancestry_groups + const hgdpPopulations = genome.populations .filter((pop) => pop.id.startsWith('hgdp:')) .map((pop) => ({ ...pop, id: pop.id.slice(5) })) // Remove hgdp: prefix - const tgpPopulations = genome.ancestry_groups + const tgpPopulations = genome.populations .filter((pop) => pop.id.startsWith('1kg:')) .map((pop) => ({ ...pop, id: pop.id.slice(4) })) // Remove 1kg: prefix - const localAncestryPopulations = genome.local_ancestry_groups || [] + const localAncestryPopulations = genome.local_ancestry_populations || [] return ( // @ts-expect-error TS(2741) FIXME: Property 'onChange' is missing in type '{ tabs: { ... Remove this comment to see the full error message @@ -141,8 +141,8 @@ const VariantPopulationFrequencies = ({ datasetId, variant }: Props) => { diff --git a/browser/src/__factories__/CopyNumberVariant.ts b/browser/src/__factories__/CopyNumberVariant.ts index bb72dcb3b..6c911d844 100644 --- a/browser/src/__factories__/CopyNumberVariant.ts +++ b/browser/src/__factories__/CopyNumberVariant.ts @@ -12,7 +12,7 @@ const cnvFactory = Factory.define(({ params }) => { filters = [], genes = [], length = 333, - ancestry_groups = [], + populations = [], pos = 123, qual = 99, type = 'DUP', @@ -20,7 +20,6 @@ const cnvFactory = Factory.define(({ params }) => { posmax = 100121284, endmin = 100168738, endmax = 100168742, - reference_genome = 'GRCh38', } = params const variant_id = `${chrom}__${type}` @@ -35,6 +34,7 @@ const cnvFactory = Factory.define(({ params }) => { filters, genes, length, + populations, pos, qual, type, @@ -43,8 +43,6 @@ const cnvFactory = Factory.define(({ params }) => { endmin, endmax, variant_id, - reference_genome, - ancestry_groups, } }) diff --git a/browser/src/__factories__/MitochondrialVariant.ts b/browser/src/__factories__/MitochondrialVariant.ts index 2066651f5..5895e4eac 100644 --- a/browser/src/__factories__/MitochondrialVariant.ts +++ b/browser/src/__factories__/MitochondrialVariant.ts @@ -15,7 +15,7 @@ const mitochondrialVariantFactory = Factory.define( haplogroup_defining = null, haplogroups = [], max_heteroplasmy = 0.1, - ancestry_groups = [], + populations = [], pos = 123, ref = 'A', rsids = null, @@ -50,7 +50,7 @@ const mitochondrialVariantFactory = Factory.define( haplogroup_defining, haplogroups, max_heteroplasmy, - ancestry_groups, + populations, pos, ref, reference_genome: 'GRCh38', diff --git a/browser/src/__factories__/ShortTandemRepeat.ts b/browser/src/__factories__/ShortTandemRepeat.ts index 61515a971..c2d8ff741 100644 --- a/browser/src/__factories__/ShortTandemRepeat.ts +++ b/browser/src/__factories__/ShortTandemRepeat.ts @@ -30,10 +30,10 @@ const shortTandemRepeatFactory = Factory.define(({ params, as reference_region = { chrom: '1', start: 10000000, stop: 15000000 }, allele_size_distribution = { distribution: [[1, 1]], - ancestry_groups: [], + populations: [], repeat_units: [], }, - genotype_distribution = { distribution: [], ancestry_groups: [], repeat_units: [] }, + genotype_distribution = { distribution: [], populations: [], repeat_units: [] }, } = associations return { diff --git a/browser/src/__factories__/StructuralVariant.ts b/browser/src/__factories__/StructuralVariant.ts index 43e3443bf..6c5cfa750 100644 --- a/browser/src/__factories__/StructuralVariant.ts +++ b/browser/src/__factories__/StructuralVariant.ts @@ -23,7 +23,7 @@ const structuralVariantFactory = Factory.define( filters = [], genes = [], length = 333, - ancestry_groups = [], + populations = [], pos = 123, pos2 = null, qual = 99, @@ -62,7 +62,7 @@ const structuralVariantFactory = Factory.define( genes, genotype_quality, length, - ancestry_groups, + populations, pos, pos2, qual, diff --git a/browser/src/__factories__/Variant.ts b/browser/src/__factories__/Variant.ts index e4b74092c..e52106d5b 100644 --- a/browser/src/__factories__/Variant.ts +++ b/browser/src/__factories__/Variant.ts @@ -148,7 +148,7 @@ export const variantTableVariantFactory = Factory.define( hgvs = 'string', hgvsc = 'string', hgvsp = 'string', - ancestry_groups = [], + populations = [], pos = 1, rsids = [], variant_id = '', @@ -177,7 +177,7 @@ export const variantTableVariantFactory = Factory.define( hgvs, hgvsc, hgvsp, - ancestry_groups, + populations, pos, rsids, variant_id, @@ -198,8 +198,8 @@ export const sequencingFactory = Factory.define(({ params, assoc homozygote_count = null, hemizygote_count = null, filters = [], - ancestry_groups = [], - local_ancestry_groups = [], + populations = [], + local_ancestry_populations = [], ac_hemi = 1, ac_hom = 1, } = params @@ -226,8 +226,8 @@ export const sequencingFactory = Factory.define(({ params, assoc homozygote_count, hemizygote_count, filters, - ancestry_groups, - local_ancestry_groups, + populations, + local_ancestry_populations, age_distribution, quality_metrics, faf95,