% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dtu_analysis.R
\name{posthoc_and_stager}
\alias{posthoc_and_stager}
\title{Posthoc filtering and two-staged statistical tests}
\usage{
posthoc_and_stager(dturtle, ofdr = 0.05, posthoc = 0.1)
}
\arguments{
\item{dturtle}{Result object of \code{\link[=run_drimseq]{run_drimseq()}}. Must be of class \code{dturtle}.}

\item{ofdr}{Overall false discovery rate (OFDR) threshold.}

\item{posthoc}{Specify the minimal standard deviation of a transcripts proportion level that should be kept when performing post-hoc filtering. To disable posthoc filtering 0 or \code{FALSE} can be provided.}
}
\value{
An extended \code{dturtle} object. Additional slots include:
\itemize{
\item \code{sig_gene}: A character vector of all genes where the first stageR step was significant. Basically the significant genes, that showed signs of DTU.
\item \code{sig_tx} : A named character vector of transcripts where the second stageR step was significant. Basically the significant transcripts of the significant genes.
\item \code{FDR_table} : A data frame of the stage-wise adjusted p-values for all genes/transcripts. Might contain NA-values, as transcript level p-values are not available when the gene level test was not significant.
}
}
\description{
Perform optional post-hoc filtering and run two-staged statistical tests.
}
\details{
The post-hoc filter excludes transcripts, which standard deviation of the proportion per cell/sample is below the threshold.
The two-staged statistical test performed by stageR first determines if any of the transcripts of a gene is showing signs of DTU.
The second step tries to identify on singular transcript level the significantly different transcripts.
}
\seealso{
\code{\link[=run_drimseq]{run_drimseq()}} for DTU object creation. \code{\link[=create_dtu_table]{create_dtu_table()}} for result table creation.

Other DTUrtle DTU: 
\code{\link{combine_to_matrix}()},
\code{\link{import_counts}()},
\code{\link{priming_bias_detection_probability}()},
\code{\link{run_drimseq}()}
}
\concept{DTUrtle DTU}
