computeFactorLengths: Compute Length Normalization Factors

View source: R/generateSyntheticData.R

computeFactorLengthsR Documentation

Compute Length Normalization Factors

Description

Compute the factor to be applied for length normalization. Each column of the matrix (samples) is normalized by the weighted average of the column, with weights corresponding to the true probabilities of each gene.

Usage

computeFactorLengths(length_matrix, prob.S1, sum.S1)

Arguments

length_matrix

An n.vars times n.sample matrix of lengths of each gene in each sample.

prob.S1

Vector of means for condition 1.

sum.S1

Sum of means for condition 1.

Value

A matrix of the same size as 'length_matrix', with normalization factors to be applied for each sample and each gene.


csoneson/compcodeR documentation built on July 16, 2024, 1:10 a.m.