% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{summarize_to_gene}
\alias{summarize_to_gene}
\title{Summarize matrix to gene level}
\usage{
summarize_to_gene(mtx, tx2gene, fun = "sum", genes = NULL)
}
\arguments{
\item{mtx}{A (sparse) expression matrix on transcript / feature level}

\item{tx2gene}{A data frame, mapping the \code{mtx} rownames (first column) to genes (second column).}

\item{fun}{character string specifying the name of aggregation function to be
applied to all columns in data.  Currently "sum", "count", and "mean"
are supported.}

\item{genes}{Optionally only summarize specific genes.}
}
\value{
A summarised (sparse) matrix
}
\description{
Summarize a transcript level matrix to gene level.
}
\details{
Can be used with sparse or dense expression matrices
}
