CalcEntropy.seq: calculates the entropy for a nucleotide sequence provided as...

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

Description

The function returns the entropy value for a nucleotide sequence provided as a vector of bases.

Usage

1

Arguments

Seq

a vector of nucleotide bases (See examples).

Details

In case some bases are unknown ".", the entropy is calculated with the other bases (including gaps "-") but over the total sequence length.

Value

This function returns a numeric value for the calculated entropy.

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

Examples

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

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

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