diff --git a/DESCRIPTION b/DESCRIPTION index 1bc88388b9cc8af574a8901503c954276d0b1aa8..60ea856fc6ebae2b79300e144cb6918d69c2408b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: splatter Type: Package Title: Simple Simulation of Single-cell RNA Sequencing Data -Version: 1.0.0 -Date: 2017-04-23 +Version: 1.0.1 +Date: 2017-04-28 Author: Luke Zappia Authors@R: c(person("Luke", "Zappia", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index dd555cb84324f931ed635f485d5edae3668a6eef..83e091a7bacd5c5b207e74dd37f2e08eb3a1502e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,13 @@ +# 1.0.1 + +* Fix scales in some difference plots +* Fix colours in difference plots +* Fix panel legends + +# 1.0.0 + +* Bioconductor 3.5 release + # 0.99.15 * Add summariseDiff function diff --git a/R/compare.R b/R/compare.R index c11f53af2dec964b4a7d828bb241b71a4176a002..07b09a64578db28796d8f06462aeef0f80085ded 100644 --- a/R/compare.R +++ b/R/compare.R @@ -271,6 +271,8 @@ diffSCESets <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, if (!(ref %in% names(sces))) { stop("'ref' must be the name of an SCESet in 'sces'") + } else { + ref.idx <- which(names(sces) == ref) } if (!is.null(colours)) { @@ -278,6 +280,7 @@ diffSCESets <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, len = length(sces) - 1) } else { colours <- scales::hue_pal()(length(sces)) + colours <- colours[-ref.idx] } ref.dim <- dim(sces[[ref]]) @@ -400,7 +403,6 @@ diffSCESets <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, colour = "Dataset")) + geom_hline(yintercept = 0, colour = "red") + geom_boxplot() + - scale_y_continuous(limits = c(0, 100)) + scale_colour_manual(values = colours) + ylab(paste("Rank difference percentage zeros")) + ggtitle("Difference in zeros per gene") + @@ -411,7 +413,6 @@ diffSCESets <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, colour = "Dataset")) + geom_hline(yintercept = 0, colour = "red") + geom_boxplot() + - scale_y_continuous(limits = c(0, 100)) + scale_colour_manual(values = colours) + ylab(paste("Rank difference percentage zeros")) + ggtitle("Difference in zeros per cell") + @@ -559,7 +560,7 @@ makeCompPanel <- function(comp, title = "Comparison", plots[[plot]] <- plots[[plot]] + theme(axis.title.x = element_blank()) } - plots$leg <- cowplot::get_legend(plots$p1 + + plots$leg <- cowplot::get_legend(plots$p3 + theme(legend.position = "bottom")) panel <- cowplot::ggdraw() + @@ -644,7 +645,7 @@ makeDiffPanel <- function(diff, title = "Difference comparison", plots[[plot]] <- plots[[plot]] + theme(axis.title.x = element_blank()) } - plots$leg <- cowplot::get_legend(plots$p1 + + plots$leg <- cowplot::get_legend(plots$p5 + theme(legend.position = "bottom")) panel <- cowplot::ggdraw() + @@ -743,7 +744,7 @@ makeOverallPanel <- function(comp, diff, title = "Overall comparison", plots[[plot]] <- plots[[plot]] + theme(axis.title.x = element_blank()) } - plots$leg <- cowplot::get_legend(plots$p1 + + plots$leg <- cowplot::get_legend(plots$p7 + theme(legend.position = "bottom")) panel <- cowplot::ggdraw() + diff --git a/README.md b/README.md index 9f52c1d4a06edd89112669116ebd03b94cb9d30f..eb68a0acd2965ad82da78c2fef3bab1ae1f5ef8f 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,15 @@ data. Splatter provides a common interface to multiple simulations that have: * Functions for simulating counts using those parameters Splatter is built on top of [`scater`][scater] and stores simulations in -`SCESet` objects. +`SCESet` objects. Splatter also has functions for comparing simulations and real +datasets. ## Installation. ### Development version -Splatter has been accepted into the development version of [Bioconductor][bioc] -and hence requires the development version of R (>=3.4) and the development -version of Bioconductor (3.5). +Splatter has been accepted into the latest version of [Bioconductor][bioc] +and hence requires the latest version of R (>=3.4). If you have these installed Splatter can be installed from Bioconductor using `biocLite`: @@ -43,13 +43,6 @@ aren't required for core functionality). Building the vignette may sometimes fail when run from the command line, if this happens try running the install command in RStudio. -### Release version - -The last version of Splatter that is compatible with the current version of -R (3.3) is v0.99.0 which can be downloaded [here][rel33]. There are no -significant changes to functionality and this version should be fine for most -users until the next R/Bioconductor release (in approximately April 2017). - ## Getting started Once installed the best place to get started is the vignette. For most users @@ -69,4 +62,4 @@ This is a detailed document that introduces the main features of Splatter. [contrib]: https://github.com/Bioconductor/Contributions/issues/209 [bioc]: https://bioconductor.org/packages/devel/bioc/html/splatter.html [vignette]: https://bioconductor.org/packages/devel/bioc/vignettes/splatter/inst/doc/splatter.html -[rel33]: https://github.com/Oshlack/splatter/releases/tag/v0.99.0 +