% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flood.R
\name{floodPseudotimeProcess}
\alias{floodPseudotimeProcess}
\title{Process Flood Pseudotime}
\usage{
floodPseudotimeProcess(
  object,
  floods,
  floods.name = "pseudotime",
  max.frac.NA = 0.4,
  pseudotime.fun = mean,
  stability.div = 10
)
}
\arguments{
\item{object}{An URD object}

\item{floods}{(data.frame) A data.frame of flood visitation information, returned by \code{\link{floodPseudotime}}}

\item{floods.name}{(Character) The name to use for this pseudotime.}

\item{max.frac.NA}{(Numeric) Maximum fraction of simulations that assigned NA for a cell. Cells with more NAs will not be assigned a pseudotime.}

\item{pseudotime.fun}{(Function) Function to combine pseudotimes resulting from each simulation. Default (and only validated function) is mean.}

\item{stability.div}{(Numeric) Number of simulation subsamplings to calculate.}
}
\value{
An URD object with pseudotime stored in \code{@pseudotime} under the column name given in \code{floods.name}, with subsampling information stored in \code{@pseudotime.stability}. The information stored in \code{@pseudotime.stability} will be overwritten by any future pseudotime processing.
}
\description{
This processes the values returned by \code{\link{floodPseudotime}} and stores
the result as a pseudotime in an URD object.
}
\details{
Several separate outputs from \code{floodPseudotime} can be combined using
\code{\link{cbind}} and processed simultaneously. After calculation, 
\code{\link{pseudotimePlotStabilityOverall}} can be used to determine whether
cell pseudotimes have stabilized with the number of simulations currently
performed.
}
\examples{
# Define the root cells as cells in HIGH stage
root.cells <- rownames(object@meta)[object@meta$STAGE == "ZFHIGH"]
# Do the simulation
flood.result <- floodPseudotime(object, root.cells = root.cells, n = 10, minimum.cells.flooded = 2, verbose = T)
# Convert to pseudotime in the URD object
object <- floodPseudotimeProcess(object, flood.result, floods.name = "pseudotime", max.frac.NA = 0.4, pseudotime.fun = mean, stability.div = 5)

}
