% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gene_expression.R, R/generics.R
\name{scGeneExp.default}
\alias{scGeneExp.default}
\alias{scGeneExp.Seurat}
\alias{scGeneExp.SingleCellExperiment}
\alias{scGeneExp.dgCMatrix}
\alias{scGeneExp.matrix}
\alias{scGeneExp}
\title{Extracts the expression of a single gene}
\usage{
\method{scGeneExp}{default}(scObj, gene, slot = NULL)

\method{scGeneExp}{Seurat}(scObj, gene, slot = "data")

\method{scGeneExp}{SingleCellExperiment}(scObj, gene, slot = "logcounts")

\method{scGeneExp}{dgCMatrix}(scObj, gene, slot = NULL)

\method{scGeneExp}{matrix}(scObj, gene, slot = NULL)

scGeneExp(scObj, gene, slot)
}
\arguments{
\item{scObj}{A \code{Seurat}, \code{SingleCellExperiment},
\code{dgCMatrix} or \code{matrix} object.}

\item{gene}{Selected gene.}

\item{slot}{Gene expression slot. Ignored if \code{scObj} is of class
\code{dgCMatrix} or \code{matrix}.}
}
\value{
A gene expression vector.
}
\description{
This function extracts the expression of a single gene from a \code{Seurat},
\code{SingleCellExperiment}, \code{dgCMatrix} or \code{matrix} object.
}
\examples{
scePath <- system.file('extdata', 'sceObj.qs2', package='scLang')
sceObj <- qs2::qs_read(scePath)
v <- scGeneExp(sceObj, 'Gene291')

}
