From 3f8ee12390d8e9920243144cf7e93f1fb735be12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Thu, 12 Dec 2024 09:07:05 +0000 Subject: [PATCH] storage: Tune outdated cohort stats warning event. #TASK-7225 --- .../variant/query/projection/VariantQueryProjectionParser.java | 2 +- .../core/variant/stats/VariantStatisticsManagerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/query/projection/VariantQueryProjectionParser.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/query/projection/VariantQueryProjectionParser.java index 95add22ec8..d04c94c7f7 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/query/projection/VariantQueryProjectionParser.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/query/projection/VariantQueryProjectionParser.java @@ -154,7 +154,7 @@ public VariantQueryProjection parseVariantQueryProjection(Query query, QueryOpti message += " The statistics have been calculated with " + invalidStatsNumSamples + " samples, " + "while the total number of samples in the cohort is " + numSampmles + "."; } - message += " To display updated statistics, please execute variant-stats-index."; + message += " To display updated statistics, please contact your Organization / Study Administrator."; events.add(new Event(Event.Type.WARNING, message)); } else if (status == TaskMetadata.Status.RUNNING) { String message = "Please note that the Cohort Stats for " diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/stats/VariantStatisticsManagerTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/stats/VariantStatisticsManagerTest.java index e90b49cff4..646c212635 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/stats/VariantStatisticsManagerTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/stats/VariantStatisticsManagerTest.java @@ -169,7 +169,7 @@ public void queryInvalidStats() throws Exception { assertEquals(1, result.getEvents().size()); assertEquals("Please note that the Cohort Stats for '1000g:cohort2' are currently outdated." + " The statistics have been calculated with 2 samples, while the total number of samples in the cohort is 4." + - " To display updated statistics, please execute variant-stats-index.", result.getEvents().get(0).getMessage()); + " To display updated statistics, please contact your Organization / Study Administrator.", result.getEvents().get(0).getMessage()); VariantStorageEngine engineMock = Mockito.spy(variantStorageEngine); VariantStatisticsManager statsManagerMock = Mockito.spy(variantStorageEngine.newVariantStatisticsManager());