annotationBasedShannonEntropy: Compute Shannon Entropy ('entropy') as a measure of...

View source: R/family_funks.R

annotationBasedShannonEntropyR Documentation

Compute Shannon Entropy (entropy) as a measure of annotation (function) diversity within a given set of genes. If gene(s) have multiple annotations these are sorted and concatonated in order to treat them as single composite annotations. This means, that e.g if all genes have the same three annotations the resulting entropy will be 0.

Description

Compute Shannon Entropy (entropy) as a measure of annotation (function) diversity within a given set of genes. If gene(s) have multiple annotations these are sorted and concatonated in order to treat them as single composite annotations. This means, that e.g if all genes have the same three annotations the resulting entropy will be 0.

Usage

annotationBasedShannonEntropy(gene.accs, gene.annos = all.ipr,
  gene.col = 1, anno.col = 2,
  entropy.funk = getOption("GeneFamilies.entropy.function",
  entropy::entropy))

Arguments

gene.accs

The identifiers or accessions of the genes to compute the entropy for

gene.annos

The data.frame holding the annotations for the genes in 'gene.accs'. Default is all available InterPro annotations expected to be found in 'all.ipr'

gene.col

the column of 'gene.annos' in which to lookup the gene identifiers or gene accessions. Default is 1

anno.col

the column of 'gene.annos' in which to lookup the function annotation for the genes in 'gene.accs'. Default is 2

entropy.funk

The function to be used to compute the Shannon Entropy. Default is getOption( 'GeneFamilies.entropy.function', entropy::entropy ). Set to GeneFamilies::shannonEntropy if you want normalized Shannon Entropy. See Entropy Explorer R package.

Value

A list with two entries: 'entropy' is the computed shannon entropy, and 'gene.annos.freqs' is an instance of table showing the annotation architectures and their frequencies


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.