Learn R Programming

VIProDesign (version 0.1.0)

entropy_RR: Calculate Entropy for Amino Acid Sequences

Description

This function calculates the entropy of a set of amino acid sequences. It is used to evaluate the diversity of sequences in a given alignment.

Usage

entropy_RR(alignment)

Value

A numeric vector representing the entropy values for each position in the alignment.

Arguments

alignment

An `AAStringSet` object containing the aligned amino acid sequences.

Details

The entropy is calculated based on the frequency of amino acids at each position in the alignment. Higher entropy indicates greater variability at that position.

Examples

Run this code
# Example usage:
library(Biostrings)
sequences <- AAStringSet(c("ACDEFGHIK", "ACDEFGHIK", "ACDEFGHIK"))
entropy_values <- entropy_RR(sequences)
print(entropy_values)

Run the code above in your browser using DataLab