% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/selectX_stats.r
\name{estimate_p_val}
\alias{estimate_p_val}
\title{Compute empirical two-sided p-value for a gene pair}
\usage{
estimate_p_val(robs_co, obs.co, gene1, gene2)
}
\arguments{
\item{robs_co}{List of null model overlap matrices (one per permutation)}

\item{obs.co}{Observed pairwise overlap matrix}

\item{gene1}{Name of the first gene/alteration}

\item{gene2}{Name of the second gene/alteration}
}
\value{
Two-sided empirical p-value
}
\description{
Compute empirical two-sided p-value for a gene pair
}
\examples{
set.seed(1)
genes <- c("geneA", "geneB")
robs_co <- lapply(seq_len(20), function(i) {
  m <- matrix(sample(0:5, 4, replace = TRUE), 2, 2,
              dimnames = list(genes, genes))
  m
})
obs_co <- matrix(c(5, 3, 3, 4), 2, 2, dimnames = list(genes, genes))
estimate_p_val(robs_co, obs_co, "geneA", "geneB")

}
