diff --git a/.all-contributorsrc b/.all-contributorsrc index bf5641814..8344ffc6f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "cevo-public", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": true, "commitConvention": "none", @@ -15,184 +13,133 @@ "name": "Chaoran Chen", "avatar_url": "https://avatars.githubusercontent.com/u/18666552?v=4", "profile": "https://github.com/chaoran-chen", - "contributions": [ - "code", - "data", - "ideas", - "maintenance", - "platform", - "research", - "infra" - ] + "contributions": ["code", "data", "ideas", "maintenance", "platform", "research", "infra"] }, { "login": "tanja819", "name": "tanja819", "avatar_url": "https://avatars.githubusercontent.com/u/8371380?v=4", "profile": "https://github.com/tanja819", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "SarahNadeau", "name": "Sarah Nadeau", "avatar_url": "https://avatars.githubusercontent.com/u/30396464?v=4", "profile": "https://github.com/SarahNadeau", - "contributions": [ - "ideas", - "data", - "code" - ] + "contributions": ["ideas", "data", "code"] }, { "login": "TKGZ", "name": "Michael Yared", "avatar_url": "https://avatars.githubusercontent.com/u/36269621?v=4", "profile": "https://github.com/TKGZ", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "tehwalris", "name": "Philippe Voinov", "avatar_url": "https://avatars.githubusercontent.com/u/1489115?v=4", "profile": "https://walr.is/", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "ningxie1991", "name": "ningxie", "avatar_url": "https://avatars.githubusercontent.com/u/3387698?v=4", "profile": "https://github.com/ningxie1991", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "corneliusroemer", "name": "Cornelius Roemer", "avatar_url": "https://avatars.githubusercontent.com/u/25161793?v=4", "profile": "https://github.com/corneliusroemer", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "DrYak", "name": "DrYak", "avatar_url": "https://avatars.githubusercontent.com/u/11413679?v=4", "profile": "https://github.com/DrYak", - "contributions": [ - "data" - ] + "contributions": ["data"] }, { "login": "gautier-collab", "name": "gautier-collab", "avatar_url": "https://avatars.githubusercontent.com/u/55604970?v=4", "profile": "https://github.com/gautier-collab", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "dameyerdave", "name": "David Meyer", "avatar_url": "https://avatars.githubusercontent.com/u/5663605?v=4", "profile": "https://github.com/dameyerdave", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "anastasia-escher", "name": "Anastasia Escher", "avatar_url": "https://avatars.githubusercontent.com/u/52914023?v=4", "profile": "https://github.com/anastasia-escher", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "theosanderson", "name": "Theo Sanderson", "avatar_url": "https://avatars.githubusercontent.com/u/19732295?v=4", "profile": "http://theo.io/", - "contributions": [ - "code", - "ideas" - ] + "contributions": ["code", "ideas"] }, { "login": "adrian-lison", "name": "Adrian Lison", "avatar_url": "https://avatars.githubusercontent.com/u/16266527?v=4", "profile": "https://github.com/adrian-lison", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "fengelniederhammer", "name": "Fabian Engelniederhammer", "avatar_url": "https://avatars.githubusercontent.com/u/92720311?v=4", "profile": "https://github.com/fengelniederhammer", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "JonasKellerer", "name": "Jonas Kellerer", "avatar_url": "https://avatars.githubusercontent.com/u/122305307?v=4", "profile": "https://github.com/JonasKellerer", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "philipschulz", "name": "Philip Schulz", "avatar_url": "https://avatars.githubusercontent.com/u/16674735?v=4", "profile": "https://github.com/philipschulz", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "Taepper", "name": "Taepper", "avatar_url": "https://avatars.githubusercontent.com/u/25206390?v=4", "profile": "https://github.com/Taepper", - "contributions": [ - "code", - "ideas", - "research" - ] + "contributions": ["code", "ideas", "research"] }, { "login": "GeorgKreuzmayr", "name": "GeorgKreuzmayr", "avatar_url": "https://avatars.githubusercontent.com/u/68595015?v=4", "profile": "https://github.com/GeorgKreuzmayr", - "contributions": [ - "code", - "research" - ] + "contributions": ["code", "research"] }, { "login": "danielgrittner", "name": "Daniel Grittner", "avatar_url": "https://avatars.githubusercontent.com/u/29932077?v=4", "profile": "https://github.com/danielgrittner", - "contributions": [ - "code", - "research" - ] + "contributions": ["code", "research"] } ], "contributorsPerLine": 7 diff --git a/package-lock.json b/package-lock.json index 7abd65072..690f95d96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -80,7 +80,7 @@ "eslint-plugin-unused-imports": "^2.0.0", "jest-canvas-mock": "^2.5.0", "postcss": "^8.4.38", - "prettier": "^2.8.4", + "prettier": "^3.3.3", "puppeteer": "^19.7.2", "resize-observer-polyfill": "^1.5.1", "tailwindcss": "^3.2.7", @@ -18916,15 +18916,15 @@ } }, "node_modules/prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -38565,9 +38565,9 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, "prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true }, "pretty-bytes": { diff --git a/package.json b/package.json index aec4756d6..fff80fc04 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "eslint-plugin-unused-imports": "^2.0.0", "jest-canvas-mock": "^2.5.0", "postcss": "^8.4.38", - "prettier": "^2.8.4", + "prettier": "^3.3.3", "puppeteer": "^19.7.2", "resize-observer-polyfill": "^1.5.1", "tailwindcss": "^3.2.7", diff --git a/public/index.html b/public/index.html index 68edee34f..904b22ed2 100644 --- a/public/index.html +++ b/public/index.html @@ -1,4 +1,4 @@ - + diff --git a/public/maintenance.html b/public/maintenance.html index d5f6c4766..3f060b01a 100644 --- a/public/maintenance.html +++ b/public/maintenance.html @@ -1,4 +1,4 @@ - + CoV-Spectrum under maintenance diff --git a/src/components/GridPlot/SequencesOverTimeGrid.tsx b/src/components/GridPlot/SequencesOverTimeGrid.tsx index 122ccd756..e05f5cd3d 100644 --- a/src/components/GridPlot/SequencesOverTimeGrid.tsx +++ b/src/components/GridPlot/SequencesOverTimeGrid.tsx @@ -86,8 +86,8 @@ export const fetchDatePangoLineageCount = async ( data2.push({ ...d, nextcladePangoLineageFullName: d.nextcladePangoLineage - ? (await PangoLineageAliasResolverService.findFullName(d.nextcladePangoLineage)) ?? - d.nextcladePangoLineage + ? ((await PangoLineageAliasResolverService.findFullName(d.nextcladePangoLineage)) ?? + d.nextcladePangoLineage) : null, }); } diff --git a/src/components/KnownVariantsList/KnownVariantsList.tsx b/src/components/KnownVariantsList/KnownVariantsList.tsx index fbf938a85..c90c3b24e 100644 --- a/src/components/KnownVariantsList/KnownVariantsList.tsx +++ b/src/components/KnownVariantsList/KnownVariantsList.tsx @@ -123,8 +123,8 @@ const Grid = ({ isHorizontal ? 'w-max grid-flow-col overflow-hidden auto-rows-min auto-cols-min' : isLandingPage - ? 'grid-cols-2' - : 'grid-cols-1' + ? 'grid-cols-2' + : 'grid-cols-1' }`} > {children} diff --git a/src/components/NucleotideEntropy/calculateEntropy.tsx b/src/components/NucleotideEntropy/calculateEntropy.tsx index bd511168c..4d1c4651e 100644 --- a/src/components/NucleotideEntropy/calculateEntropy.tsx +++ b/src/components/NucleotideEntropy/calculateEntropy.tsx @@ -134,8 +134,8 @@ const meanEntropy = (posEntropy: PositionEntropy[], sequenceType: SequenceType, g => gene.startPosition <= parseInt(g.position) && parseInt(g.position) <= gene.endPosition ) : gene.value === 'All' - ? posEntropy - : posEntropy.filter(g => g.position.includes(gene.value)); + ? posEntropy + : posEntropy.filter(g => g.position.includes(gene.value)); const sum = filteredPos.map(f => f.entropy).reduce((x, a) => x + a, 0); const count = sequenceType === 'nuc' ? gene.endPosition - gene.startPosition : sumOfGenesLength(gene); return sum / count; @@ -168,7 +168,10 @@ export const weeklyMeanEntropy = ( }; const groupBy = (arr: T[], key: (i: T) => K) => - arr.reduce((groups, item) => { - (groups[key(item)] ||= []).push(item); - return groups; - }, {} as Record); + arr.reduce( + (groups, item) => { + (groups[key(item)] ||= []).push(item); + return groups; + }, + {} as Record + ); diff --git a/src/components/NucleotideEntropy/hooks.ts b/src/components/NucleotideEntropy/hooks.ts index 9cb9c4165..55cc2854b 100644 --- a/src/components/NucleotideEntropy/hooks.ts +++ b/src/components/NucleotideEntropy/hooks.ts @@ -171,11 +171,14 @@ function calculateEntropyByTime( })) ) .flat() - .reduce((aggregated, weeklyMeanEntropy) => { - const previousValue = aggregated[weeklyMeanEntropy.day] ?? {}; - aggregated[weeklyMeanEntropy.day] = { ...previousValue, ...weeklyMeanEntropy }; - return aggregated; - }, {} as Record); + .reduce( + (aggregated, weeklyMeanEntropy) => { + const previousValue = aggregated[weeklyMeanEntropy.day] ?? {}; + aggregated[weeklyMeanEntropy.day] = { ...previousValue, ...weeklyMeanEntropy }; + return aggregated; + }, + {} as Record + ); return Object.values(timeMap); } diff --git a/src/components/NucleotideEntropy/useMultiChartData.ts b/src/components/NucleotideEntropy/useMultiChartData.ts index 1ef46cbe1..880bedba8 100644 --- a/src/components/NucleotideEntropy/useMultiChartData.ts +++ b/src/components/NucleotideEntropy/useMultiChartData.ts @@ -68,11 +68,14 @@ export const useMultiChartData = ( day: week.dateFrom!.dayjs.toDate().getTime(), [variants[Math.floor(i / weekRangesCount)]]: meanEntropy, })) - .reduce((aggregated, weeklyMeanEntropy) => { - const previousValue = aggregated[weeklyMeanEntropy.day] ?? {}; - aggregated[weeklyMeanEntropy.day] = { ...previousValue, ...weeklyMeanEntropy }; - return aggregated; - }, {} as Record); + .reduce( + (aggregated, weeklyMeanEntropy) => { + const previousValue = aggregated[weeklyMeanEntropy.day] ?? {}; + aggregated[weeklyMeanEntropy.day] = { ...previousValue, ...weeklyMeanEntropy }; + return aggregated; + }, + {} as Record + ); let plotData = Object.values(weeklyDataByTimestamp); //depending on the day, the latest week just started, so the entropy is calculated as 0 because there are no samples diff --git a/src/components/SvgVennDiagram.tsx b/src/components/SvgVennDiagram.tsx index 28cc89de9..7cd236283 100644 --- a/src/components/SvgVennDiagram.tsx +++ b/src/components/SvgVennDiagram.tsx @@ -122,163 +122,163 @@ export const SvgVennDiagram = ({ selectors, domain, numberOfvariants }: Props) = }, ] : numberOfvariants === 3 - ? [ - { - variants: [0], - svgTransform: 'matrix(1 0 0 1 548.3361 206.3148)', - path: `M388.81,331.49c54.26,0,106.9,10.63,156.46,31.59c13.66,5.78,27.05,12.35,40.03,19.64 + ? [ + { + variants: [0], + svgTransform: 'matrix(1 0 0 1 548.3361 206.3148)', + path: `M388.81,331.49c54.26,0,106.9,10.63,156.46,31.59c13.66,5.78,27.05,12.35,40.03,19.64 c12.99-7.29,26.37-13.86,40.03-19.64c49.56-20.96,102.2-31.59,156.46-31.59c54.26,0,106.9,10.63,156.46,31.59 c10.43,4.41,20.7,9.28,30.76,14.59C960.92,173.01,791.9,9.01,585.3,9.01s-375.62,164-383.71,368.65 c10.05-5.3,20.32-10.17,30.76-14.59C281.9,342.12,334.55,331.49,388.81,331.49z`, - }, - { - variants: [1], - svgTransform: 'matrix(1 0 0 1 182.8677 823.3275)', - path: `M497.57,1017.67c-18.19-18.19-34.7-38.2-49.08-59.48c-14.52-21.49-26.99-44.46-37.06-68.28 + }, + { + variants: [1], + svgTransform: 'matrix(1 0 0 1 182.8677 823.3275)', + path: `M497.57,1017.67c-18.19-18.19-34.7-38.2-49.08-59.48c-14.52-21.49-26.99-44.46-37.06-68.28 c-20.3-47.99-30.91-98.87-31.56-151.32c-6.55-3.9-13-7.99-19.31-12.25c-21.28-14.38-41.3-30.89-59.48-49.08 c-18.19-18.19-34.7-38.2-49.08-59.48c-14.52-21.49-26.99-44.46-37.06-68.28c-18.91-44.7-29.4-91.91-31.28-140.55 C76.23,477.1,4.79,597.08,4.79,733.45c0,211.75,172.27,384.02,384.02,384.02c64.38,0,125.11-15.93,178.46-44.05 c-3.44-2.17-6.85-4.39-10.22-6.67C535.77,1052.37,515.75,1035.86,497.57,1017.67z`, - }, - { - variants: [2], - svgTransform: 'matrix(1 0 0 1 963.0196 823.3275)', - path: `M918.61,617.78c-14.38,21.28-30.89,41.3-49.08,59.48c-18.19,18.19-38.2,34.7-59.48,49.08 + }, + { + variants: [2], + svgTransform: 'matrix(1 0 0 1 963.0196 823.3275)', + path: `M918.61,617.78c-14.38,21.28-30.89,41.3-49.08,59.48c-18.19,18.19-38.2,34.7-59.48,49.08 c-6.31,4.27-12.76,8.35-19.31,12.25c-0.65,52.44-11.26,103.32-31.56,151.32c-10.08,23.82-22.54,46.79-37.06,68.28 c-14.38,21.28-30.89,41.3-49.08,59.48c-18.19,18.19-38.2,34.7-59.48,49.08c-3.37,2.28-6.78,4.5-10.22,6.67 c53.35,28.12,114.08,44.05,178.46,44.05c211.75,0,384.02-172.27,384.02-384.02c0-136.36-71.45-256.35-178.87-324.5 c-1.88,48.64-12.37,95.85-31.28,140.55C945.59,573.32,933.12,596.29,918.61,617.78z`, - }, - { - variants: [0, 1, 2], - svgTransform: 'matrix(1 0 0 1 548.3361 620.9984)', - path: `M397.81,728.1c55.48,31.17,119.45,48.96,187.49,48.96c68.04,0,132-17.79,187.49-48.96 + }, + { + variants: [0, 1, 2], + svgTransform: 'matrix(1 0 0 1 548.3361 620.9984)', + path: `M397.81,728.1c55.48,31.17,119.45,48.96,187.49,48.96c68.04,0,132-17.79,187.49-48.96 c-1.89-137.77-76.7-258.23-187.49-324.48C474.51,469.86,399.71,590.33,397.81,728.1z`, - }, - { - variants: [0, 1], - svgTransform: 'matrix(1 0 0 1 307.7284 511.6313)', - path: `M380.15,717.53c1.88-48.64,12.37-95.85,31.28-140.55c10.07-23.82,22.54-46.79,37.06-68.28 + }, + { + variants: [0, 1], + svgTransform: 'matrix(1 0 0 1 307.7284 511.6313)', + path: `M380.15,717.53c1.88-48.64,12.37-95.85,31.28-140.55c10.07-23.82,22.54-46.79,37.06-68.28 c14.38-21.28,30.89-41.3,49.08-59.48c18.19-18.19,38.2-34.7,59.48-49.08c3.37-2.28,6.78-4.5,10.22-6.67 c-53.35-28.12-114.08-44.05-178.46-44.05c-68.04,0-132,17.79-187.49,48.96C203.16,532.53,274.13,650.27,380.15,717.53z`, - }, - { - variants: [0, 2], - svgTransform: 'matrix(1 0 0 1 808.9943 511.6313)', - path: `M603.33,393.47c3.44,2.17,6.85,4.39,10.22,6.67c21.28,14.38,41.3,30.89,59.48,49.08 + }, + { + variants: [0, 2], + svgTransform: 'matrix(1 0 0 1 808.9943 511.6313)', + path: `M603.33,393.47c3.44,2.17,6.85,4.39,10.22,6.67c21.28,14.38,41.3,30.89,59.48,49.08 c18.19,18.19,34.7,38.2,49.08,59.48c14.52,21.49,26.99,44.46,37.06,68.28c18.91,44.7,29.4,91.91,31.28,140.55 c106.01-67.26,176.99-185,178.83-319.15c-55.48-31.17-119.45-48.96-187.49-48.96C717.41,349.43,656.68,365.35,603.33,393.47z`, - }, - { - variants: [1, 2], - svgTransform: 'matrix(1 0 0 1 548.3361 935.4288)', - path: `M772.52,748.82c-10.05,5.3-20.32,10.17-30.76,14.59c-49.56,20.96-102.2,31.59-156.46,31.59 + }, + { + variants: [1, 2], + svgTransform: 'matrix(1 0 0 1 548.3361 935.4288)', + path: `M772.52,748.82c-10.05,5.3-20.32,10.17-30.76,14.59c-49.56,20.96-102.2,31.59-156.46,31.59 c-54.26,0-106.9-10.63-156.46-31.59c-10.43-4.41-20.7-9.28-30.76-14.59c5.28,133.57,79.12,249.82,187.22,314.47 C693.4,998.64,767.24,882.39,772.52,748.82z`, - }, - ] - : numberOfvariants === 4 - ? [ - { - variants: [0], - svgTransform: 'matrix(1 0 0 1 441.3496 234.874)', - path: `M500.17,272.38c20.04-18.28,40.95-34.21,61.83-47.54c-72.87-46.06-145.14-60.11-178.46-29.72 + }, + ] + : numberOfvariants === 4 + ? [ + { + variants: [0], + svgTransform: 'matrix(1 0 0 1 441.3496 234.874)', + path: `M500.17,272.38c20.04-18.28,40.95-34.21,61.83-47.54c-72.87-46.06-145.14-60.11-178.46-29.72 c-8.93,8.15-14.35,18.85-16.54,31.44c36.5,8.01,78.86,28.18,120.07,58.25C491.3,280.63,495.67,276.48,500.17,272.38z`, - }, - { - variants: [1], - svgTransform: 'matrix(1 0 0 1 676.3496 228.874)', - path: `M657.93,284.22c39.82-29.78,80.8-49.75,116.07-57.63c-2-12.74-7.25-23.57-16.04-31.77 + }, + { + variants: [1], + svgTransform: 'matrix(1 0 0 1 676.3496 228.874)', + path: `M657.93,284.22c39.82-29.78,80.8-49.75,116.07-57.63c-2-12.74-7.25-23.57-16.04-31.77 c-32.24-30.04-102.43-15.86-172.96,30.12c20.55,13.27,41.15,29.24,60.87,47.61C650,276.42,654.02,280.31,657.93,284.22z`, - }, - { - variants: [2], - svgTransform: 'matrix(1 0 0 1 297.3496 373.874)', - path: `M485.21,563.92c-36.35,8.98-67.13,4.93-85.98-14.5c-28.45-29.33-22.93-86.65,8.81-149.47 + }, + { + variants: [2], + svgTransform: 'matrix(1 0 0 1 297.3496 373.874)', + path: `M485.21,563.92c-36.35,8.98-67.13,4.93-85.98-14.5c-28.45-29.33-22.93-86.65,8.81-149.47 c-43.36-60.86-65.03-122.39-58.41-165.37c-36.42-9.03-67.26-4.99-86.14,14.46c-45.07,46.45-4.91,163.16,89.7,260.67 C418.63,577.16,492.98,617.75,547.52,621c-18.26-1.19-33.65-7.3-44.84-18.83C493.11,592.3,487.39,579.26,485.21,563.92z`, - }, - { - variants: [3], - svgTransform: 'matrix(1 0 0 1 818.3496 378.874)', - path: `M735.74,398.24c32.04,62.62,37.78,119.89,9.39,149.09c-18.71,19.24-49.28,23.23-85.38,14.3 + }, + { + variants: [3], + svgTransform: 'matrix(1 0 0 1 818.3496 378.874)', + path: `M735.74,398.24c32.04,62.62,37.78,119.89,9.39,149.09c-18.71,19.24-49.28,23.23-85.38,14.3 c-2.27,14.71-7.89,27.22-17.15,36.74c-11.09,11.4-26.35,17.45-44.45,18.62c54.06-3.22,127.75-43.35,192.61-110.04 c93.78-96.42,133.58-211.83,88.91-257.76c-18.68-19.21-49.19-23.22-85.21-14.34C800.53,277.52,778.8,338.26,735.74,398.24z`, - }, - { - variants: [0, 1, 2, 3], - svgTransform: 'matrix(1 0 0 1 554.3496 465.874)', - path: `M575.14,385.77c-27.32,32.62-47.17,65.94-58.14,96.2c19.01,14.69,38.3,27.24,57.2,37.4 + }, + { + variants: [0, 1, 2, 3], + svgTransform: 'matrix(1 0 0 1 554.3496 465.874)', + path: `M575.14,385.77c-27.32,32.62-47.17,65.94-58.14,96.2c19.01,14.69,38.3,27.24,57.2,37.4 c19.41-10.29,39.25-23.09,58.8-38.18C621.97,451.13,602.23,418.1,575.14,385.77z`, - }, - { - variants: [0, 1], - svgTransform: 'matrix(1 0 0 1 556.3496 311.874)', - path: `M571.84,368.77c10.5-13.22,22.15-26.32,34.88-39.05c12.17-12.17,24.68-23.36,37.3-33.49 + }, + { + variants: [0, 1], + svgTransform: 'matrix(1 0 0 1 556.3496 311.874)', + path: `M571.84,368.77c10.5-13.22,22.15-26.32,34.88-39.05c12.17-12.17,24.68-23.36,37.3-33.49 c-3.9-4.2-7.92-8.38-12.05-12.51c-19.71-19.71-40.3-36.84-60.84-51.07c-20.06,14.03-40.15,30.82-59.4,50.07 c-4.32,4.32-8.51,8.69-12.58,13.09c12.8,10.24,25.49,21.57,37.83,33.91C549.69,342.45,561.34,355.55,571.84,368.77z`, - }, - { - variants: [0, 2], - svgTransform: 'matrix(1 0 0 1 399.3496 311.874)', - path: `M361.78,235.45c-6.08,38.3,13.82,93.13,53.64,147.36c14.73-28.28,35.6-57.81,61.7-86.01 + }, + { + variants: [0, 2], + svgTransform: 'matrix(1 0 0 1 399.3496 311.874)', + path: `M361.78,235.45c-6.08,38.3,13.82,93.13,53.64,147.36c14.73-28.28,35.6-57.81,61.7-86.01 C437.54,265.14,396.85,243.89,361.78,235.45z`, - }, - { - variants: [0, 3], - svgTransform: 'matrix(1 0 0 1 683.3496 508.874)', - path: `M678.62,453.64c-11.41,11.64-23.11,22.38-34.93,32.2c8.39,24.6,11.46,47.24,8.54,65.99 + }, + { + variants: [0, 3], + svgTransform: 'matrix(1 0 0 1 683.3496 508.874)', + path: `M678.62,453.64c-11.41,11.64-23.11,22.38-34.93,32.2c8.39,24.6,11.46,47.24,8.54,65.99 c33.45,8.21,61.77,4.54,79.11-13.14c26.31-26.84,20.99-79.48-8.7-137.04C709.91,419.23,695.18,436.75,678.62,453.64z`, - }, - { - variants: [1, 2], - svgTransform: 'matrix(1 0 0 1 428.3496 508.874)', - path: `M501.71,487.27c-11.73-9.8-23.34-20.53-34.66-32.14c-16.82-17.25-31.76-35.15-44.63-53.12 + }, + { + variants: [1, 2], + svgTransform: 'matrix(1 0 0 1 428.3496 508.874)', + path: `M501.71,487.27c-11.73-9.8-23.34-20.53-34.66-32.14c-16.82-17.25-31.76-35.15-44.63-53.12 c-29.15,57.4-34.22,109.77-8.09,136.57c17.31,17.75,45.58,21.46,78.96,13.25C490.66,533.36,493.67,511.25,501.71,487.27z`, - }, - { - variants: [1, 3], - svgTransform: 'matrix(1 0 0 1 718.3496 311.874)', - path: `M779.04,238.42c-35.25,8.45-76.21,29.87-116.02,61.82c25.99,27.98,46.83,57.29,61.62,85.41 + }, + { + variants: [1, 3], + svgTransform: 'matrix(1 0 0 1 718.3496 311.874)', + path: `M779.04,238.42c-35.25,8.45-76.21,29.87-116.02,61.82c25.99,27.98,46.83,57.29,61.62,85.41 C764.53,331.59,784.67,276.86,779.04,238.42z`, - }, - { - variants: [2, 3], - svgTransform: 'matrix(1 0 0 1 551.3496 591.874)', - path: `M509.29,563.92c2,13.67,7.26,25.29,16.05,34.08c10.28,10.28,24.41,15.72,41.18,16.78 + }, + { + variants: [2, 3], + svgTransform: 'matrix(1 0 0 1 551.3496 591.874)', + path: `M509.29,563.92c2,13.67,7.26,25.29,16.05,34.08c10.28,10.28,24.41,15.72,41.18,16.78 c0.48,0.03,0.97,0.05,1.45,0.07c0.48,0.02,0.96,0.05,1.44,0.06c0.67,0.02,1.33,0.03,1.99,0.04c0.48,0.01,0.96,0.01,1.44,0.01 c0.48,0,0.96-0.01,1.44-0.01c0.66-0.01,1.32-0.02,1.99-0.04c0.48-0.02,0.96-0.04,1.44-0.06c0.48-0.02,0.96-0.05,1.45-0.07 c16.77-1.06,30.91-6.51,41.18-16.78c8.58-8.58,13.79-19.86,15.89-33.11c-20.01-4.82-41.86-13.8-64.29-26.52 C550.09,550.59,528.81,559.24,509.29,563.92z`, - }, - { - variants: [0, 1, 2], - svgTransform: 'matrix(1 0 0 1 483.3496 401.874)', - path: `M527.96,341.72c-12.34-12.34-25.03-23.67-37.83-33.91c-26.11,28.2-46.98,57.73-61.7,86.01 + }, + { + variants: [0, 1, 2], + svgTransform: 'matrix(1 0 0 1 483.3496 401.874)', + path: `M527.96,341.72c-12.34-12.34-25.03-23.67-37.83-33.91c-26.11,28.2-46.98,57.73-61.7,86.01 c12.87,17.53,27.81,34.99,44.63,51.81c11.32,11.32,22.94,21.78,34.66,31.34c10.4-30.26,29.22-63.58,55.12-96.2 C552.34,367.55,540.69,354.45,527.96,341.72z`, - }, - { - variants: [0, 1, 3], - svgTransform: 'matrix(1 0 0 1 643.3496 401.874)', - path: `M716.64,394.64c-14.79-28.12-35.63-57.44-61.62-85.42c-12.62,10.13-25.13,21.32-37.3,33.49 + }, + { + variants: [0, 1, 3], + svgTransform: 'matrix(1 0 0 1 643.3496 401.874)', + path: `M716.64,394.64c-14.79-28.12-35.63-57.44-61.62-85.42c-12.62,10.13-25.13,21.32-37.3,33.49 c-12.73,12.73-24.38,25.83-34.88,39.05c25.68,32.33,44.4,65.36,54.85,95.42c11.82-9.62,23.52-20.15,34.93-31.56 C689.18,429.07,703.91,411.89,716.64,394.64z`, - }, - { - variants: [1, 2, 3], - svgTransform: 'matrix(1 0 0 1 505.3496 537.874)', - path: `M503.3,553.92c19.52-4.68,40.79-13.34,62.64-25.56c-17.92-10.16-36.2-22.7-54.22-37.4 + }, + { + variants: [1, 2, 3], + svgTransform: 'matrix(1 0 0 1 505.3496 537.874)', + path: `M503.3,553.92c19.52-4.68,40.79-13.34,62.64-25.56c-17.92-10.16-36.2-22.7-54.22-37.4 C503.68,514.36,500.66,535.93,503.3,553.92z`, - }, - { - variants: [0, 2, 3], - svgTransform: 'matrix(1 0 0 1 598.3496 537.874)', - path: `M642.23,554.89c2.92-18.38-0.16-40.58-8.55-64.69c-18.53,15.08-37.33,27.89-55.73,38.17 + }, + { + variants: [0, 2, 3], + svgTransform: 'matrix(1 0 0 1 598.3496 537.874)', + path: `M642.23,554.89c2.92-18.38-0.16-40.58-8.55-64.69c-18.53,15.08-37.33,27.89-55.73,38.17 C600.38,541.08,622.22,550.07,642.23,554.89z`, - }, - ] - : []; + }, + ] + : []; return tmp.map(t => ({ ...t, mutations: findSet(t.variants), @@ -420,20 +420,20 @@ export const SvgVennDiagram = ({ selectors, domain, numberOfvariants }: Props) = numberOfvariants === 2 ? plotInfo.venn2.viewBox : numberOfvariants === 3 - ? plotInfo.venn3.viewBox - : numberOfvariants === 4 - ? plotInfo.venn4.viewBox - : '' + ? plotInfo.venn3.viewBox + : numberOfvariants === 4 + ? plotInfo.venn4.viewBox + : '' } xmlns='http://www.w3.org/2000/svg' className={ numberOfvariants === 2 ? plotInfo.venn2.className : numberOfvariants === 3 - ? plotInfo.venn3.className - : numberOfvariants === 4 - ? plotInfo.venn4.className - : '' + ? plotInfo.venn3.className + : numberOfvariants === 4 + ? plotInfo.venn4.className + : '' } > {paths} diff --git a/src/data/VariantSelector.ts b/src/data/VariantSelector.ts index bbf02ec03..0f8c1bc92 100644 --- a/src/data/VariantSelector.ts +++ b/src/data/VariantSelector.ts @@ -303,6 +303,6 @@ export function getPangoLineage(variant: VariantSelector) { return variant.pangoLineage ? variant.pangoLineage : variant.nextcladePangoLineage - ? variant.nextcladePangoLineage - : ''; + ? variant.nextcladePangoLineage + : ''; } diff --git a/src/data/api-lapis.ts b/src/data/api-lapis.ts index 8b16315a2..70e72a5e6 100644 --- a/src/data/api-lapis.ts +++ b/src/data/api-lapis.ts @@ -371,7 +371,7 @@ export async function _fetchAggSamples( const gisaidToCovSpectrumNameMap = await LocationService.getGisaidToCovSpectrumNameMap(); return parsed.map(e => ({ ...e, - country: e.country ? gisaidToCovSpectrumNameMap.get(e.country) ?? null : null, + country: e.country ? (gisaidToCovSpectrumNameMap.get(e.country) ?? null) : null, })); } diff --git a/src/helpers/get-location.ts b/src/helpers/get-location.ts index 5977c7524..66be4e3df 100644 --- a/src/helpers/get-location.ts +++ b/src/helpers/get-location.ts @@ -7,7 +7,7 @@ export function getLocation(exploreUrl?: ExploreUrl): string { 'country' in locationObj ? locationObj['country'] : 'region' in locationObj - ? locationObj['region'] - : 'World'; + ? locationObj['region'] + : 'World'; return place; } diff --git a/src/helpers/query-encoder.ts b/src/helpers/query-encoder.ts index a3b23612f..d2294b800 100644 --- a/src/helpers/query-encoder.ts +++ b/src/helpers/query-encoder.ts @@ -17,7 +17,10 @@ export class ZodQueryEncoder, T extends zod.input, T extends zod.input, - InternalType extends zod.infer + InternalType extends zod.infer, > implements AsyncQueryEncoder { _decodedType!: ExternalType; diff --git a/src/models/wasteWater/constants.ts b/src/models/wasteWater/constants.ts index 3393eace9..eb972ca79 100644 --- a/src/models/wasteWater/constants.ts +++ b/src/models/wasteWater/constants.ts @@ -23,7 +23,7 @@ export const wastewaterVariantColors: { 'JN.1': '#00E9FF', // improv, not in sync with covariants.org 'BA.2.87.1': '#56ACBC', //improv, not in sync with covariants.org 'KP.2': '#876566', //improv not in sync with covariants.org - "KP.3": "#eebebf", //improv not in sync with covariants.org + 'KP.3': '#eebebf', //improv not in sync with covariants.org 'undetermined': '#969696', }; diff --git a/src/widgets/HospitalizationDeathChart.tsx b/src/widgets/HospitalizationDeathChart.tsx index f82d08e98..b326e5a86 100644 --- a/src/widgets/HospitalizationDeathChart.tsx +++ b/src/widgets/HospitalizationDeathChart.tsx @@ -144,8 +144,8 @@ export const HospitalizationDeathChart = ({ ? ageGroup.replace(/-\d+$/, '-') : '?' : ageGroup - ? ageGroup - : 'Unk.'; + ? ageGroup + : 'Unk.'; const baseCounts = { subject: processCounts(variantCounts), diff --git a/src/widgets/Widget.tsx b/src/widgets/Widget.tsx index 8a30e66ea..23571ef19 100644 --- a/src/widgets/Widget.tsx +++ b/src/widgets/Widget.tsx @@ -24,7 +24,7 @@ type LabelledComponent = { label: string; component: C }; export class Widget< E extends AsyncQueryEncoder, P extends E['_decodedType'], - C extends React.FunctionComponent

+ C extends React.FunctionComponent

, > { readonly ShareableComponent: React.FunctionComponent

; readonly mergedPropsEncoder: MergedAsyncQueryEncoder<{