Skip to content

Commit

Permalink
Merge pull request #370 from cole-trapnell-lab/news_red_dim_mods
Browse files Browse the repository at this point in the history
prepare for version 0.2.2.0 and fix typos
  • Loading branch information
brgew authored Jun 10, 2020
2 parents ebb9759 + 0a772b6 commit 161c121
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 31 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: monocle3
Title: Clustering, differential expression, and trajectory analysis for single-
cell RNA-Seq
Version: 0.2.1.9
Version: 0.2.2
Authors@R:
person(given = "Hannah",
family = "Pliner",
Expand Down
21 changes: 21 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# monocle3 0.2.2

### Changes
* Added load_mm_data() to load data from matrix market sparse file and gene and cell data files.
* Added rann.k parameter to learn_graph().
* Added speedglm.maxiter parameter to top_marker().

### Bug fixes
* Fixed combine_cds() issues.
* Fixed learn_graph(use_partition=FALSE) issue
* Fixed batchelor::fastMNN(pc.input) deprecation issue
* Fixed choose_graph_segments() issue.
* Fixed missing gaussian family in fit_models().
* Fixed add pseudocount to violin plot.
* Fixed add detect_genes() to fit_models() if needed.
* Fixed compare_models() issues.
* Fixed check for undefined values in fit_models() formula.
* Fixed plot_cells() plotting order issue.
* Fixed find_gene_modules() run-to-run variation issue.
* Fixed rlist package namespace collision.
* Fixed allow short gene names in aggregate_gene_expression(gene_group_df).

# monocle3 0.2.0

Expand Down
2 changes: 1 addition & 1 deletion R/cluster_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ cluster_cells <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste("No dimensionality reduction for",
reduction_method, "calculated.",
"Please run reduce_dimensions with",
"Please run reduce_dimension with",
"reduction_method =", reduction_method,
"before running cluster_cells"))

Expand Down
2 changes: 1 addition & 1 deletion R/cluster_genes.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ find_gene_modules <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste("No dimensionality reduction for",
reduction_method, "calculated.",
"Please run reduce_dimensions with",
"Please run reduce_dimension with",
"reduction_method =", reduction_method,
"before running cluster_cells"))

Expand Down
4 changes: 2 additions & 2 deletions R/learn_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' technical factors) to "subtract" from the data so it doesn't contribute to
#' the trajectory. The function \code{learn_graph} is the fourth step in the
#' trajectory building process after \code{preprocess_cds},
#' \code{reduce_dimensions}, and \code{cluster_cells}. After
#' \code{reduce_dimension}, and \code{cluster_cells}. After
#' \code{learn_graph}, \code{order_cells} is typically called.
#'
#' @section Optional \code{learn_graph_control} parameters:
Expand Down Expand Up @@ -139,7 +139,7 @@ learn_graph <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste("No dimensionality reduction for",
reduction_method, "calculated.",
"Please run reduce_dimensions with",
"Please run reduce_dimension with",
"reduction_method =", reduction_method,
"and cluster_cells before running",
"learn_graph."))
Expand Down
2 changes: 1 addition & 1 deletion R/order_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ order_cells <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste0("No dimensionality reduction for ",
reduction_method, " calculated. ",
"Please run reduce_dimensions with ",
"Please run reduce_dimension with ",
"reduction_method = ", reduction_method,
", cluster_cells, and learn_graph ",
"before running order_cells."))
Expand Down
4 changes: 2 additions & 2 deletions R/plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ plot_cells_3d <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste("No dimensionality reduction for",
reduction_method, "calculated.",
"Please run reduce_dimensions with",
"Please run reduce_dimension with",
"reduction_method =", reduction_method,
"before attempting to plot."))
low_dim_coords <- reducedDims(cds)[[reduction_method]]
Expand Down Expand Up @@ -410,7 +410,7 @@ plot_cells <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste("No dimensionality reduction for",
reduction_method, "calculated.",
"Please run reduce_dimensions with",
"Please run reduce_dimension with",
"reduction_method =", reduction_method,
"before attempting to plot."))
low_dim_coords <- reducedDims(cds)[[reduction_method]]
Expand Down
4 changes: 2 additions & 2 deletions R/reduce_dimensions.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#' genes typically co-vary with one another, and so the dimensionality of the
#' data can be reduced with a wide variety of different algorithms. Monocle3
#' provides two different algorithms for dimensionality reduction via
#' \code{reduce_dimensions} (UMAP and tSNE). The function
#' \code{reduce_dimensions} is the second step in the trajectory building
#' \code{reduce_dimension} (UMAP and tSNE). The function
#' \code{reduce_dimension} is the second step in the trajectory building
#' process after \code{preprocess_cds}.
#'
#' UMAP is implemented from the package uwot.
Expand Down
4 changes: 2 additions & 2 deletions R/select_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ choose_cells <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste0("No dimensionality reduction for ",
reduction_method, " calculated. ",
"Please run reduce_dimensions with ",
"Please run reduce_dimension with ",
"reduction_method = ", reduction_method,
", cluster_cells, and learn_graph ",
"before running choose_cells"))
Expand Down Expand Up @@ -148,7 +148,7 @@ choose_graph_segments <- function(cds,
assertthat::assert_that(!is.null(reducedDims(cds)[[reduction_method]]),
msg = paste0("No dimensionality reduction for ",
reduction_method, " calculated. ",
"Please run reduce_dimensions with ",
"Please run reduce_dimension with ",
"reduction_method = ", reduction_method,
", cluster_cells, and learn_graph ",
"before running choose_graph_segments."))
Expand Down
2 changes: 1 addition & 1 deletion man/learn_graph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reduce_dimension.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions tests/testthat/test-cluster_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ test_that("test cluster_cells error messages work", {
skip_on_travis()
expect_error(cds <- cluster_cells(cds),
paste("No dimensionality reduction for UMAP calculated. Please",
"run reduce_dimensions with reduction_method = UMAP",
"run reduce_dimension with reduction_method = UMAP",
"before running cluster_cells"))
cds <- preprocess_cds(cds)
expect_error(cds <- cluster_cells(cds),
paste("No dimensionality reduction for UMAP calculated. Please",
"run reduce_dimensions with reduction_method = UMAP",
"run reduce_dimension with reduction_method = UMAP",
"before running cluster_cells"))
cds <- reduce_dimension(cds)
expect_error(cds <- cluster_cells(cds, reduction_method = "tSNE"),
paste("No dimensionality reduction for tSNE calculated. Please",
"run reduce_dimensions with reduction_method = tSNE",
"run reduce_dimension with reduction_method = tSNE",
"before running cluster_cells"))
})

Expand Down Expand Up @@ -194,17 +194,17 @@ test_that("test cluster_cells error messages work", {
skip_not_travis()
expect_error(cds <- cluster_cells(cds),
paste("No dimensionality reduction for UMAP calculated. Please",
"run reduce_dimensions with reduction_method = UMAP",
"run reduce_dimension with reduction_method = UMAP",
"before running cluster_cells"))
cds <- preprocess_cds(cds)
expect_error(cds <- cluster_cells(cds),
paste("No dimensionality reduction for UMAP calculated. Please",
"run reduce_dimensions with reduction_method = UMAP",
"run reduce_dimension with reduction_method = UMAP",
"before running cluster_cells"))
cds <- reduce_dimension(cds)
expect_error(cds <- cluster_cells(cds, reduction_method = "tSNE"),
paste("No dimensionality reduction for tSNE calculated. Please",
"run reduce_dimensions with reduction_method = tSNE",
"run reduce_dimension with reduction_method = tSNE",
"before running cluster_cells"))
})

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-graph_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ cds <- learn_graph(cds, learn_graph_control=list(ncenter=1000), close_loop=TRUE)

# test_that("test graph_test error messages work", {
# expect_error(cds <- graph_test(cds),
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and partition_cells before running learn_graph.")
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and partition_cells before running learn_graph.")
# cds <- preprocess_cds(cds)
# expect_error(cds <- graph_test(cds),
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and partition_cells before running learn_graph.")
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and partition_cells before running learn_graph.")
# cds <- reduce_dimension(cds)
# expect_error(cds <- graph_test(cds),
# "No cell partition for UMAP calculated. Please run partition_cells with reduction_method = UMAP before running learn_graph.")
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-learn_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ cds <- load_a549()
test_that("test learn_graph error messages work", {
skip_on_travis()
expect_error(cds <- learn_graph(cds),
"No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and cluster_cells before running learn_graph.")
"No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and cluster_cells before running learn_graph.")
cds <- preprocess_cds(cds)
expect_error(cds <- learn_graph(cds),
"No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and cluster_cells before running learn_graph.")
"No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and cluster_cells before running learn_graph.")
cds <- reduce_dimension(cds)
expect_error(cds <- learn_graph(cds),
"No cell clusters for UMAP calculated. Please run cluster_cells with reduction_method = UMAP before running learn_graph.")
Expand Down Expand Up @@ -67,10 +67,10 @@ cds <- load_a549()
test_that("test learn_graph error messages work", {
skip_not_travis()
expect_error(cds <- learn_graph(cds),
"No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and cluster_cells before running learn_graph.")
"No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and cluster_cells before running learn_graph.")
cds <- preprocess_cds(cds)
expect_error(cds <- learn_graph(cds),
"No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and cluster_cells before running learn_graph.")
"No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and cluster_cells before running learn_graph.")
cds <- reduce_dimension(cds)
expect_error(cds <- learn_graph(cds),
"No cell clusters for UMAP calculated. Please run cluster_cells with reduction_method = UMAP before running learn_graph.")
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-order_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cds <- load_a549()
set.seed(100)
test_that("order_cells error messages work", {
skip_on_travis()
expect_error(order_cells(cds), "No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP, cluster_cells, and learn_graph before running order_cells." )
expect_error(order_cells(cds), "No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP, cluster_cells, and learn_graph before running order_cells." )
cds <- estimate_size_factors(cds)
cds <- preprocess_cds(cds, num_dim = 20)
cds <- reduce_dimension(cds)
Expand Down Expand Up @@ -136,7 +136,7 @@ cds <- load_a549()
set.seed(100)
test_that("order_cells error messages work", {
skip_not_travis()
expect_error(order_cells(cds), "No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP, cluster_cells, and learn_graph before running order_cells." )
expect_error(order_cells(cds), "No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP, cluster_cells, and learn_graph before running order_cells." )
cds <- estimate_size_factors(cds)
cds <- preprocess_cds(cds, num_dim = 20)
cds <- reduce_dimension(cds)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-subset_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#
# test_that("test subset_along_path error messages work", {
# expect_error(cds <- subset_along_path(cds),
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and partition_cells before running learn_graph.")
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and partition_cells before running learn_graph.")
# cds <- preprocess_cds(cds)
# expect_error(cds <- subset_along_path(cds),
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimensions with reduction_method = UMAP and partition_cells before running learn_graph.")
# "No dimensionality reduction for UMAP calculated. Please run reduce_dimension with reduction_method = UMAP and partition_cells before running learn_graph.")
# cds <- reduce_dimension(cds)
# expect_error(cds <- subset_along_path(cds),
# "No cell partition for UMAP calculated. Please run partition_cells with reduction_method = UMAP before running learn_graph.")
Expand Down

0 comments on commit 161c121

Please sign in to comment.