calculate_method: Calculate diversity values for a matrix of transcripts.

View source: R/calculate_method.R

calculate_methodR Documentation

Calculate diversity values for a matrix of transcripts.

Description

Calculate diversity values for a matrix of transcripts.

Usage

calculate_method(x, genes, method, norm = TRUE, verbose = FALSE)

Arguments

x

An input matrix, or data.frame containing transcript-level expression values.

genes

Character vector with equal length to the number of rows of the input dataset with transcript-level expression values. The values in x are grouped into genes based on this vector.

method

Method to use for splicing diversity calculation, including naive entropy (naive), Laplace entropy (laplace), Gini index (gini), Simpson index (simpson) and inverse Simpson index (invsimpson). The default method is Laplace entropy.

norm

If TRUE, the entropy values are normalized to the number of transcripts for each gene. The normalized entropy values are always between 0 and 1. If FALSE, genes cannot be compared to each other, due to possibly different maximum entropy values.

verbose

If TRUE, the function will print additional diagnostic messages, besides the warnings and errors.

Details

The function calculates diversity values on a matrix of transcript-level expression values, aggregated by the genes defined in the genes parameter.

Value

Gene-level splicing diversity values in a data.frame, where each row belongs to a gene and each column belongs to a sample from the data, in addition to the first column, containing gene names, given in the 'genes' parameter.


SU-CompBio/SplicingFactory documentation built on March 28, 2022, 4:39 a.m.