Skip to content

Commit

Permalink
update test-Metadata_Table.R
Browse files Browse the repository at this point in the history
  • Loading branch information
ammichalowski committed Dec 10, 2022
1 parent cce3673 commit 4257cc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/Metadata_Table.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#'
#' # Return dimensional reductions
#' metadata <- MetadataTable(SO = seurat.object, return.cell.embeddings = TRUE)
#' umap_coordinates <- metadata %>% dplyr::select(Barcode, seurat_clusters, contains("UMAP"))
#' umap.coordinates <- metadata %>% dplyr::select(Barcode, seurat_clusters, contains("UMAP"))
#'
#' ## Plot
#' library(ggplot2)
#' ggplot(umap_coordinates, aes(x = UMAP_1, y = UMAP_2, colour = seurat_clusters)) +
#' ggplot(umap.coordinates, aes(x = UMAP_1, y = UMAP_2, colour = seurat_clusters)) +
#' geom_point(size = 0.1) + theme_bw()
#' }
#'
Expand Down
9 changes: 7 additions & 2 deletions tests/testthat/test-Metadata_Table.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# load data
seurat.object <-readRDS(test_path("fixtures", "SO_moduleScore.rds"))


# run tests
test_that("reductions are returned", {

# load data
seurat.object <-readRDS(test_path("fixtures", "SO_moduleScore.rds"))

metadata <-
MetadataTable(SO = seurat.object,
return.cell.embeddings = TRUE)
Expand All @@ -16,6 +18,9 @@ test_that("reductions are returned", {

test_that("function returns correct class", {

# load data
seurat.object <-readRDS(test_path("fixtures", "SO_moduleScore.rds"))

metadata <-
MetadataTable(SO = seurat.object,
return.cell.embeddings = TRUE)
Expand Down

0 comments on commit 4257cc6

Please sign in to comment.