# nestedradjust: Calculate rate ratios of rate ratios restricted by confidence... In tgac-vumc/CSSA: Analysis and Simulation Tools for CRISPR-Cas9 Pooled Screens

## Description

nestedradjust is an extension of radjust. It is specifically applicable for comparison of two samples with an independent time base.

## Usage

 ```1 2``` ```nestedradjust(mt1, wt1, mt0, wt0, conf.level = 0.01, normfun = "sum", normsubset, log = TRUE, belowxreads = FALSE) ```

## Arguments

 `mt1` Integer vector. Raw sequencing reads in test sample, t1 `wt1` Integer vector. Raw sequencing reads in control sample, t1 `mt0` Integer vector. Raw sequencing reads in test sample, t0 `wt0` Integer vector. Raw sequencing reads in control sample, t0 `conf.level` Numeric. Sets the confidence level of the rate ratio. If FALSE, an unadjusted rate ratio will be returned. Default = 0.01 `normfun` Character string. Specify with which function to standardize the data. Default = "sum" `normsubset` Integer vector. Specify the indices of features that are to be used in standardization `log` Logical. Specify whether the rate ratio should be log2-transformed. If TRUE, uses log2. Default = TRUE `belowxreads` Logical or numeric. Set threshold above which the unadjusted rate ratio is returned. Default = FALSE

## Details

The basic functionality is similar to `radjust`. The major difference lies in the time base factor. Because both samples have an independent origin, there is added uncertainty of this time base factor. This is where the nested aspect of this function comes in. Both the upper and lower confidence limit of the rate ratio at baseline are tested as time base. From the resulting two rate ratios, the smallest fold change ratio is returned. It therefore estimates a conservative rate ratio.

## Value

Returns the (log2-transformed) adjusted rate ratio.

Jos B. Poell

## See Also

`radjust`, `CRISPRsim`

## Examples

 ```1 2 3 4``` ```wt <- CRISPRsim(genes = 10, guides = 4, a = 3, allseed = 1, t0seed = 2) mt <- CRISPRsim(genes = 10, guides = 4, a = 3, e = TRUE, f = jitter(wt\$f), allseed = 1, repseed = 2) nestedradjust(mt\$t3, wt\$t3, mt\$t0, wt\$t0) ```

tgac-vumc/CSSA documentation built on Dec. 14, 2019, 9:40 p.m.