Learn R Programming

Bios2cor (version 1.2)

entropy: Entropy score

Description

Measures the entropy score of each position in a sequence alignment

Usage

entropy(align, fileHelix= NULL)

Arguments

align

An object created by the import.msf function which required an alignment file name

fileHelix

A file that contains the positions of the anchor residues in the sequence alignment. Developped for analysis of GPCR sequence alignments

Value

A vector containing an entropy value for each position in the alignment

Details

The entropy score S at position i has been computed with a formula derived from the Shannon's entropy as follow : $${S(i)} = - \sum_{x}^{ } {p} _{x}(i) \log_{20} {p} _{x}(i)$$

where :

  • i is the position in the sequence

  • x is the sequence index

  • \({p} _{x}(i)\) represents the frequency of residue x at position i

References

Shannon CE. A mathematical theory of communication. Bell Syst Techn J 1948;27:379-423.

Examples

Run this code
# NOT RUN {
  align <- import.msf(system.file("msa/toy_align.msf", package = "Bios2cor"))
 
  #creating entropy object
  #entropy <- entropy(align, fileHelix = helix)
  entropy <- entropy(align)
# }

Run the code above in your browser using DataLab