Skip to content

Commit 4ea8f79

Browse files
authored
Merge pull request #325 from stemangiola/comply-with-breaking-changes-for-msigdbr
fix docs
2 parents 5987305 + 2047a9c commit 4ea8f79

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

R/functions.R

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,8 @@ aggregate_duplicated_transcripts_DT =
26862686
#' @param .feature A column symbol. The column that is represents entities to cluster (i.e., normally genes)
26872687
#' @param .element A column symbol. The column that is used to calculate distance (i.e., normally samples)
26882688
#' @param of_samples A boolean
2689-
#' @param log_transform A boolean, whether the value should be log-transformed (e.g., TRUE for RNA sequencing data)
2689+
#' @param transform A function for transforming abundance values before correlation calculation
2690+
#' (e.g., log1p for RNA sequencing data, identity for no transformation)
26902691
#'
26912692
#' @return A tibble with redundant elements removed
26922693
#'
@@ -2985,17 +2986,25 @@ get_symbol_from_ensembl <-
29852986

29862987
}
29872988

2988-
#' Perform linear equation system analysis through llsr
2989+
#' Perform linear equation system analysis through linear least squares regression
29892990
#'
29902991
#' @keywords internal
29912992
#' @noRd
29922993
#'
29932994
#' @importFrom stats lsfit
29942995
#'
2995-
#' @param mix A data frame
2996-
#' @param reference A data frame
2996+
#' @param mix A data frame containing mixture expression profiles
2997+
#' @param reference A data frame containing reference expression profiles for cell types (default = X_cibersort)
2998+
#' @param intercept Logical indicating whether to include intercept in the regression model (default = TRUE)
29972999
#'
2998-
#' @return A data frame
3000+
#' @details
3001+
#' Performs cell type deconvolution using linear least squares regression. The function:
3002+
#' 1. Identifies common markers between mixture and reference
3003+
#' 2. Normalizes expression data
3004+
#' 3. Fits linear model with or without intercept
3005+
#' 4. Constrains results to non-negative values and normalizes to sum to 1
3006+
#'
3007+
#' @return A data frame containing estimated cell type proportions
29993008
#'
30003009
#'
30013010
run_llsr = function(mix, reference = X_cibersort, intercept= TRUE) {

0 commit comments

Comments
 (0)