% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generateRef_seurat.R
\name{generateRef_seurat}
\alias{generateRef_seurat}
\title{Generate Reference Matrix from Seurat Object}
\usage{
generateRef_seurat(
  sce,
  celltype = NULL,
  proportion = NULL,
  assay_deg = "RNA",
  slot_deg = "data",
  adjust_assay = FALSE,
  assay_out = "RNA",
  slot_out = "data",
  verbose = FALSE,
  only.pos = TRUE,
  n_ref_genes = 50,
  logfc.threshold = 0.15,
  test.use = "wilcox"
)
}
\arguments{
\item{sce}{Seurat object containing single-cell RNA-seq data.}

\item{celltype}{Character. Cell type column name in metadata.
Default is `NULL` (uses default identity).}

\item{proportion}{Numeric. Proportion of cells to randomly select for
analysis. Default is `NULL` (use all cells).}

\item{assay_deg}{Character. Assay for finding markers. Default is `"RNA"`.}

\item{slot_deg}{Character. Slot for finding markers. Default is `"data"`.}

\item{adjust_assay}{Logical. Whether to adjust assay for SCT. Default is
`FALSE`.}

\item{assay_out}{Character. Assay for output. Default is `"RNA"`.}

\item{slot_out}{Character. Slot for output. Default is `"data"`.}

\item{verbose}{Logical. Print verbose messages. Default is `FALSE`.}

\item{only.pos}{Logical. Return only positive markers. Default is `TRUE`.}

\item{n_ref_genes}{Integer. Number of reference genes per cell type.
Default is 50.}

\item{logfc.threshold}{Numeric. Log fold change threshold. Default is 0.15.}

\item{test.use}{Character. Statistical test for marker identification.
Default is `"wilcox"`.}
}
\value{
Matrix containing aggregated expression data for reference genes.
}
\description{
Generates reference gene expression data from a Seurat object by
identifying marker genes for each cell type and aggregating expression
data.
}
\examples{
\dontrun{
if (requireNamespace("Seurat", quietly = TRUE)) {
  # Requires a Seurat object with sufficient cells and markers
  sm <- generateRef_seurat(sce = seurat_obj, celltype = "cell_type", slot_out = "data")
}
}
}
\author{
Dongqiang Zeng
}
