From 4ac3744e15d6757d31804b286d3529ccdc27e0b8 Mon Sep 17 00:00:00 2001 From: tonywu1999 Date: Wed, 5 Nov 2025 17:03:55 -0500 Subject: [PATCH 1/2] fix(curation): Use matches_hash for statement hash due to string issues --- R/utils_getSubnetworkFromIndra.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/utils_getSubnetworkFromIndra.R b/R/utils_getSubnetworkFromIndra.R index 3977a4d..bad8005 100644 --- a/R/utils_getSubnetworkFromIndra.R +++ b/R/utils_getSubnetworkFromIndra.R @@ -125,7 +125,8 @@ } if (filter_by_curation) { for (i in seq_along(res)) { - stmt_hash <- res[[i]]$data$stmt_hash + stmt_json <- fromJSON(res[[i]]$data$stmt_json) + stmt_hash <- stmt_json$matches_hash incorrect_count <- .get_incorrect_curation_count(stmt_hash, api_key) res[[i]]$data$evidence_count <- res[[i]]$data$evidence_count - incorrect_count # Todo: Also subtract source_counts accordingly if requested From fdf42537ce16422b323c1549ac571c7701a978dc Mon Sep 17 00:00:00 2001 From: tonywu1999 Date: Wed, 5 Nov 2025 17:15:18 -0500 Subject: [PATCH 2/2] bug fix --- R/utils_getSubnetworkFromIndra.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/utils_getSubnetworkFromIndra.R b/R/utils_getSubnetworkFromIndra.R index bad8005..3f3a674 100644 --- a/R/utils_getSubnetworkFromIndra.R +++ b/R/utils_getSubnetworkFromIndra.R @@ -302,7 +302,8 @@ query(res, x)$data$source_counts }, ""), stmt_hash = vapply(keys(res), function(x) { - as.character(query(res, x)$data$stmt_hash) + stmt_json <- fromJSON(query(res, x)$data$stmt_json) + stmt_json$matches_hash }, ""), stringsAsFactors = FALSE )