generate_ENZ: generate_ENZ

View source: R/MODULE_5_TER_ALT.R

generate_ENZR Documentation

generate_ENZ

Description

Function to generate empirical null distribution.

Usage

generate_ENZ(x, design, outcome = "read_type", uniqueID, groupID)

Arguments

x

A sample-by-sample list of RNA and RPF count data and sample attributes produced by partition_to_uniques.

design

Design matrix of the experiment describing samples and their attributes.

outcome

The variable determining whether a vector of read counts is RNA or RPF. This is usually the name of the response variable in the TER test logistic regression performed through logit_seq. Default: "read_type".

uniqueID

A variable (column) of the design matrix defining unique experimental preparations from each of which one RNA sample and one RPF sample was derived. It corresponds to the highest resolution (lowest level) of classification of samples in the data set apart from the RNA/RPF distinction and is usually equal to replicate name in biological experiments.

groupID

A variable (column) of the design matrix indicating which replicates should be grouped together. All experimental units having the same groupID will be considered replicates of the same biological sample (or members of the same group of samples).

Details

In large scale hypothesis testing e.g. genomic data sets, it may be possible to observe the null distribution, instead of relying the theoretically assumed distribution (standard normal for regression). Ribolog compares replicates of each biological sample (items with the same groupID) and pools the z values from those regressions to produce the empirical null.

Value

A vector of z statistics constituting empirical null.

Examples

rr_LMCN.v2.enz <- generate_ENZ(x = rr_LMCN.v2.split, design = sample_attributes_LMCN, outcome = "read_type", uniqueID = "replicate_name", groupID = "cell_line")

goodarzilab/Ribolog documentation built on Oct. 7, 2022, 10:14 p.m.