From ef2176019c5057a9ca2631c363cf509edd5eb63f Mon Sep 17 00:00:00 2001 From: Luke Zappia <lazappi@users.noreply.github.com> Date: Tue, 4 Jun 2019 15:02:47 +1000 Subject: [PATCH] Set gam method for fitted lines in comp plots --- R/compare.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/R/compare.R b/R/compare.R index cad0a77..3f3c618 100644 --- a/R/compare.R +++ b/R/compare.R @@ -173,8 +173,10 @@ compareSCEs <- function(sces, point.size = 0.1, point.alpha = 0.1, theme_minimal() if (fits) { - mean.var <- mean.var + geom_smooth() - mean.zeros <- mean.zeros + geom_smooth() + mean.var <- mean.var + geom_smooth(method = "gam", + formula = y ~ s(x, bs = "cs")) + mean.zeros <- mean.zeros + geom_smooth(method = "gam", + formula = y ~ s(x, bs = "cs")) } comparison <- list(RowData = features, @@ -504,8 +506,10 @@ diffSCEs <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, theme_minimal() if (fits) { - mean.var <- mean.var + geom_smooth() - mean.zeros <- mean.zeros + geom_smooth() + mean.var <- mean.var + geom_smooth(method = "gam", + formula = y ~ s(x, bs = "cs")) + mean.zeros <- mean.zeros + geom_smooth(method = "gam", + formula = y ~ s(x, bs = "cs")) } comparison <- list(Reference = ref.sce, -- GitLab