Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable prettifification in log check #64

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions R/accessory.R
Original file line number Diff line number Diff line change
Expand Up @@ -1293,11 +1293,12 @@ validate_indices <- function(assay_data, index_string, prettify_names = TRUE) {
#' If empty: no log2 transformation will be applied.
#' If non-empty: log2 transformation will be applied unconditionally to specified assays.
#' @param threshold A numeric threshold to determine if an assay should be log-transformed.
#' @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 = 20) {
cond_log2_transform_assays <- function(assay_data, log2_assays, threshold = 20, prettify_names = TRUE) {

indices_to_log = c()
should_log = FALSE
Expand All @@ -1308,7 +1309,7 @@ cond_log2_transform_assays <- function(assay_data, log2_assays, threshold = 20)
should_log <- NULL
} else if (log2_assays != "") {
# Determine which assays to log based on log2_assays
indices_to_log <- validate_indices(assay_data = assay_data, index_string = log2_assays)
indices_to_log <- validate_indices(assay_data = assay_data, index_string = log2_assays, prettify_names = prettify_names)
should_log <- TRUE
}

Expand Down
2 changes: 1 addition & 1 deletion exec/exploratory_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ if (is.null(opt$final_assay)){
}

# Apply a log2 transform to assays where appropriate
assay_data <- cond_log2_transform_assays(assay_data, log2_assays = opt$log2_assays, threshold = opt$log2_guessing_threshold)
assay_data <- cond_log2_transform_assays(assay_data, log2_assays = opt$log2_assays, threshold = opt$log2_guessing_threshold, prettify_names = FALSE)

# Prettify assay names
names(assay_data) <- prettifyVariablename(names(assay_data))
Expand Down
9 changes: 8 additions & 1 deletion man/cond_log2_transform_assays.Rd

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

5 changes: 5 additions & 0 deletions man/shinyngs.Rd

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

4 changes: 3 additions & 1 deletion man/validate_indices.Rd

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

Loading