Skip to content

Commit

Permalink
Merge pull request #321 from zhewa/master
Browse files Browse the repository at this point in the history
Updates to plotGridSearchPerplexityDiff and description
  • Loading branch information
zhewa authored Feb 5, 2021
2 parents 2871163 + 6b615f8 commit 717e29d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
12 changes: 9 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
Package: celda
Title: CEllular Latent Dirichlet Allocation
Version: 1.7.1
Version: 1.7.3
Authors@R: c(person("Joshua", "Campbell", email = "[email protected]",
role = c("aut", "cre")),
person("Sean", "Corbett", email = "[email protected]", role = c("aut")),
person("Yusuke", "Koga", email="[email protected]", role = c("aut")),
person("Shiyi", "Yang", email="[email protected]", role = c("aut")),
person("Eric", "Reed", email="[email protected]", role = c("aut")),
person("Zhe", "Wang", email="[email protected]", role = c("aut")))
Description: Utilizing Bayesian hierarchical models to analyze single-cell genomic data.
Depends: R (>= 3.6)
Description: Celda is a suite of Bayesian hierarchical models for
clustering single-cell RNA-sequencing (scRNA-seq) data. It is able to
perform "bi-clustering" and simultaneously cluster genes into gene modules
and cells into cell subpopulations. It also contains DecontX, a novel
Bayesian method to computationally estimate and remove RNA contamination in
individual cells without empty droplet information. A variety of scRNA-seq
data visualization functions is also included.
Depends: R (>= 4.0)
VignetteBuilder: knitr
Imports: plyr, foreach, ggplot2, RColorBrewer, grid, scales, gtable,
grDevices, graphics, matrixStats, doParallel, digest, methods,
Expand Down
20 changes: 12 additions & 8 deletions R/perplexity.R
Original file line number Diff line number Diff line change
Expand Up @@ -851,15 +851,16 @@ setMethod("plotGridSearchPerplexityDiff",
plot <- ggplot2::ggplot(dt[!is.na(perpdiffK), ],
ggplot2::aes_string(x = "K",
y = "perpdiffK")) +
ggplot2::geom_jitter(height = 0, width = 0.1,
ggplot2::geom_jitter(height = 0, width = 0.1, alpha = 0.5,
ggplot2::aes_string(color = "L")) +
ggplot2::scale_color_discrete(name = "L") +
ggplot2::geom_path(data = diffMeansByK[!is.na(meanperpdiffK), ],
ggplot2::aes_string(x = "K", y = "rollmean", group = "L",
color = "L"), size = 1) +
ggplot2::ylab("Perplexity difference compared to previous K") +
ggplot2::xlab("K") +
ggplot2::scale_x_discrete(breaks = seq(as.integer(levels(dt$K))[2],
ggplot2::scale_x_discrete(
breaks = seq(min(as.integer(levels(dt$K))),
max(as.integer(levels(dt$K))), sep)) +
ggplot2::theme_bw()
} else if (nlevels(dt$L) > 1) {
Expand All @@ -885,7 +886,7 @@ setMethod("plotGridSearchPerplexityDiff",

plot <- ggplot2::ggplot(dt[!is.na(perpdiffL), ],
ggplot2::aes_string(x = "L", y = "perpdiffL")) +
ggplot2::geom_jitter(height = 0, width = 0.1,
ggplot2::geom_jitter(height = 0, width = 0.1, alpha = 0.5,
ggplot2::aes_string(color = "K")) +
ggplot2::scale_color_discrete(name = "K") +
ggplot2::geom_path(
Expand All @@ -895,7 +896,8 @@ setMethod("plotGridSearchPerplexityDiff",
size = 1) +
ggplot2::ylab("Perplexity difference compared to previous L") +
ggplot2::xlab("L") +
ggplot2::scale_x_discrete(breaks = seq(as.integer(levels(dt$L))[2],
ggplot2::scale_x_discrete(
breaks = seq(min(as.integer(levels(dt$L))),
max(as.integer(levels(dt$L))), sep)) +
ggplot2::theme_bw()
} else {
Expand Down Expand Up @@ -945,13 +947,14 @@ setMethod("plotGridSearchPerplexityDiff",
plot <- ggplot2::ggplot(dt[!is.na(perpdiffK), ],
ggplot2::aes_string(x = "K",
y = "perpdiffK")) +
ggplot2::geom_jitter(height = 0, width = 0.1) +
ggplot2::geom_jitter(height = 0, width = 0.1, color = "grey") +
ggplot2::geom_path(data = diffMeansByK[!is.na(meanperpdiffK), ],
ggplot2::aes_string(x = "K", y = "rollmean", group = 1),
size = 1) +
ggplot2::ylab("Perplexity difference compared to previous K") +
ggplot2::xlab("K") +
ggplot2::scale_x_discrete(breaks = seq(as.integer(levels(dt$K))[2],
ggplot2::scale_x_discrete(
breaks = seq(min(as.integer(levels(dt$K))),
max(as.integer(levels(dt$K))), sep)) +
ggplot2::theme_bw()
} else {
Expand Down Expand Up @@ -1000,13 +1003,14 @@ setMethod("plotGridSearchPerplexityDiff",
plot <- ggplot2::ggplot(dt[!is.na(perpdiffL), ],
ggplot2::aes_string(x = "L",
y = "perpdiffL")) +
ggplot2::geom_jitter(height = 0, width = 0.1) +
ggplot2::geom_jitter(height = 0, width = 0.1, color = "grey") +
ggplot2::geom_path(data = diffMeansByL[!is.na(meanperpdiffL), ],
ggplot2::aes_string(x = "L", y = "rollmean", group = 1),
size = 1) +
ggplot2::ylab("Perplexity difference compared to previous L") +
ggplot2::xlab("L") +
ggplot2::scale_x_discrete(breaks = seq(as.integer(levels(dt$L))[2],
ggplot2::scale_x_discrete(
breaks = seq(min(as.integer(levels(dt$L))),
max(as.integer(levels(dt$L))), sep)) +
ggplot2::theme_bw()
} else {
Expand Down

0 comments on commit 717e29d

Please sign in to comment.