hic3defdr.util.lrt module

hic3defdr.util.lrt.lrt(raw, f, disp, design, refit_mu=True)[source]

Performs a likelihood ratio test on raw data raw given scaling factors f and dispersion disp.

Parameters:
  • f, disp (raw,) – Matrices of raw values, combined scaling factors, and dispersions, respectively. Rows correspond to pixels, columns correspond to replicates.
  • design (np.ndarray) – Describes the grouping of replicates into conditions. Rows correspond to replicates, columns correspond to conditions, and values should be True where a replicate belongs to a condition and False otherwise.
Returns:

  • pvalues (np.ndarray) – The LRT p-values per pixel.
  • llr (np.ndarray) – The log likelihood ratio per pixel.
  • mu_hat_null, mu_hat_alt (np.ndarray) – The fitted mean parameters under the null and alt models, respectively, per pixel.