% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generateRef_limma.R
\name{generateRef_limma}
\alias{generateRef_limma}
\title{Generate Reference Signature Matrix Using Limma}
\usage{
generateRef_limma(dat, pheno, FDR = 0.05)
}
\arguments{
\item{dat}{Matrix or data frame. Gene probes in rows and samples in columns.}

\item{pheno}{Character vector. Cell type class of the samples.}

\item{FDR}{Numeric. Genes with BH adjusted p-value < FDR are considered
significant. Default is 0.05.}
}
\value{
List containing:
  - `reference_matrix`: Data frame of median expression values for
    significantly expressed genes.
  - `G`: Number of probes used that resulted in the lowest condition number.
  - `condition_number`: Minimum condition number obtained.
  - `whole_matrix`: Matrix of median values across all samples.
}
\description{
Performs differential expression analysis using the limma package to
identify significantly expressed genes across different cell types.
Computes median expression levels of these significant genes to create
a reference signature matrix.
}
\examples{
dat <- matrix(rnorm(2000), nrow = 100)
rownames(dat) <- paste("Gene", 1:100, sep = "_")
colnames(dat) <- paste("Sample", 1:20, sep = "_")
pheno <- sample(c("Type1", "Type2", "Type3"), 20, replace = TRUE)
results <- generateRef_limma(dat, pheno)
print(results)
}
