% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_sig_score.R
\name{calculate_sig_score}
\alias{calculate_sig_score}
\title{Calculate Signature Score}
\usage{
calculate_sig_score(
  pdata = NULL,
  eset,
  signature = NULL,
  method = c("pca", "ssgsea", "zscore", "integration"),
  mini_gene_count = 3,
  column_of_sample = "ID",
  print_gene_proportion = FALSE,
  print_filtered_signatures = FALSE,
  adjust_eset = FALSE,
  parallel.size = 1L,
  ...
)
}
\arguments{
\item{pdata}{Phenotype data. If `NULL`, created from `eset` column names.}

\item{eset}{Expression matrix (CPM, TPM, RPKM, FPKM, etc.).}

\item{signature}{List of gene signatures. Can also be a character string
naming a built-in signature collection (e.g., `"signature_collection"`,
`"signature_tme"`, `"go_bp"`, `"kegg"`, `"hallmark"`).}

\item{method}{Scoring method: `"pca"`, `"ssgsea"`, `"zscore"`,
or `"integration"`. Default is `"pca"`.}

\item{mini_gene_count}{Minimum genes required per signature. Default is 3
(or 5 for ssGSEA).}

\item{column_of_sample}{Column with sample IDs in `pdata`. Default is `"ID"`.}

\item{print_gene_proportion}{Logical: print gene coverage. Default is
`FALSE`.}

\item{print_filtered_signatures}{Logical: print filtered signatures.
Default is `FALSE`.}

\item{adjust_eset}{Logical: clean problematic features. Default is `FALSE`.}

\item{parallel.size}{Parallel workers for ssGSEA. Default is 1.}

\item{...}{Additional arguments passed to specific methods.}
}
\value{
Tibble with phenotype data and signature scores.
}
\description{
Main interface for calculating signature scores from gene expression data.
Supports PCA, z-score, ssGSEA, and integration methods.
}
\examples{
set.seed(123)
eset <- matrix(rnorm(1000), nrow = 100, ncol = 10)
rownames(eset) <- paste0("Gene", 1:100)
colnames(eset) <- paste0("Sample", 1:10)
signature <- list(
  Signature1 = paste0("Gene", 1:10),
  Signature2 = paste0("Gene", 11:20)
)
\donttest{
result <- calculate_sig_score(eset = eset, signature = signature, method = "pca")
}
}
\references{
\enumerate{
  \item Hänzelmann S, Castelo R, Guinney J. GSVA: gene set variation
    analysis. BMC Bioinformatics. 2013;14:7.
  \item Mariathasan S, et al. TGF\eqn{\beta} attenuates tumour response to PD-L1 blockade.
    Nature. 2018;554:544-548.
}
}
\author{
Dongqiang Zeng
}
