Skip to content

Commit 5ff79e2

Browse files
author
Karin Schork
committed
make it possible to adjust lts_quantile in Qc-QC-Workflow function
1 parent 1c33dac commit 5ff79e2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

R/prepareData.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#' @param use_groups If \code{TRUE}, the data contains groups.
1010
#' @param group_colours A character vector of hex codes for the group colors, if the data has groups. If \code{NULL}, a default color scale will be used.
1111
#' @param normalization A character containing the method of normalization. The possible methods are no normalization "nonorm" or "median", "loess", "quantile" or "lts" normalization.
12+
#' @param lts_quantile A numeric containing the quantile for the lts normalization if \code{normalization = "lts"}, default is 0.8.
1213
#'
1314
#' @return A list containing the prepared data and the ids of the data as data.frames as well as the groups, number of groups and group colors
1415
#' @export
@@ -28,7 +29,7 @@ prepareData <- function (data_path,
2829
zero_to_NA = TRUE,
2930
do_log_transformation = TRUE, log_base = 2,
3031
use_groups = FALSE, group_colours = NULL,
31-
normalization = "loess"){
32+
normalization = "loess", lts_quantile = 0.8){
3233

3334

3435
#### read and prepare data file ####
@@ -67,7 +68,7 @@ prepareData <- function (data_path,
6768

6869
#### normalize the data ####
6970

70-
D <- automatedNormalization(DATA = D, method = normalization, is_log_transformed = do_log_transformation, log_base = log_base)
71+
D <- automatedNormalization(DATA = D, method = normalization, is_log_transformed = do_log_transformation, log_base = log_base, lts.quantile = lts_quantile)
7172

7273
mess <- paste0(mess, D$message)
7374
D <- D$data

R/workflow_QC.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# mandatory parameters
88
#' @param intensity_columns An integer vector containing the intensity columns of the table.
99
#' @param normalization_method A character containing the method of normalization. The possible methods are no normalization "nonorm" or "median", "loess", "quantile" or "lts" normalization.
10+
#' @param lts_quantile A numeric containing the quantile for the lts normalization if \code{normalization = "lts"}, default is 0.8.
1011
#' @param use_groups If \code{TRUE}, group information encoded in the column names are used. Default is \code{TRUE}.
1112
#'
1213
# additional parameters
@@ -80,6 +81,7 @@ workflow_QC <- function(data_path,
8081

8182
intensity_columns,
8283
normalization_method = "loess",
84+
lts_quantile = 0.8,
8385
use_groups = TRUE,
8486

8587
na_strings = c("NA", "NaN", "Filtered","#NV"),
@@ -128,7 +130,7 @@ workflow_QC <- function(data_path,
128130
na_strings = na_strings, zero_to_NA = zero_to_NA,
129131
do_log_transformation = do_log_transformation, log_base = log_base,
130132
use_groups = use_groups, group_colours = group_colours,
131-
normalization = normalization_method)
133+
normalization = normalization_method, lts_quantile = lts_quantile)
132134

133135

134136
mess <- paste0(mess, prepared_data[["message"]])#

0 commit comments

Comments
 (0)