From 1f4a6ce556f8f28e3466b5ba9a481e655a28c32f Mon Sep 17 00:00:00 2001 From: George Chen <72078254+jiajic@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:31:52 -0400 Subject: [PATCH] chore: update expression accessor usage `get_expression_values()` -> `getExpression()` --- R/NN_network.R | 2 +- R/aggregate.R | 2 +- R/interoperability.R | 12 ++++++------ R/join.R | 2 +- R/slot_accessors.R | 4 ++-- R/slot_check.R | 2 +- R/slot_show.R | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/R/NN_network.R b/R/NN_network.R index d14b4607..66cc7cdc 100644 --- a/R/NN_network.R +++ b/R/NN_network.R @@ -704,7 +704,7 @@ createNearestNetwork <- function( expression_values )) ) - expr_obj <- get_expression_values( + expr_obj <- getExpression( gobject = gobject, feat_type = feat_type, spat_unit = spat_unit, diff --git a/R/aggregate.R b/R/aggregate.R index 4b3f7fa2..e30e1ef7 100644 --- a/R/aggregate.R +++ b/R/aggregate.R @@ -1900,7 +1900,7 @@ aggregateStacksExpression <- function(gobject, # aggregate matrices matrix_list <- list() for (spat_unit in spat_units) { - mat <- get_expression_values(gobject, + mat <- getExpression(gobject, spat_unit = spat_unit, feat_type = feat_type, values = values, diff --git a/R/interoperability.R b/R/interoperability.R index 302d1342..30edf4bb 100644 --- a/R/interoperability.R +++ b/R/interoperability.R @@ -691,7 +691,7 @@ giottoToAnnData <- function( for (en in expr_names) { if (en == "raw") { - raw_x <- get_expression_values( + raw_x <- getExpression( gobject = gobject, values = en, spat_unit = su, @@ -703,7 +703,7 @@ giottoToAnnData <- function( } else { ad_layer_name <- paste0(su, "_", ft, "_", en) - x <- get_expression_values( + x <- getExpression( gobject = gobject, values = en, spat_unit = su, @@ -1222,7 +1222,7 @@ giottoToSeuratV4 <- function( expr_use <- lapply( avail_expr[feat_type == assay_use, name], function(x) { - get_expression_values( + getExpression( gobject = gobject, spat_unit = spat_unit, feat_type = assay_use, @@ -1503,7 +1503,7 @@ giottoToSeuratV5 <- function( expr_use <- lapply( avail_expr[feat_type == assay_use, name], function(x) { - get_expression_values( + getExpression( gobject = gobject, spat_unit = spat_unit, feat_type = assay_use, @@ -2613,7 +2613,7 @@ giottoToSpatialExperiment <- function(giottoObj, verbose = TRUE) { "' for spatial unit: '", spatialUnits[su], "'" ) } - exprMat <- get_expression_values( + exprMat <- getExpression( gobject = giottoObj, spat_unit = spatialUnits[su], feat_type = giottoExpr[1]$feat_type, @@ -2657,7 +2657,7 @@ giottoToSpatialExperiment <- function(giottoObj, verbose = TRUE) { spatialUnits[su] ), withDimnames = FALSE - ) <- get_expression_values( + ) <- getExpression( gobject = giottoObj, spat_unit = spatialUnits[su], feat_type = giottoExpr[i]$feat_type, diff --git a/R/join.R b/R/join.R index 5d3e886a..dbac99dd 100644 --- a/R/join.R +++ b/R/join.R @@ -647,7 +647,7 @@ joinGiottoObjects <- function(gobject_list, } else { for (exprObj_i in seq(nrow(avail_expr))) { expr_list <- lapply(updated_object_list, function(gobj) { - get_expression_values( + getExpression( gobject = gobj, spat_unit = avail_expr$spat_unit[[exprObj_i]], feat_type = avail_expr$feat_type[[exprObj_i]], diff --git a/R/slot_accessors.R b/R/slot_accessors.R index 597df24a..ec793e8c 100644 --- a/R/slot_accessors.R +++ b/R/slot_accessors.R @@ -284,7 +284,7 @@ set_cell_id <- function(gobject, # get cell ID values if (spat_unit %in% expr_avail$spat_unit) { # preferred from expression - cell_IDs <- spatIDs(get_expression_values( + cell_IDs <- spatIDs(getExpression( gobject = gobject, spat_unit = spat_unit, feat_type = expr_avail$feat_type[[1L]], @@ -424,7 +424,7 @@ set_feat_id <- function(gobject, if (feat_type %in% expr_avail$feat_type) { # preferred from expression - feat_IDs <- featIDs(get_expression_values( + feat_IDs <- featIDs(getExpression( gobject = gobject, spat_unit = expr_avail$spat_unit[[1L]], feat_type = feat_type, diff --git a/R/slot_check.R b/R/slot_check.R index 1d94879d..7bd01032 100644 --- a/R/slot_check.R +++ b/R/slot_check.R @@ -178,7 +178,7 @@ } if (!nrow(avail_ex[spat_unit == su_i & feat_type == ft_i]) == 0L) { - IDs <- featIDs(get_expression_values( + IDs <- featIDs(getExpression( gobject = gobject, spat_unit = su_i, feat_type = ft_i, diff --git a/R/slot_show.R b/R/slot_show.R index d34e82ac..3f223a36 100644 --- a/R/slot_show.R +++ b/R/slot_show.R @@ -33,7 +33,7 @@ showGiottoExpression <- function(gobject, nrows = 4, ncols = 4) { objPrints <- list() for (obj_i in seq(nrow(available_data))) { # get object - dataObj <- get_expression_values( + dataObj <- getExpression( gobject = gobject, values = available_data$name[[obj_i]], spat_unit = available_data$spat_unit[[obj_i]],