From 7ffcd6188e5957470d5760f73bc1be16b98728fb Mon Sep 17 00:00:00 2001 From: scarlettlee9 Date: Mon, 10 Aug 2026 11:14:09 -0400 Subject: [PATCH 1/5] Fix color palettes --- R/f.color.schemes.R | 11 +++++++++++ tests/testthat/test-f.color.schemes.R | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/R/f.color.schemes.R b/R/f.color.schemes.R index c3602bd8..442541c6 100644 --- a/R/f.color.schemes.R +++ b/R/f.color.schemes.R @@ -57,6 +57,10 @@ f.color.schemes <- function(type) { "WILD 1" = "#e41a1c", "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", + "cVDPV 3" = "#08519C", + "cVDPV3" = "#08519C", + "VDPV 3" = "#00A6A6", + "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00", @@ -70,6 +74,10 @@ f.color.schemes <- function(type) { "WILD 1" = "#e41a1c", "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", + "cVDPV 3" = "#08519C", + "cVDPV3" = "#08519C", + "VDPV 3" = "#00A6A6", + "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00" @@ -119,6 +127,8 @@ f.color.schemes <- function(type) { "WILD 1" = "red", "cVDPV 2" = "dark green", "VDPV 2" = "light green", + "cVDPV 3" = "#08519C", + "VDPV 3" = "#00A6A6", "VDPV 1" = "light blue", "cVDPV 1" = "dark blue" ), @@ -311,6 +321,7 @@ f.color.schemes <- function(type) { "No EV isolated" = "#f2f2f2", "NPEV only" = "darkgrey", "VDPV2" = "darkred", + "VDPV3" = "#00A6A6", "Sabin 1" = scales::brewer_pal(palette = "Set1")(9)[1], "Sabin 2" = scales::brewer_pal(palette = "Set1")(9)[8], "Sabin 1/Sabin 3" = scales::brewer_pal(palette = "Set1")(9)[2], diff --git a/tests/testthat/test-f.color.schemes.R b/tests/testthat/test-f.color.schemes.R index 24d579b7..1bd02297 100644 --- a/tests/testthat/test-f.color.schemes.R +++ b/tests/testthat/test-f.color.schemes.R @@ -8,6 +8,10 @@ test_that("testing f.color.schemes() work", { "WILD 1" = "#e41a1c", "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", + "cVDPV 3" = "#08519C", + "cVDPV3" = "#08519C", + "VDPV 3" = "#00A6A6", + "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00", @@ -22,6 +26,10 @@ test_that("testing f.color.schemes() work", { "WILD 1" = "#e41a1c", "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", + "cVDPV 3" = "#08519C", + "cVDPV3" = "#08519C", + "VDPV 3" = "#00A6A6", + "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00" @@ -75,6 +83,8 @@ test_that("testing f.color.schemes() work", { "WILD 1" = "red", "cVDPV 2" = "dark green", "VDPV 2" = "light green", + "cVDPV 3" = "#08519C", + "VDPV 3" = "#00A6A6", "VDPV 1" = "light blue", "cVDPV 1" = "dark blue" ) @@ -87,4 +97,5 @@ test_that("testing f.color.schemes() work", { "<5 samples" = "black" ) expect_equal(f.color.schemes("es"), es, info = "did not match color scheme") + expect_identical(f.color.schemes("es.detections")[["VDPV3"]], "#00A6A6") }) From 6d59b7277ba8f27e8bb91669ce1d88754587d974 Mon Sep 17 00:00:00 2001 From: Andrea Stewart <55840298+als329@users.noreply.github.com> Date: Mon, 10 Aug 2026 11:58:26 -0400 Subject: [PATCH 2/5] Update f.color.schemes.R removing redundancy that was limited to type 3 viruses, updating colors for types 1 and 2 to be consistent across schemes. --- R/f.color.schemes.R | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/R/f.color.schemes.R b/R/f.color.schemes.R index 442541c6..4bf298bc 100644 --- a/R/f.color.schemes.R +++ b/R/f.color.schemes.R @@ -58,9 +58,7 @@ f.color.schemes <- function(type) { "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", "cVDPV 3" = "#08519C", - "cVDPV3" = "#08519C", "VDPV 3" = "#00A6A6", - "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00", @@ -75,9 +73,7 @@ f.color.schemes <- function(type) { "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", "cVDPV 3" = "#08519C", - "cVDPV3" = "#08519C", "VDPV 3" = "#00A6A6", - "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00" @@ -125,12 +121,12 @@ f.color.schemes <- function(type) { c( "COMPATIBLE" = "black", "WILD 1" = "red", - "cVDPV 2" = "dark green", - "VDPV 2" = "light green", + "cVDPV 2" = "#4daf4a", + "VDPV 2" = "#a6d854", "cVDPV 3" = "#08519C", "VDPV 3" = "#00A6A6", - "VDPV 1" = "light blue", - "cVDPV 1" = "dark blue" + "cVDPV 1" = "#377eb8", + "VDPV 1" = "#80b1d3", ), "es" = c( From fa9ab156f6be2acb1e5003db71dbe85b809daeef Mon Sep 17 00:00:00 2001 From: Andrea Stewart <55840298+als329@users.noreply.github.com> Date: Mon, 10 Aug 2026 12:10:55 -0400 Subject: [PATCH 3/5] Update test-f.color.schemes.R also need to update the test file so it passes the checks. we are learning :) --- tests/testthat/test-f.color.schemes.R | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/testthat/test-f.color.schemes.R b/tests/testthat/test-f.color.schemes.R index 1bd02297..9eec4546 100644 --- a/tests/testthat/test-f.color.schemes.R +++ b/tests/testthat/test-f.color.schemes.R @@ -9,9 +9,7 @@ test_that("testing f.color.schemes() work", { "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", "cVDPV 3" = "#08519C", - "cVDPV3" = "#08519C", "VDPV 3" = "#00A6A6", - "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00", @@ -27,9 +25,7 @@ test_that("testing f.color.schemes() work", { "cVDPV 2" = "#4daf4a", "VDPV 2" = "#a6d854", "cVDPV 3" = "#08519C", - "cVDPV3" = "#08519C", "VDPV 3" = "#00A6A6", - "VDPV3" = "#00A6A6", "cVDPV 1" = "#377eb8", "VDPV 1" = "#80b1d3", "COMPATIBLE" = "#ff7f00" @@ -81,12 +77,12 @@ test_that("testing f.color.schemes() work", { cases <- c( "COMPATIBLE" = "black", "WILD 1" = "red", - "cVDPV 2" = "dark green", - "VDPV 2" = "light green", + "cVDPV 2" = "#4daf4a", + "VDPV 2" = "#a6d854", "cVDPV 3" = "#08519C", "VDPV 3" = "#00A6A6", - "VDPV 1" = "light blue", - "cVDPV 1" = "dark blue" + "cVDPV 1" = "#377eb8", + "VDPV 1" = "#80b1d3", ) expect_equal(f.color.schemes("cases"), cases, info = "did not match color scheme") @@ -97,5 +93,4 @@ test_that("testing f.color.schemes() work", { "<5 samples" = "black" ) expect_equal(f.color.schemes("es"), es, info = "did not match color scheme") - expect_identical(f.color.schemes("es.detections")[["VDPV3"]], "#00A6A6") }) From 79d33e452153077d0cfeb49cb47e81c4439c9965 Mon Sep 17 00:00:00 2001 From: Andrea Stewart <55840298+als329@users.noreply.github.com> Date: Mon, 10 Aug 2026 12:20:44 -0400 Subject: [PATCH 4/5] Update test-f.color.schemes.R removing a hanging comma (: --- tests/testthat/test-f.color.schemes.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-f.color.schemes.R b/tests/testthat/test-f.color.schemes.R index 9eec4546..b12b4801 100644 --- a/tests/testthat/test-f.color.schemes.R +++ b/tests/testthat/test-f.color.schemes.R @@ -82,7 +82,7 @@ test_that("testing f.color.schemes() work", { "cVDPV 3" = "#08519C", "VDPV 3" = "#00A6A6", "cVDPV 1" = "#377eb8", - "VDPV 1" = "#80b1d3", + "VDPV 1" = "#80b1d3" ) expect_equal(f.color.schemes("cases"), cases, info = "did not match color scheme") From 424b38e7bd53f00b2f5ea283bd987e1375a02683 Mon Sep 17 00:00:00 2001 From: Andrea Stewart <55840298+als329@users.noreply.github.com> Date: Mon, 10 Aug 2026 12:33:33 -0400 Subject: [PATCH 5/5] Update f.color.schemes.R one more time --- R/f.color.schemes.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/f.color.schemes.R b/R/f.color.schemes.R index 4bf298bc..8bd30175 100644 --- a/R/f.color.schemes.R +++ b/R/f.color.schemes.R @@ -126,7 +126,7 @@ f.color.schemes <- function(type) { "cVDPV 3" = "#08519C", "VDPV 3" = "#00A6A6", "cVDPV 1" = "#377eb8", - "VDPV 1" = "#80b1d3", + "VDPV 1" = "#80b1d3" ), "es" = c(