diff --git a/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryData.json b/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryData.json new file mode 100644 index 000000000..414465aa4 --- /dev/null +++ b/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryData.json @@ -0,0 +1,217 @@ +{ + "gnomADV4": [ + { + "geneticAncestryGroup": "amr", + "exomes": { + "XX": 12845, + "XY": 9517 + }, + "genomes": { + "XX": 3399, + "XY": 4258 + } + }, + + { + "geneticAncestryGroup": "afr", + "exomes": { + "XX": 9663, + "XY": 7077 + }, + "genomes": { + "XX": 11094, + "XY": 9711 + } + }, + + { + "geneticAncestryGroup": "asj", + "exomes": { + "XX": 6318, + "XY": 6750 + }, + "genomes": { + "XX": 934, + "XY": 802 + } + }, + + { + "geneticAncestryGroup": "ami", + "exomes": { + "XX": 0, + "XY": 0 + }, + "genomes": { + "XX": 235, + "XY": 221 + } + }, + + { + "geneticAncestryGroup": "eas", + "exomes": { + "XX": 10356, + "XY": 9494 + }, + "genomes": { + "XX": 1136, + "XY": 1462 + } + }, + + { + "geneticAncestryGroup": "fin", + "exomes": { + "XX": 13824, + "XY": 12886 + }, + "genomes": { + "XX": 1287, + "XY": 4029 + } + }, + + { + "geneticAncestryGroup": "nfe", + "exomes": { + "XX": 286144, + "XY": 269862 + }, + "genomes": { + "XX": 19683, + "XY": 14342 + } + }, + + { + "geneticAncestryGroup": "mid", + "exomes": { + "XX": 1253, + "XY": 1631 + }, + "genomes": { + "XX": 72, + "XY": 75 + } + }, + + { + "geneticAncestryGroup": "remaining", + "exomes": { + "XX": 15900, + "XY": 14298 + }, + "genomes": { + "XX": 525, + "XY": 533 + } + }, + + { + "geneticAncestryGroup": "sas", + "exomes": { + "XX": 11020, + "XY": 32109 + }, + "genomes": { + "XX": 577, + "XY": 1840 + } + }, + + { + "geneticAncestryGroup": "total", + "exomes": { + "XX": 367323, + "XY": 363624 + }, + "genomes": { + "XX": 38942, + "XY": 37273 + } + } + ], + + "gnomADV4NonUkb": [ + { + "geneticAncestryGroup": "amr", + "exomes": { + "XX": 12520, + "XY": 9350 + } + }, + + { + "geneticAncestryGroup": "afr", + "exomes": { + "XX": 5143, + "XY": 3704 + } + }, + + { + "geneticAncestryGroup": "asj", + "exomes": { + "XX": 4919, + "XY": 5573 + } + }, + + { + "geneticAncestryGroup": "eas", + "exomes": { + "XX": 9149, + "XY": 8886 + } + }, + + { + "geneticAncestryGroup": "fin", + "exomes": { + "XX": 13699, + "XY": 12873 + } + }, + + { + "geneticAncestryGroup": "nfe", + "exomes": { + "XX": 81110, + "XY": 93944 + } + }, + + { + "geneticAncestryGroup": "mid", + "exomes": { + "XX": 958, + "XY": 1116 + } + }, + + { + "geneticAncestryGroup": "remaining", + "exomes": { + "XX": 8376, + "XY": 8173 + } + }, + + { + "geneticAncestryGroup": "sas", + "exomes": { + "XX": 7251, + "XY": 27648 + } + }, + + { + "geneticAncestryGroup": "total", + "exomes": { + "XX": 143125, + "XY": 171267 + } + } + ] +} diff --git a/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryTables.tsx b/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryTables.tsx index 6561ea3e1..bc93ce111 100644 --- a/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryTables.tsx +++ b/browser/src/StatsPage/StatsPageTables/InferredSexPerGeneticAncestryTables.tsx @@ -2,6 +2,8 @@ import React from 'react' import { DownloadElementAsPNGButton } from '../DownloadFigure' +import inferredSexAllV4Data from './InferredSexPerGeneticAncestryData.json' + import { StatsTable, StatsTableHeaderRow, @@ -10,13 +12,14 @@ import { StatsTableCaption, StatsTableFooter, } from './TableStyles' +import { populationName } from '@gnomad/dataset-metadata/gnomadPopulations' export const InferredSexAllV4Table = () => { const elementId = 'inferred-sex-by-genetic-ancestry-group-table' return (
- + Genetic Ancestry @@ -39,154 +42,51 @@ export const InferredSexAllV4Table = () => { - - {/* All */} - African/African American - AFR - 16740 - 9663 - 7077 - 20805 - 11094 - 9711 - 37545 - 20757 - 16788 - - - Amish - AMI - - - - - - - 456 - 235 - 221 - 456 - 235 - 221 - - - Admixed American - AMR - 22362 - 12845 - 9517 - 7657 - 3399 - 4258 - 30019 - 16244 - 13775 - - - Ashkenazi Jewish - ASJ - 13068 - 6318 - 6750 - 1736 - 934 - 802 - 14804 - 7252 - 7552 - - - East Asian - EAS - 19850 - 10356 - 9494 - 2598 - 1136 - 1462 - 22448 - 11492 - 10956 - - - European (Finnish) - FIN - 26710 - 13824 - 12886 - 5316 - 1287 - 4029 - 32026 - 15111 - 16915 - - - Middle Eastern - MID - 2884 - 1253 - 1631 - 147 - 72 - 75 - 3031 - 1325 - 1706 - - - European (non-Finnish) - NFE - 556006 - 286144 - 269862 - 34025 - 19683 - 14342 - 590031 - 305827 - 284204 - - - Remaining - Remaining - 30198 - 15900 - 14298 - 1058 - 525 - 533 - 31256 - 16425 - 14831 - - - South Asian - SAS - 43129 - 11020 - 32109 - 2417 - 577 - 1840 - 45546 - 11597 - 33949 - + {inferredSexAllV4Data.gnomADV4 + .filter((tableRowData) => tableRowData.geneticAncestryGroup !== 'total') + .map((tableRowData) => { + const exomesCombined = tableRowData.exomes.XX + tableRowData.exomes.XY + const genomesCombined = tableRowData.genomes.XX + tableRowData.genomes.XY + return ( + + {populationName(tableRowData.geneticAncestryGroup)} + {tableRowData.geneticAncestryGroup} + {exomesCombined.toLocaleString()} + {tableRowData.exomes.XX.toLocaleString()} + {tableRowData.exomes.XY.toLocaleString()} + {genomesCombined.toLocaleString()} + {tableRowData.genomes.XX.toLocaleString()} + {tableRowData.genomes.XY.toLocaleString()} + {(exomesCombined + genomesCombined).toLocaleString()} + {(tableRowData.exomes.XX + tableRowData.genomes.XX).toLocaleString()} + {(tableRowData.exomes.XY + tableRowData.genomes.XY).toLocaleString()} + + ) + })} - - Total - - 730947 - 367323 - 363624 - 76215 - 38942 - 37273 - 807162 - 406265 - 400897 - + {inferredSexAllV4Data.gnomADV4 + .filter((tableRowData) => tableRowData.geneticAncestryGroup === 'total') + .map((tableRowData) => { + const exomesCombined = tableRowData.exomes.XX + tableRowData.exomes.XY + const genomesCombined = tableRowData.genomes.XX + tableRowData.genomes.XY + return ( + + Total + + {exomesCombined.toLocaleString()} + {tableRowData.exomes.XX.toLocaleString()} + {tableRowData.exomes.XY.toLocaleString()} + {genomesCombined.toLocaleString()} + {tableRowData.genomes.XX.toLocaleString()} + {tableRowData.genomes.XY.toLocaleString()} + {(exomesCombined + genomesCombined).toLocaleString()} + {(tableRowData.exomes.XX + tableRowData.genomes.XX).toLocaleString()} + {(tableRowData.exomes.XY + tableRowData.genomes.XY).toLocaleString()} + + ) + })} -
Inferred sex counts of gnomAD v4 samples per Genetic Ancestry Group
@@ -203,13 +103,11 @@ export const InferredSexNonUKBV4Table = () => { return (
- + Genetic Ancestry v4 Exomes - v4 Genomes - Combined Genetic Ancestry @@ -217,147 +115,33 @@ export const InferredSexNonUKBV4Table = () => { Sample Count XX XY - Sample Count - XX - XY - Sample Count - XX - XY - - African/African American - AFR - 8847 - 5143 - 3704 - - - - - - - - - Admixed American - AMR - 21870 - 12520 - 9350 - - - - - - - - - Ashkenazi Jewish - ASJ - 10492 - 4919 - 5573 - - - - - - - - - East Asian - EAS - 18035 - 9149 - 8886 - - - - - - - - - European (Finnish) - FIN - 26572 - 13699 - 12873 - - - - - - - - - Middle Eastern - MID - 2074 - 958 - 1116 - - - - - - - - - European (non-Finnish) - NFE - 175054 - 81110 - 93944 - - - - - - - - - Remaining - Remaining - 16549 - 8376 - 8173 - - - - - - - - - South Asian - SAS - 34899 - 7251 - 27648 - - - - - - - + {inferredSexAllV4Data.gnomADV4NonUkb + .filter((tableRowData) => tableRowData.geneticAncestryGroup !== 'total') + .map((tableRowData) => ( + + {populationName(tableRowData.geneticAncestryGroup)} + {tableRowData.geneticAncestryGroup} + {(tableRowData.exomes.XX + tableRowData.exomes.XY).toLocaleString()} + {tableRowData.exomes.XX.toLocaleString()} + {tableRowData.exomes.XY.toLocaleString()} + + ))} - - Total - - 314392 - 143125 - 171267 - - - - - - - + {inferredSexAllV4Data.gnomADV4NonUkb + .filter((tableRowData) => tableRowData.geneticAncestryGroup === 'total') + .map((tableRowData) => ( + + Total + + {(tableRowData.exomes.XX + tableRowData.exomes.XY).toLocaleString()} + {tableRowData.exomes.XX.toLocaleString()} + {tableRowData.exomes.XY.toLocaleString()} + + ))}