oddscores: Calculate odds per guide

View source: R/oddscores.R

oddscoresR Documentation

Calculate odds per guide

Description

Returns odds based on rate ratios of guides. The odds are based on the rank of a guide compared to a subset of control guides or the entire library.

Usage

oddscores(r, normsubset, log = 10)

Arguments

r

Numeric vector. Rate ratios of a test versus control arm

normsubset

Integer vector. Specify the indices of features that function as controls. If omitted, all features are used.

log

Integer or logical. Log-transform odds? If FALSE, odds are not transformed. If TRUE, odds are transformed by the natural logarithm. Alternatively, specify the base with which to log-transform. Default = 10

Value

Returns a numeric vector with (by default log10-transformed) odds, of the same length as the number of rate ratios provided. These are the odds that the rate ratio is lower than the one observed based on the (control) population.

Note

Odds in this function represent the odds that a feature has a rate ratio that is this low or lower, either relative to the entire data set or to the normalization subset when provided. These odds are mostly based on rank. Only if they are more extreme than the most extreme control are they extrapolated. Even then, extrapolation is quite conservative. There is also a small interpolation step, which looks at how far the feature is away from the flanking control features.

Author(s)

Jos B. Poell

See Also

geneodds, odds2pq, sortingsim


tgac-vumc/CSSA documentation built on Oct. 10, 2022, 7:27 p.m.