@@ -44,7 +44,7 @@ export type CooccurrenceData = {
4444 genotype_counts : GenotypeCounts
4545 haplotype_counts : HaplotypeCounts
4646 p_compound_heterozygous : number | null
47- populations : {
47+ ancestry_groups : {
4848 id : string
4949 genotype_counts : GenotypeCounts
5050 haplotype_counts : HaplotypeCounts
@@ -193,7 +193,7 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => {
193193 const cooccurrenceInSelectedPopulation =
194194 selectedPopulation === 'All'
195195 ? cooccurrenceData
196- : cooccurrenceData . populations ! . find ( ( pop : any ) => pop . id === selectedPopulation ) !
196+ : cooccurrenceData . ancestry_groups ! . find ( ( pop ) => pop . id === selectedPopulation ) !
197197
198198 const prediction = makePrediction ( cooccurrenceInSelectedPopulation )
199199
@@ -206,9 +206,10 @@ const VariantCoocurrence = ({ cooccurrenceData }: VariantCoocurrenceProps) => {
206206 cooccurrenceData . genotype_counts . hom_hom >
207207 0
208208
209- const anyPopulationWithoutPrediction = [ cooccurrenceData , ...cooccurrenceData . populations ] . some (
210- noPredictionPossible
211- )
209+ const anyPopulationWithoutPrediction = [
210+ cooccurrenceData ,
211+ ...cooccurrenceData . ancestry_groups ,
212+ ] . some ( noPredictionPossible )
212213
213214 const isDistantCis =
214215 prediction === 'in_cis' && variantDistance ( cooccurrenceData ) > distantCisThreshold
@@ -325,7 +326,7 @@ query ${operationName}($variants: [String!]!, $variant1: String!, $variant2: Str
325326 genotype_counts
326327 haplotype_counts
327328 p_compound_heterozygous
328- populations {
329+ ancestry_groups {
329330 id
330331 genotype_counts
331332 haplotype_counts
@@ -444,12 +445,12 @@ const structureCounts = (population: ArrayCountPopulation): ObjectCountPopulatio
444445}
445446
446447const 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
450451
451452 const topLevel = structureCounts ( cooccurrenceData )
452- return { ...topLevel , populations } as CooccurrenceData
453+ return { ...topLevel , ancestry_groups } as CooccurrenceData
453454}
454455
455456const VariantCoocurrenceContainer = ( {
0 commit comments