diff --git a/R/ADTnorm.R b/R/ADTnorm.R index be54f0d..e805e99 100644 --- a/R/ADTnorm.R +++ b/R/ADTnorm.R @@ -1,7 +1,7 @@ #' ADTnorm normalization to remove the technical variations across samples for each ADT marker. #' #' This function removes the technical variations such as batch effect, sequencing depth biases, antibody selection differences and antibody concentration differences, etc. The normalized samples are ready for integration across studies. -#' @param cell_x_adt Matrix of ADT raw counts in cells (rows) by ADT markers (columns) format. By default, ADTnorm expects raw counts as input data and arcsin transformation to be performed by ADTnorm internally. If ADTnorm detects that the input count matrix is a non-integer matrix, it will skip the arcsinh transformation. Therefore, users also need to tune the parameters to fit their input transformation. +#' @param cell_x_adt Matrix of ADT raw counts in cells (rows) by ADT markers (columns) format. By default, ADTnorm expects raw counts as input data and arcsinh transformation to be performed by ADTnorm internally. If ADTnorm detects that the input count matrix is a non-integer matrix, it will skip the arcsinh transformation. Therefore, users also need to tune the parameters to fit their input transformation. #' @param cell_x_feature Matrix of cells (rows) by cell features (columns) such as sample, batch, or other cell-type related information. Please ensure that the cell_x_feature matrix at least contains a sample column with the exact "sample" column name. Please note that "sample" should be the smallest unit to group the cells. At this resolution, ADTnorm will identify peaks and valleys to implement normalization. Please ensure the samples have different names across batches/conditions/studies. "batch" column is optional. It can be batches/conditions/studies etc, that group the samples based on whether the samples are collected from the same batch run or experiment. This column is needed if ```multi_sample_per_batch``` parameter is turned on to remove outlier positive peaks per batch or ```detect_outlier_valley``` for detecting and imputing outlier valleys per batch. If "batch" column is not provided, it will be set as the same as "sample" column. In the intermediate density plots that ADTnorm provides, density plots will be colored by the "batch" column. #' @param save_outpath The path to save the results. #' @param study_name Name of this run. @@ -146,7 +146,7 @@ ADTnorm = function(cell_x_adt = NULL, cell_x_feature = NULL, save_outpath = NULL ## Whether to consider zero as missing value and set to NA. if(exclude_zeroes){ na_mask = is.na(cell_x_adt) - # Set all cell_x_adt to NA to avoid transformation during arcsin (if used) + # Set all cell_x_adt to NA to avoid transformation during arcsinh (if used) cell_x_adt[cell_x_adt == 0] = NA } diff --git a/man/ADTnorm.Rd b/man/ADTnorm.Rd index 883098c..c087d24 100644 --- a/man/ADTnorm.Rd +++ b/man/ADTnorm.Rd @@ -39,7 +39,7 @@ ADTnorm( ) } \arguments{ -\item{cell_x_adt}{Matrix of ADT raw counts in cells (rows) by ADT markers (columns) format. By default, ADTnorm expects raw counts as input data and arcsin transformation to be performed by ADTnorm internally. If ADTnorm detects that the input count matrix is a non-integer matrix, it will skip the arcsinh transformation. Therefore, users also need to tune the parameters to fit their input transformation.} +\item{cell_x_adt}{Matrix of ADT raw counts in cells (rows) by ADT markers (columns) format. By default, ADTnorm expects raw counts as input data and arcsinh transformation to be performed by ADTnorm internally. If ADTnorm detects that the input count matrix is a non-integer matrix, it will skip the arcsinh transformation. Therefore, users also need to tune the parameters to fit their input transformation.} \item{cell_x_feature}{Matrix of cells (rows) by cell features (columns) such as sample, batch, or other cell-type related information. Please ensure that the cell_x_feature matrix at least contains a sample column with the exact "sample" column name. Please note that "sample" should be the smallest unit to group the cells. At this resolution, ADTnorm will identify peaks and valleys to implement normalization. Please ensure the samples have different names across batches/conditions/studies. "batch" column is optional. It can be batches/conditions/studies etc, that group the samples based on whether the samples are collected from the same batch run or experiment. This column is needed if \code{multi_sample_per_batch} parameter is turned on to remove outlier positive peaks per batch or \code{detect_outlier_valley} for detecting and imputing outlier valleys per batch. If "batch" column is not provided, it will be set as the same as "sample" column. In the intermediate density plots that ADTnorm provides, density plots will be colored by the "batch" column.} diff --git a/vignettes/ADTnorm-tutorial.Rmd b/vignettes/ADTnorm-tutorial.Rmd index e60134e..a6e0480 100644 --- a/vignettes/ADTnorm-tutorial.Rmd +++ b/vignettes/ADTnorm-tutorial.Rmd @@ -281,7 +281,7 @@ Due to technical variations, the positive population of cells may not have a ver ```exclude_zeroes```: Indicator to consider zeros as NA, i.e., missing values. Recommend TRUE if zeroes in the data represent dropout, likely for large ADT panels, big datasets, or under-sequenced data. Additionally, if one marker (possibly IgG) only has zero value, this marker will be excluded from the downstream processing. -```cell_x_adt```: Matrix of ADT raw counts in cells (rows) by ADT markers (columns) format. By default, ADTnorm expects raw counts to be provided and arcsin transformation to be performed by ADTnorm internally. If ADTnorm detects that the input count matrix is a non-integer, it will skip the arcsine transformation. Also, please note that users need to tune the parameters, such as ```neg_candidate_thres```, ```bw_smallest_*```, ```quantile_clip```, etc., to fit their input transformation. +```cell_x_adt```: Matrix of ADT raw counts in cells (rows) by ADT markers (columns) format. By default, ADTnorm expects raw counts to be provided and arcsinh transformation to be performed by ADTnorm internally. If ADTnorm detects that the input count matrix is a non-integer, it will skip the arcsinh transformation. Also, please note that users need to tune the parameters, such as ```neg_candidate_thres```, ```bw_smallest_*```, ```quantile_clip```, etc., to fit their input transformation. logTranformation