# How to compute Shanon entropy

I want to analyze some viral sequences. I want to use shanon entropy as a measure to analyze the sequences. However I do not understand the concept of shannon entropy. Would anyone explain please how it works or advise on some resources i can use to understand shannon entropy.

• There are certainly protein structural biologists on the site that could do this, however I doubt they would recommend this as a key strategy to understand the entropy of spatial relationships
– M__
Mar 23 '20 at 13:28

I think there needs to be clarification of the question. Shannon entropy is not the same thing as the Shannon-Wiener diversity index (H), commonly referred to as the Shannon index.

The reason I brought it up is because you have the tag "population genetics". Shannon diversity index is commonly used in population genetics to compare species richness (the number of species in a given area) and their relative abundance.

Shannon entropy is more to do protein structure, which isn't really population genetics, but can relate to how stable a given mutation might be. That is not really population genetics however, population genetics is about abundance of a given allele in this context.

I am pretty sure that on this site most responders will recommend alternative free energy approaches to perform this style of analysis.

• Thank you so much for your response. I totally agree with you. That was a wrong tag to place for the question i asked. I have also done some reading and realized that Shannon entropy and Shannon-Wienner diversity index are two different things. So I seeked clarification from my supervisor and he actually meant Shannon index and not Shannon entropy as he advised me before. What do i want to do; I have sequence data for viruses from different outbreaks. My plan is to divide the sequences from each outbreak into ; early, mid-phase and late phase. Then use shannon index as a measure of diversity. Mar 24 '20 at 16:31
• Okay thanks, given the error here, it might be better to simply ask a new question. The "population genetics" was correct, but "entropy" was wrong.
– M__
Mar 24 '20 at 17:08
• How is Shannon-Wiener diversity index en.wikipedia.org/wiki/Diversity_index#Shannon_index any different from Shannon entropy? They are mathematically exactly the same.
– Hans
Aug 7 '20 at 17:07