binom_ci_profile: Calculate position-wise enrichment confidence intervals

Description Usage Arguments Details Value

View source: R/utils_enrichment.R

Description

For a given gene, confidence intervals of enrichment (read count ratio) are calculated for each position.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
binom_ci_profile(
  data,
  gene,
  sample1,
  sample2,
  exp,
  rep,
  bin,
  window_size,
  conf.level = 0.95,
  ignore_genecol = FALSE
)

Arguments

data

A serp_data object.

gene

Name of the gene/ORF.

sample1

Sample name to use in the numerator.

sample2

Sample name to use in the denominator.

exp

Experiment name(s). If missing, all experiments will be used.

rep

Replicate name(s). If missing, all replicates will be used.

bin

Binning to use. If missing, will be automatically determined.

window_size

Neighborhood size in nucleotides. Will be automatically converted to codons if binning by codons.

conf.level

Confidence level.

ignore_genecol

If TRUE, assumes that the given gene is the gene identifier contained in the gene column of the reference table. If FALSE, assumes that the given gene corresponds to the genename_column setting in the defaults.

Details

At each position within the gene, read counts within a window_size-wide neighborhood are summed up and used for CI calculation. A confidence interval for the ratio sample1/sample2 is calculated using binom_ci.

Value

A tibble with the following columns:

exp

Experiment name.

rep

Replicate name.

winmid

Center of the neighborhood for which the CI was calculated.

sample1

Raw counts of sample1 at position winmid. Note that the actual column name is the value of sample1.

sample2

Raw counts of sample2 at position winmid. Note that the actual column name is the value of sample2.

win_sample1

Total read counts of sample1 within the neighborhood centered at winmid. Note that the actual column name is the value of sample1.

win_sample2

Total read counts of sample2 within the neighborhood centered at winmid. Note that the actual column name is the value of sample2.

ratio_mean

Estimated ratio \frac{sample1}{sample2}.

lo_CI

Lower confidence bound.

hi_CI

Upper confidence bound.


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