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()} + + ))}
diff --git a/browser/src/StatsPage/__snapshots__/StatsPage.spec.tsx.snap b/browser/src/StatsPage/__snapshots__/StatsPage.spec.tsx.snap index b5d8c158a..3c47f41f0 100644 --- a/browser/src/StatsPage/__snapshots__/StatsPage.spec.tsx.snap +++ b/browser/src/StatsPage/__snapshots__/StatsPage.spec.tsx.snap @@ -7527,6 +7527,7 @@ exports[`Stats Page has no unexpected changes 1`] = `
@@ -7739,34 +7740,34 @@ exports[`Stats Page has no unexpected changes 1`] = ` East Asian @@ -7774,104 +7775,104 @@ exports[`Stats Page has no unexpected changes 1`] = ` European (Finnish) @@ -7879,19 +7880,19 @@ exports[`Stats Page has no unexpected changes 1`] = ` Remaining @@ -7914,34 +7915,34 @@ exports[`Stats Page has no unexpected changes 1`] = ` South Asian @@ -7954,31 +7955,31 @@ exports[`Stats Page has no unexpected changes 1`] = ` @@ -8019,6 +8020,7 @@ exports[`Stats Page has no unexpected changes 1`] = `
- African/African American + Admixed American - AFR + amr - 16740 + 22,362 - 9663 + 12,845 - 7077 + 9,517 - 20805 + 7,657 - 11094 + 3,399 - 9711 + 4,258 - 37545 + 30,019 - 20757 + 16,244 - 16788 + 13,775
- Amish + African/African American - AMI + afr - - + 16,740 - - + 9,663 - - + 7,077 - 456 + 20,805 - 235 + 11,094 - 221 + 9,711 - 456 + 37,545 - 235 + 20,757 - 221 + 16,788
- Admixed American + Ashkenazi Jewish - AMR + asj - 22362 + 13,068 - 12845 + 6,318 - 9517 + 6,750 - 7657 + 1,736 - 3399 + 934 - 4258 + 802 - 30019 + 14,804 - 16244 + 7,252 - 13775 + 7,552
- Ashkenazi Jewish + Amish - ASJ + ami - 13068 + 0 - 6318 + 0 - 6750 + 0 - 1736 + 456 - 934 + 235 - 802 + 221 - 14804 + 456 - 7252 + 235 - 7552 + 221
- EAS + eas - 19850 + 19,850 - 10356 + 10,356 - 9494 + 9,494 - 2598 + 2,598 - 1136 + 1,136 - 1462 + 1,462 - 22448 + 22,448 - 11492 + 11,492 - 10956 + 10,956
- FIN + fin - 26710 + 26,710 - 13824 + 13,824 - 12886 + 12,886 - 5316 + 5,316 - 1287 + 1,287 - 4029 + 4,029 - 32026 + 32,026 - 15111 + 15,111 - 16915 + 16,915
- Middle Eastern + European (non-Finnish) - MID + nfe - 2884 + 556,006 - 1253 + 286,144 - 1631 + 269,862 - 147 + 34,025 - 72 + 19,683 - 75 + 14,342 - 3031 + 590,031 - 1325 + 305,827 - 1706 + 284,204
- European (non-Finnish) + Middle Eastern - NFE + mid - 556006 + 2,884 - 286144 + 1,253 - 269862 + 1,631 - 34025 + 147 - 19683 + 72 - 14342 + 75 - 590031 + 3,031 - 305827 + 1,325 - 284204 + 1,706
- Remaining + remaining - 30198 + 30,198 - 15900 + 15,900 - 14298 + 14,298 - 1058 + 1,058 525 @@ -7900,13 +7901,13 @@ exports[`Stats Page has no unexpected changes 1`] = ` 533 - 31256 + 31,256 - 16425 + 16,425 - 14831 + 14,831
- SAS + sas - 43129 + 43,129 - 11020 + 11,020 - 32109 + 32,109 - 2417 + 2,417 577 - 1840 + 1,840 - 45546 + 45,546 - 11597 + 11,597 - 33949 + 33,949
- 730947 + 730,947 - 367323 + 367,323 - 363624 + 363,624 - 76215 + 76,215 - 38942 + 38,942 - 37273 + 37,273 - 807162 + 807,162 - 406265 + 406,265 - 400897 + 400,897
v4 Exomes - - XY - - - - - - - - - - - - - - - -
- v4 Genomes - - Combined -
- Sample Count - - XX - - XY - - Sample Count - - XX - - XY -
- African/African American + Admixed American - AFR + amr - 8847 + 21,870 - 5143 + 12,520 - 3704 + 9,350 - - - - -
- Admixed American + African/African American - AMR + afr - 21870 + 8,847 - 12520 + 5,143 - 9350 + 3,704 - - - - -
Ashkenazi Jewish - ASJ + asj - 10492 + 10,492 - 4919 + 4,919 - 5573 + 5,573 - - - - -
East Asian - EAS + eas - 18035 + 18,035 - 9149 + 9,149 - 8886 + 8,886 - - - - -
European (Finnish) - FIN + fin - 26572 + 26,572 - 13699 + 13,699 - 12873 + 12,873 - - - - -
- Middle Eastern + European (non-Finnish) - MID + nfe - 2074 + 175,054 - 958 + 81,110 - 1116 + 93,944 - - - - -
- European (non-Finnish) + Middle Eastern - NFE + mid - 175054 + 2,074 - 81110 + 958 - 93944 + 1,116 - - - - -
Remaining - Remaining + remaining - 16549 + 16,549 - 8376 + 8,376 - 8173 + 8,173 - - - - -
South Asian - SAS + sas - 34899 + 34,899 - 7251 + 7,251 - 27648 + 27,648 - - - - -
- 314392 + 314,392 - 143125 + 143,125 - 171267 + 171,267 - - - - -