binom_ci: Calculate enrichment confidence interval.

Description Usage Arguments Details Value

View source: R/utils_enrichment.R

Description

Given total read counts in two samples, calculates library size-normalized confidence intervals for the ratio sample1/sample2.

Usage

1
binom_ci(sample1, sample2, sample1_total, sample2_total, conf.level = 0.95)

Arguments

sample1

Read counts in sample1.

sample2

Read counts in sample2.

sample1_total

Total number of reads in sample1 (for library size normalization).

sample2_total

Total number of reads in sample2 (for library size normalization).

conf.level

Confidence level.

Details

Uses the Agresti-Coull approximation to calculate binomial confidence intervals of sample1/(sample1 + sample2). These values are then converted to CIs of sample1/sample2 and normalized for library size.

Value

A tibble containing the observed proportions and the lower and upper bounds of the confidence interval.


ilia-kats/RiboSeqTools documentation built on Oct. 5, 2020, 7:41 p.m.