entropy | R Documentation |
Measures the entropy score of each position in a sequence alignment
entropy(align, gap_ratio=0.2)
align |
An object created by the |
gap_ratio |
Numeric value between 0 and 1 indicating the maximal gap ratio at a given position in the MSA for this position to be taken into account. 1 is excluded (positions with gaps only). Default is 0.2, positions with more than 20 percent of gaps will not be taken into account in the analysis. When gap_ratio is 1 or close to 1, only positions with at least 1 aa are taken into account (positions with only gaps are excluded). |
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
A vector containing an entropy value for each position in the alignment
Antoine GARNIER and Marie CHABBERT
Shannon CE. A mathematical theory of communication. Bell Syst Techn J 1948;27:379-423.
#Importing MSA file
align <- import.msf(system.file("msa/human_gpcr.msf", package = "Bios2cor"))
#creating entropy object for positions with gap ratio < 0.5
entropy <- entropy(align,gap_ratio=0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.