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