"mutations":{
"nonsynonymous": [
{'gene': 'S', 'left': 'S', 'pos': 98, 'right': 'F'},
{'gene': 'N', 'left': 'P', 'pos': 199, 'right': 'L'},
{'gene': 'ORF3a', 'left': 'Q', 'pos': 38, 'right': 'R'},
{'gene': 'ORF3a', 'left': 'G', 'pos': 172, 'right': 'R'},
{'gene': 'ORF3a', 'left': 'V', 'pos': 202, 'right': 'L'}
],
"synonymous": [
{'left': 'C', 'pos': 28651, 'right': 'T'}
]
}
},
"S452": {'snps': [21599,22017,22916], 'cluster_data': [], #'CA' variant
"country_info": [], 'build_name': "S.L452R", "display_name": "S:L452R",
'col': "#b30000", 'url_params': "c=gt-S_13,152,452", # color, no europe filter
"mutations":{
"nonsynonymous": [
'S:S13I',
'S:W152C',
'S:L452R',
'ORF1a:I4205V',
'ORF1b:D1183Y'
],
"synonymous": [
'28651T'
]
}
},
ERROR in src/io/getClusters.ts:24:3
TS2322: Type '({ build_name: string; build_url: string; cluster_data: never[]; col: string; country_info: never[]; display_name: string; display_name2: string; mutations: { nonsynonymous: { gene: string; left: string; pos: number; right: string; }[]; synonymous: { ...; }[]; }; snps: number[]; snps2?: undefined; url_params?: undef...' is not assignable to type 'ClusterDatum[]'.
Type '{ build_name: string; build_url: string; cluster_data: never[]; col: string; country_info: never[]; display_name: string; display_name2: string; mutations: { nonsynonymous: { gene: string; left: string; pos: number; right: string; }[]; synonymous: { ...; }[]; }; snps: number[]; snps2?: undefined; url_params?: undefi...' is not assignable to type 'ClusterDatum'.
Type '{ build_name: string; build_url: string; cluster_data: never[]; col: string; country_info: never[]; display_name: string; mutations: { nonsynonymous: string[]; synonymous: { left: string; pos: number; right: string; }[]; }; ... 4 more ...; gaps?: undefined; }' is not assignable to type 'ClusterDatum'.
The types of 'mutations.nonsynonymous' are incompatible between these types.
Type 'string[]' is not assignable to type 'Mutation[]'.
Type 'string' is not assignable to type 'Mutation'.
22 |
23 | export function getClusters(): ClusterDatum[] {
> 24 | return clustersJson.clusters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | }
26 |
27 | export function getDefaultCluster(): ClusterDatum {