TER_all_pairs: TER_all_pairs

View source: R/MODULE_3_QC_PCA.R

TER_all_pairsR Documentation

TER_all_pairs

Description

Function to perform the logit TER test between all pairs of samples in a data set.

Function to perform the logit TER test between all pairs of samples in a data set.

Usage

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

TER_all_pairs(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).

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).

Value

A list of lists containig the results of all pairwise TER tests. If there are n samples in the input list, the output list will consist of C(n,2) elements. Each element of the list is in turn a list with four attributes: - uniqueIDs of the two samples compared - groupIDs of the two samples compared - pair_type ("homo" if the two groupIDs are equal and "hetero" otherwise) - fit containing the output of the TER test in a data frame. See logit_seq for details.

A list of lists containig the results of all pairwise TER tests. If there are n samples in the input list, the output list will consist of C(n,2) elements. Each element of the list is in turn a list with four attributes: - uniqueIDs of the two samples compared - groupIDs of the two samples compared - pair_type ("homo" if the two groupIDs are equal and "hetero" otherwise) - fit containing the output of the TER test in a data frame. See logit_seq for details.

Examples

rr_LMCN.v2.pairwise <- TER_all_pairs(rr_LMCN.v2.split, sample_attributes_LMCN, "read_type", "replicate_name", "cell_line")
rr_LMCN.v2.pairwise <- TER_all_pairs(rr_LMCN.v2.split, sample_attributes_LMCN, "read_type", "replicate_name", "cell_line")

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