Skip to content

Commit

Permalink
Fix args
Browse files Browse the repository at this point in the history
  • Loading branch information
pinin4fjords committed Jun 24, 2024
1 parent 89b4649 commit f7c8c1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions R/accessory.R
Original file line number Diff line number Diff line change
Expand Up @@ -1299,15 +1299,15 @@ validate_indices <- function(assay_data, index_string, prettify_names = TRUE) {
#' If NULL: log2 transformation will be guessed based on input assays.
#' If empty: no log2 transformation will be applied.
#' If non-empty: log2 transformation will be applied unconditionally to specified assays.
#' @param log2_threshold A numeric threshold to determine if the matrix should be log-transformed.
#' @param threshold A numeric threshold to determine if the matrix should be log-transformed.
#' This is only checked if should_transform is NULL.
#' @param log2_reverse Boolean, should we unlog rather than log?
#' @param reverse Boolean, should we unlog rather than log?
#' @param prettify_names Boolean. Prettify element names? Passed to validate_indices().
#'
#' @return A modified assay_data list.
#' @export

cond_log2_transform_assays <- function(assay_data, log2_assays, threshold = 30, prettify_names = TRUE) {
cond_log2_transform_assays <- function(assay_data, log2_assays, threshold = 30, reverse = FALSE, prettify_names = TRUE) {

indices_to_log = c()
should_transform = FALSE
Expand All @@ -1324,7 +1324,7 @@ cond_log2_transform_assays <- function(assay_data, log2_assays, threshold = 30,

# Apply log2 transformation to any specified assays
for (index in indices_to_log) {
assay_data[[index]] <- cond_log2_transform_matrix(matrix_data = assay_data[[index]], should_transform = should_transform, threshold = log2_threshold, reverse = log2_reverse)
assay_data[[index]] <- cond_log2_transform_matrix(matrix_data = assay_data[[index]], should_transform = should_transform, threshold = threshold, reverse = reverse)
}

return(assay_data)
Expand Down
9 changes: 5 additions & 4 deletions man/cond_log2_transform_assays.Rd

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

0 comments on commit f7c8c1d

Please sign in to comment.