CalcEntropy.word: calculates the entropy for a concatenated nucleotide sequence

Description Usage Arguments Value Author(s) References See Also Examples

Description

The function returns the entropy value for a concatenated nucleotide sequence (a "word" or a "string").

Usage

1

Arguments

Seq

a string of nucleotide bases (See examples)

Value

This function returns the entropy as a numeric value.

Author(s)

Alban Ramette

References

The entropy function is defined in: Eren et al. 2013 Methods in Ecology and Evolution. 4, 1111-1119. doi: 10.1111/2041-210X.12114. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12114/pdf

See Also

CalcEntropy.seq

Examples

1
2
3
4
5
6
7
8
9
Seq1="AAAAAAAA"   # this is the correct type of input
Seq2="AACCTTGG"   # this is the correct type of input
Seq3=c(rep("A",8)) #  this is not the correct input
Seq4=c(rep("A",2),rep("C",2),rep("T",2),rep("G",2)) #  this is not the correct input

CalcEntropy.word(Seq1)  # 0 
CalcEntropy.word(Seq2)  # 2
CalcEntropy.word(Seq3)  # 0
CalcEntropy.word(Seq4)  # 0

aramette/otu2ot documentation built on May 10, 2019, 12:46 p.m.