@@ -44,7 +44,7 @@ export type CooccurrenceData = {
44
44
genotype_counts : GenotypeCounts
45
45
haplotype_counts : HaplotypeCounts
46
46
p_compound_heterozygous : number | null
47
- populations : {
47
+ ancestry_groups : {
48
48
id : string
49
49
genotype_counts : GenotypeCounts
50
50
haplotype_counts : HaplotypeCounts
@@ -193,7 +193,7 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => {
193
193
const cooccurrenceInSelectedPopulation =
194
194
selectedPopulation === 'All'
195
195
? cooccurrenceData
196
- : cooccurrenceData . populations ! . find ( ( pop : any ) => pop . id === selectedPopulation ) !
196
+ : cooccurrenceData . ancestry_groups ! . find ( ( pop ) => pop . id === selectedPopulation ) !
197
197
198
198
const prediction = makePrediction ( cooccurrenceInSelectedPopulation )
199
199
@@ -206,9 +206,10 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => {
206
206
cooccurrenceData . genotype_counts . hom_hom >
207
207
0
208
208
209
- const anyPopulationWithoutPrediction = [ cooccurrenceData , ...cooccurrenceData . populations ] . some (
210
- noPredictionPossible
211
- )
209
+ const anyPopulationWithoutPrediction = [
210
+ cooccurrenceData ,
211
+ ...cooccurrenceData . ancestry_groups ,
212
+ ] . some ( noPredictionPossible )
212
213
213
214
const isDistantCis =
214
215
prediction === 'in_cis' && variantDistance ( cooccurrenceData ) > distantCisThreshold
@@ -325,7 +326,7 @@ query ${operationName}($variants: [String!]!, $variant1: String!, $variant2: Str
325
326
genotype_counts
326
327
haplotype_counts
327
328
p_compound_heterozygous
328
- populations {
329
+ ancestry_groups {
329
330
id
330
331
genotype_counts
331
332
haplotype_counts
@@ -444,12 +445,12 @@ const structureCounts = (population: ArrayCountPopulation): ObjectCountPopulatio
444
445
}
445
446
446
447
const normalizeCooccurrenceData = ( cooccurrenceData : any ) : CooccurrenceData => {
447
- const populations = cooccurrenceData . populations
448
- ? cooccurrenceData . populations . map ( structureCounts )
449
- : cooccurrenceData . populations
448
+ const ancestry_groups = cooccurrenceData . ancestry_groups
449
+ ? cooccurrenceData . ancestry_groups . map ( structureCounts )
450
+ : cooccurrenceData . ancestry_groups
450
451
451
452
const topLevel = structureCounts ( cooccurrenceData )
452
- return { ...topLevel , populations } as CooccurrenceData
453
+ return { ...topLevel , ancestry_groups } as CooccurrenceData
453
454
}
454
455
455
456
const VariantCoocurrenceContainer = ( {
0 commit comments