% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_sig_score.R
\name{calculate_sig_score_pca}
\alias{calculate_sig_score_pca}
\title{Calculate Signature Score Using PCA Method}
\usage{
calculate_sig_score_pca(
  pdata = NULL,
  eset,
  signature,
  mini_gene_count = 3,
  column_of_sample = "ID",
  adjust_eset = FALSE
)
}
\arguments{
\item{pdata}{Data frame with phenotype data. If `NULL`, created from
`eset` column names.}

\item{eset}{Expression matrix (genes as rows, samples as columns).}

\item{signature}{List of gene signatures.}

\item{mini_gene_count}{Minimum genes required per signature. Default is 3.}

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

\item{adjust_eset}{Logical: remove problematic features. Default is `FALSE`.}
}
\value{
Tibble with signature scores.
}
\description{
Computes signature scores using Principal Component Analysis.
The first principal component is used as the signature score.
}
\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_pca(eset = eset, signature = signature)
}
}
\author{
Dongqiang Zeng
}
