Skip to content

Commit

Permalink
Update pbmc_small to latest v3 standards
Browse files Browse the repository at this point in the history
  • Loading branch information
mojaveazure committed Apr 15, 2019
1 parent f96309a commit 209717b
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ HTOHeatmap <- function(
#' @export
#'
#' @examples
#' RidgePlot(object = pbmc_small, features = 'PC1')
#' RidgePlot(object = pbmc_small, features = 'PC_1')
#'
RidgePlot <- function(
object,
Expand Down Expand Up @@ -473,7 +473,7 @@ RidgePlot <- function(
#' @seealso \code{\link{FetchData}}
#'
#' @examples
#' VlnPlot(object = pbmc_small, features = 'PC1')
#' VlnPlot(object = pbmc_small, features = 'PC_1')
#' VlnPlot(object = pbmc_small, features = 'LYZ', split.by = 'groups')
#'
VlnPlot <- function(
Expand Down Expand Up @@ -694,7 +694,7 @@ DimPlot <- function(
#' \item An \code{Assay} feature (e.g. a gene name - "MS4A1")
#' \item A column name from meta.data (e.g. mitochondrial percentage - "percent.mito")
#' \item A column name from a \code{DimReduc} object corresponding to the cell embedding values
#' (e.g. the PC1 scores - "PC_1")
#' (e.g. the PC 1 scores - "PC_1")
#' }
#' @param cols The two colors to form the gradient over. Provide as string vector with
#' the first color corresponding to low values, the second to high. Also accepts a Brewer
Expand Down Expand Up @@ -730,7 +730,7 @@ DimPlot <- function(
#' \code{\link{CellSelector}}
#'
#' @examples
#' FeaturePlot(object = pbmc_small, features = 'PC1')
#' FeaturePlot(object = pbmc_small, features = 'PC_1')
#'
FeaturePlot <- function(
object,
Expand Down
Binary file modified data/pbmc_small.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions man/FeaturePlot.Rd

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

2 changes: 1 addition & 1 deletion man/FetchData.Rd

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

2 changes: 1 addition & 1 deletion man/OldWhichCells.Rd

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

2 changes: 1 addition & 1 deletion man/PolyFeaturePlot.Rd

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

2 changes: 1 addition & 1 deletion man/RidgePlot.Rd

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

2 changes: 1 addition & 1 deletion man/SubsetData.Rd

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

2 changes: 1 addition & 1 deletion man/VlnPlot.Rd

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

8 changes: 4 additions & 4 deletions tests/testthat/test_objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ Key(pbmc_small[["RNA2"]]) <- "rna2_"
test_that("Fetching keyed variables works", {
x <- FetchData(object = pbmc_small, vars = c(paste0("rna_", rownames(x = pbmc_small)[1:5]), paste0("rna2_", rownames(x = pbmc_small)[1:5])))
expect_equal(colnames(x = x), c(paste0("rna_", rownames(x = pbmc_small)[1:5]), paste0("rna2_", rownames(x = pbmc_small)[1:5])))
x <- FetchData(object = pbmc_small, vars = c(paste0("rna_", rownames(x = pbmc_small)[1:5]), paste0("PC", 1:5)))
expect_equal(colnames(x = x), c(paste0("rna_", rownames(x = pbmc_small)[1:5]), paste0("PC", 1:5)))
x <- FetchData(object = pbmc_small, vars = c(paste0("rna_", rownames(x = pbmc_small)[1:5]), paste0("PC_", 1:5)))
expect_equal(colnames(x = x), c(paste0("rna_", rownames(x = pbmc_small)[1:5]), paste0("PC_", 1:5)))
})

test_that("Fetching embeddings/loadings not present returns warning or errors", {
expect_warning(FetchData(object = pbmc_small, vars = c("PC1", "PC100")))
expect_error(FetchData(object = pbmc_small, vars = "PC100"))
expect_warning(FetchData(object = pbmc_small, vars = c("PC_1", "PC_100")))
expect_error(FetchData(object = pbmc_small, vars = "PC_100"))
})

bad.gene <- GetAssayData(object = pbmc_small[["RNA"]], slot = "data")
Expand Down

0 comments on commit 209717b

Please sign in to comment.