% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree-structure.R
\name{visitDivergenceByPseudotime}
\alias{visitDivergenceByPseudotime}
\title{Visitation Divergence for Pseudotime Windows}
\usage{
visitDivergenceByPseudotime(
  object,
  pseudotime,
  segment.1,
  segment.2,
  cells.in.segments = NULL,
  cells.segment.1 = NULL,
  cells.segment.2 = NULL,
  divergence.method = c("ks", "preference"),
  pseudotime.cuts = 80,
  window.size = 5,
  pseudotime.min = NULL,
  pseudotime.max = NULL,
  p.thresh = 0.01,
  pref.thresh = 0.5,
  verbose = T
)
}
\arguments{
\item{object}{An URD object}

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

\item{segment.1}{(Character) First segment to compare (Not necessary if \code{cells.in.segment.1} is set)}

\item{segment.2}{(Character) Second segment to compare (Not necessary if \code{cells.in.segment.2} is set)}

\item{cells.in.segments}{(data.frame) Output from \code{\link{putativeCellsInSegments}} that describes which cells can belong to which segments. (Not necessary if \code{cells.in.segment.1} and \code{cells.in.segment.2} are both set)}

\item{cells.segment.1}{(Character Vector) List of cells that belong to segment 1 for comparison (not necessary if \code{segment.1} and \code{cells.in.segments} are provided, in which case set to NULL)}

\item{cells.segment.2}{(Character Vector) List of cells that belong to segment 2 for comparison (not necessary if \code{segment.2} and \code{cells.in.segments} are provided, in which case set to NULL)}

\item{divergence.method}{(Character: "ks" or "preference") Test to use to determine whether visitation has diverged for each pseudotime window.}

\item{pseudotime.cuts}{(Numeric) Approximate number of cells to assign to each pseudotime bin for branchpoint finding.}

\item{window.size}{(Numeric) Width of moving window in pseudotime used for branchpoint finding, in terms of bins.}

\item{pseudotime.min}{(Numeric) Minimum pseudotime of cells to compare}

\item{pseudotime.max}{(Numeric) Maximum pseudotime of cells to compare}

\item{p.thresh}{(Numeric) p-value threshold to use in determining whether visitation is significantly different from pairs of tips}

\item{pref.thresh}{(Numeric) Maximum mean preference within a window to be considered 'different' if \code{divergence.method=="preference"}}
}
\value{
(List) Number of cells considered ("cells.considered"), the determined pseudotime breakpoint ("breakpoint"), and the
details of the calculation for each window ("details"), which is a data.frame: Rows are pseudotime windows, columns are KS-test p-value adjusted for multiple hypotheses ("p"), pseudotime of cells in the window ("mean.pseudotime", "min.pseudotime", "max.pseudotime"), number of cells considered from each segment ("cells.visited.seg1", "cells.visited.seg2"), and whether the window passed the p-value threshold for significance ("different")
}
\description{
Visitation Divergence for Pseudotime Windows
}
\keyword{internal}
