% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diff-exp.R
\name{aucprTestAlongTree}
\alias{aucprTestAlongTree}
\title{Test for differential gene expression along tree using precision-recall test}
\usage{
aucprTestAlongTree(
  object,
  pseudotime,
  tips,
  log.effect.size = 0.25,
  auc.factor = 1,
  max.auc.threshold = 1,
  frac.must.express = 0.1,
  frac.min.diff = 0.1,
  genes.use = NULL,
  root = NULL,
  segs.to.skip = NULL,
  only.return.global = F,
  must.beat.sibs = 0.5,
  report.debug = F
)
}
\arguments{
\item{object}{An URD object}

\item{pseudotime}{(Character) Name of pseudotime to use}

\item{tips}{(Character vector) The tip of the trajectory to find differential expression for (either as tip number or name)}

\item{log.effect.size}{(Numeric) Minimum fold-change difference in mean expression to be considered differential (default, \code{log(2)} is 2-fold change)}

\item{auc.factor}{(Numeric) The precision-recall AUC is determined for a random classifier is determined
based on the size of populations. To be considered differential, genes must have an AUC this factor
multiplied by the expected AUC of a random classifier.}

\item{max.auc.threshold}{(Numeric) This acts as an upper bound for how high the AUC must be for a gene to be considered differential.}

\item{frac.must.express}{(Numeric) Fraction of cells of interest that must express the gene to consider it differential.}

\item{frac.min.diff}{(Numeric) Minimum difference in fraction of cells expressing a gene to consider it differential.}

\item{genes.use}{(Character vector) Which genes to test for differential expression (default \code{NULL} is all genes)}

\item{root}{(Character) Which segment of the tree (by number) to use as the root for differential express (default \code{NULL} will autodetect, but this can be useful if you do not want to traverse up the entire tree)}

\item{segs.to.skip}{(Character vector) Are there any segments in the tree that should not be used for testing differential expression? (Default, \code{NULL} will test all segments.)}

\item{only.return.global}{(Logical) Genes must also pass an overall in-trajectory vs. out-of-trajectory test across all cells in the data to be considered differential (default, \code{FALSE})}

\item{must.beat.sibs}{(Numeric) At multi-furcated branchpoints, independent comparisons are made to each sibling. For a gene to be considered differential it must be a marker against this proportion of its sibling branches. (1 means it must be a marker against all other branches, 0 means it must be a marker against a single other branch.)}

\item{report.debug}{(Logical) If \code{TRUE}, this function returns a list instead of a data.frame, with 
\code{$stats} containing information about all of the comparisons? (nGene, nTrans, pseudotime, n.cells) and
\code{$marker.chain} containing the markers from each branchpoint.}
}
\value{
a data.frame of gene expression results if \code{report.debug=F} or a list with entries \code{diff.exp} and \code{stats} if \code{report.debug=T}.
}
\description{
This test performs differential expression testing along URD's recovered tree
structure using the area under a precision-recall curve (see: \code{\link{markersAUCPR}})
to determine how good individual genes are as markers of a lineage.
}
\details{
It starts from the segment provided in \code{tips} and compares it to each of
its siblings (and their descendants) matched to the same pseudotime limits as
the segment under consideration. Markers that are upregulated in a segment compared
to either any of its siblings (if \code{must.beat.all.sibs=FALSE}) or compared
to each of its siblings (if \code{must.beat.all.sibs=TRUE}) become putative
markers.
}
