From 6924e16e778c69cdbcf9c6f6f6fc4d1d69bb2512 Mon Sep 17 00:00:00 2001 From: sshugsc Date: Fri, 5 Dec 2025 11:09:15 -0800 Subject: [PATCH 1/2] avoid duplicate push to unknownSignificanceFromGeneProperty --- app/routes/report/variants.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/routes/report/variants.js b/app/routes/report/variants.js index 95a9ba7a..5044e82c 100644 --- a/app/routes/report/variants.js +++ b/app/routes/report/variants.js @@ -353,7 +353,14 @@ const getRapidReportVariants = async (tableName, variantType, reportId, rapidTab // add variants back to unknownSig list, that are tagged for this table based on gene properties alone // so that they can be filtered out of results if they are in TA or CR - unknownSignificanceResults.push(...unknownSignificanceFromGeneProperty); + const existingVariantIds = new Set(unknownSignificanceResults.map((variant) => {return variant.id;})); + + unknownSignificanceFromGeneProperty.forEach((variant) => { + if (!existingVariantIds.has(variant.id)) { + unknownSignificanceResults.push(variant); + existingVariantIds.add(variant.id); + } + }); // remove variants already included in a different section for (const row of unknownSignificanceResults) { From 4bce94e472121f44683519f9a98a73f33a363b3e Mon Sep 17 00:00:00 2001 From: sshugsc Date: Fri, 5 Dec 2025 11:13:01 -0800 Subject: [PATCH 2/2] update id to ident --- app/routes/report/variants.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/routes/report/variants.js b/app/routes/report/variants.js index 5044e82c..cdf07fda 100644 --- a/app/routes/report/variants.js +++ b/app/routes/report/variants.js @@ -353,12 +353,12 @@ const getRapidReportVariants = async (tableName, variantType, reportId, rapidTab // add variants back to unknownSig list, that are tagged for this table based on gene properties alone // so that they can be filtered out of results if they are in TA or CR - const existingVariantIds = new Set(unknownSignificanceResults.map((variant) => {return variant.id;})); + const existingVariants = new Set(unknownSignificanceResults.map((variant) => {return variant.ident;})); unknownSignificanceFromGeneProperty.forEach((variant) => { - if (!existingVariantIds.has(variant.id)) { + if (!existingVariants.has(variant.ident)) { unknownSignificanceResults.push(variant); - existingVariantIds.add(variant.id); + existingVariants.add(variant.ident); } });