% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_single_cell.R
\name{single_component_enrichment}
\alias{single_component_enrichment}
\title{Calculate enrichment for a set of genes in a single component}
\usage{
single_component_enrichment(gene_vector = SDAresults$loadings[[1]][1, ],
  genes = Mybl1_genes, pos = T, threshold = 200, bg_genes = NULL,
  test = "fisher")
}
\arguments{
\item{genes}{character vector of gene set to look for enrichment for}

\item{pos}{logical; if TRUE (default) the positive gene loadings are ranked highest}

\item{threshold}{numeric; how many genes should be included in the top genes list used to calculate enrichment}

\item{bg_genes}{which genes to use as the 'background' default uses all genes in the SDAresults object from SDA}

\item{test}{string, either binomial (from Exact::exact.test, slow) or fisher (R's fisher.test)}

\item{component}{number or name of component}

\item{factorisation}{SDA factorisation object, output of SDAtools::load_results()}
}
\value{

}
\description{
Calculate enrichment for a set of genes in a single component
}
\details{
Calculate p value of enrichemnt (fishers test) in a component, given a set of genes
}
