Skip to content

Commit

Permalink
Make get_mean_ratio2 an internal function
Browse files Browse the repository at this point in the history
  • Loading branch information
lahuuki committed Aug 6, 2024
1 parent bc5634c commit ae6ff2e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Generated by roxygen2: do not edit by hand

export(.get_mean_ratio2)
export(create_cell_colors)
export(fetch_deconvo_data)
export(findMarkers_1vAll)
export(get_mean_ratio)
export(get_mean_ratio2)
export(make_test_sce)
export(plot_composition_bar)
export(plot_gene_express)
Expand Down
5 changes: 3 additions & 2 deletions R/get_mean_ratio2.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' if (!exists("sce_DLPFC_example")) sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")
#'
#' ## Get the mean ratio for each gene for each cell type defined in `cellType_broad_hc`
#' get_mean_ratio2(sce_DLPFC_example, cellType_col = "cellType_broad_hc")
#' .get_mean_ratio2(sce_DLPFC_example, cellType_col = "cellType_broad_hc")
#'
#' # gene cellType.target mean.target cellType mean ratio rank_ratio anno_ratio
#' #<chr> <fct> <dbl> <fct> <dbl> <dbl> <int> <chr>
Expand All @@ -39,7 +39,8 @@
#' @importFrom purrr map
#' @importFrom purrr map2
#' @importFrom matrixStats rowMedians
get_mean_ratio2 <- function(sce, cellType_col = "cellType", assay_name = "logcounts", add_symbol = TRUE) {
#' @keywords internal
.get_mean_ratio2 <- function(sce, cellType_col = "cellType", assay_name = "logcounts", add_symbol = TRUE) {
# RCMD fix
cellType.target <- NULL
cellType <- NULL
Expand Down
9 changes: 5 additions & 4 deletions man/get_mean_ratio2.Rd → man/dot-get_mean_ratio2.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-get_mean_ratio2.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (!exists("sce_DLPFC_example")) sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")

mrt <- get_mean_ratio(sce_DLPFC_example, cellType_col = "cellType_broad_hc")
mrt2 <- get_mean_ratio2(sce_DLPFC_example, assay_name = "logcounts", cellType_col = "cellType_broad_hc", add_symbol = TRUE)
mrt2 <- .get_mean_ratio2(sce_DLPFC_example, assay_name = "logcounts", cellType_col = "cellType_broad_hc", add_symbol = TRUE)

test_that("Correct Dims", {
expect_equal(nrow(mrt2), nrow(mrt))
Expand Down

0 comments on commit ae6ff2e

Please sign in to comment.