diff --git a/DESCRIPTION b/DESCRIPTION
index 309dae38..504c0cbf 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -29,6 +29,7 @@ Imports:
reshape2,
rjson,
rlang,
+ Russ,
S4Vectors,
SeuratObject,
SingleCellExperiment,
diff --git a/R/clonalBias.R b/R/clonalBias.R
index 00aca5cd..af33142c 100644
--- a/R/clonalBias.R
+++ b/R/clonalBias.R
@@ -42,6 +42,7 @@
#' @param exportTable Returns the data frame used for forming the graph.
#' @param palette Colors to use in visualization - input any \link[grDevices]{hcl.pals}.
#' @import ggplot2
+#' @importClassesFrom quantreg rqss
#' @importFrom stringr str_sort
#' @export
#' @concept SC_Functions
diff --git a/tests/testthat/_snaps/clonalBias/clonalbias-plot.svg b/tests/testthat/_snaps/clonalBias/clonalbias-plot.svg
index 5bea828a..9d7c6221 100644
--- a/tests/testthat/_snaps/clonalBias/clonalbias-plot.svg
+++ b/tests/testthat/_snaps/clonalBias/clonalbias-plot.svg
@@ -21,25 +21,25 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,33 +51,15 @@
-
-
-
-
-3
-6
-9
-Clonal Size
+
+
+
+
+3
+6
+9
+Clonal Size
Clonal Bias
-
-Group
-
-
-
-
-
-3
-4
-5
-9
-13
-
-cloneSize
-
-
-Hyperexpanded (0.1 < X <= 1)
-Large (0.01 < X <= 0.1)
clonalBias_plot
diff --git a/tests/testthat/_snaps/clonalOverlay/clonaloverlay-plot.svg b/tests/testthat/_snaps/clonalOverlay/clonaloverlay-plot.svg
index f7cb4e13..003cf42d 100644
--- a/tests/testthat/_snaps/clonalOverlay/clonaloverlay-plot.svg
+++ b/tests/testthat/_snaps/clonalOverlay/clonaloverlay-plot.svg
@@ -21,645 +21,645 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-P19
+
+
+P19
-
-
+
+
-
-
-P20
+
+
+P20
-
-
+
+
-
-
-P17
+
+
+P17
-
-
+
+
-
-
-P18
+
+
+P18
-
-
-
-
-
--4
-0
-4
-8
-
-
-
-
-
--4
-0
-4
-8
+
+
+
+
+
+-4
+0
+4
+8
+
+
+
+
+
+-4
+0
+4
+8
-5
0
@@ -674,44 +674,8 @@
-Dimension 1
+Dimension 1
Dimension 2
-
-Active Identity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
clonalOverlay_plot
diff --git a/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h0-p1-plot.svg b/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h0-p1-plot.svg
index f9433f2f..342246d2 100644
--- a/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h0-p1-plot.svg
+++ b/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h0-p1-plot.svg
@@ -21,18 +21,18 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -44,29 +44,17 @@
-
-
-
-
-
-0
-2000
-4000
-6000
-Number of individuals
+
+
+
+
+
+0
+2000
+4000
+6000
+Number of individuals
Species diversity
-
-
-
-Rarefaction
-Extrapolation
-
-
-
-
-
-P17B
-P17L
clonalclonalRarefaction_h0_p1_plot
diff --git a/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h1-p2-plot.svg b/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h1-p2-plot.svg
index 8fc4bd97..d9653524 100644
--- a/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h1-p2-plot.svg
+++ b/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h1-p2-plot.svg
@@ -21,18 +21,18 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -46,27 +46,15 @@
-
-
-
-
-0
-1000
-2000
-Number of individuals
+
+
+
+
+0
+1000
+2000
+Number of individuals
Sample coverage
-
-
-
-Rarefaction
-Extrapolation
-
-
-
-
-
-P18B
-P18L
clonalclonalRarefaction_h1_p2_plot
diff --git a/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h2-p3-plot.svg b/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h2-p3-plot.svg
index 2e6f838b..33091eda 100644
--- a/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h2-p3-plot.svg
+++ b/tests/testthat/_snaps/clonalRarefaction/clonalclonalrarefaction-h2-p3-plot.svg
@@ -21,18 +21,18 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -44,29 +44,17 @@
-
-
-
-
-
-0.0
-0.2
-0.4
-0.6
-Sample coverage
+
+
+
+
+
+0.0
+0.2
+0.4
+0.6
+Sample coverage
Species diversity
-
-
-
-Rarefaction
-Extrapolation
-
-
-
-
-
-P19B
-P19L
clonalclonalRarefaction_h2_p3_plot
diff --git a/tests/testthat/test-StartractDiversity.R b/tests/testthat/test-StartractDiversity.R
index b42673a0..208ad13f 100644
--- a/tests/testthat/test-StartractDiversity.R
+++ b/tests/testthat/test-StartractDiversity.R
@@ -7,12 +7,11 @@ test_that("StartracDiversity works", {
test_obj$Patient <- substr(test_obj$orig.ident,1,3)
test_obj$Type <- substr(test_obj$orig.ident,4,4)
- #Ridiculous ggplot warning system can't suppress any internal warnings about NAs
expect_doppelganger(
"StartracDiversity_plot",
- suppressWarnings(print(StartracDiversity(test_obj,
- type = "Type",
- group.by = "Patient")))
+ StartracDiversity(test_obj,
+ type = "Type",
+ group.by = "Patient")
)
expect_equal(
@@ -21,6 +20,6 @@ test_that("StartracDiversity works", {
group.by = "Patient",
exportTable = TRUE),
getdata("seuratFunctions", "StartracDiversity_exportTable"),
- tolerance = 1e-6
+ tolerance = 1e-4
)
})
diff --git a/tests/testthat/test-clonalBias.R b/tests/testthat/test-clonalBias.R
index 5be4efc4..27d734cc 100644
--- a/tests/testthat/test-clonalBias.R
+++ b/tests/testthat/test-clonalBias.R
@@ -15,7 +15,8 @@ test_that("clonalBias works", {
split.by = "Patient",
group.by = "seurat_clusters",
n.boots = 1,
- min.expand = 2)
+ min.expand = 2) +
+ guides(fill = "none", size = "none")
)
set.seed(42)
expect_equal(
diff --git a/tests/testthat/test-clonalOverlay.R b/tests/testthat/test-clonalOverlay.R
index f04f998f..b341a7e4 100644
--- a/tests/testthat/test-clonalOverlay.R
+++ b/tests/testthat/test-clonalOverlay.R
@@ -13,7 +13,8 @@ test_that("clonalOverlay works", {
reduction = "umap",
freq.cutpoint = 1,
bins = 10,
- facet.by = "Patient")
+ facet.by = "Patient") +
+ guides(color = "none")
)
})
diff --git a/tests/testthat/test-clonalRarefaction.R b/tests/testthat/test-clonalRarefaction.R
index 02fb25dc..31848ccb 100644
--- a/tests/testthat/test-clonalRarefaction.R
+++ b/tests/testthat/test-clonalRarefaction.R
@@ -11,7 +11,8 @@ test_that("clonalRarefaction works", {
clonalRarefaction(combined[1:2],
plot.type = 1,
hill.numbers = 0,
- n.boots = 1)
+ n.boots = 1) +
+ guides(color = "none", shape = "none", linetype = "none")
)
trial1 <- clonalRarefaction(combined[1:2],
@@ -30,7 +31,8 @@ test_that("clonalRarefaction works", {
clonalRarefaction(combined[3:4],
plot.type = 2,
hill.numbers = 1,
- n.boots = 1)
+ n.boots = 1) +
+ guides(color = "none", shape = "none", linetype = "none")
)
trial2 <- clonalRarefaction(combined[3:4],
@@ -49,7 +51,8 @@ test_that("clonalRarefaction works", {
clonalRarefaction(combined[5:6],
plot.type = 3,
hill.numbers = 2,
- n.boots = 1)
+ n.boots = 1) +
+ guides(color = "none", shape = "none", linetype = "none")
)
diff --git a/tests/testthat/test-clonalSizeDistribution.R b/tests/testthat/test-clonalSizeDistribution.R
index da76682d..da6b42e2 100644
--- a/tests/testthat/test-clonalSizeDistribution.R
+++ b/tests/testthat/test-clonalSizeDistribution.R
@@ -3,7 +3,7 @@
test_that("clonalSizeDistribution works", {
combined <- getCombined()
-
+ set.seed(42)
expect_doppelganger(
"clonalSizeDistribution_plot",
clonalSizeDistribution(combined,