Entropy From Msa
2
0
Entering edit mode
10.3 years ago
User 0063 ▴ 220

Dear All

I'd like to write an algorithm to calculate Shannon Entropy in an MSA. How can I consider gaps and colums fully conserved?

multiple • 4.0k views
0
Entering edit mode

Hi! In order for the members of the forum to help you, you should define your problem better. Here are a few tips for writing better questions. 1) Describe what you are doing. For people to help you, they must have a good understanding of what you are trying to accomplish. 2) Describe what you have tried so far, so that you don't get answers that tell you to do stuff you have already done. 3) Ask a specific question, avoid asking everything at the same time. 4) In order to get informative answers, you must write informative and well formated questions. Cheers!

2
Entering edit mode
10.3 years ago
Alex ★ 1.5k

I'm not sure that understand your question.

By definition:

Shannon_column_entropy = - sum(px*log(px)), where px - a frequency of each nucleotide.
MSA_entropy = sum(Shannon_column_entropies)


With gaps you have two alternatives:

1. gap is "nucleotide" then entropy = - sum(pa*loga+pc*logc+pg*logg+pt*logt+p_*log_)
2. or skip gaps then entropy = - sum(pa*loga+pc(logc+pg*logg+pt*logt)

If Shannon_column_entropy = 0 then a column is fully conserved.

And check this question Entropy From A Multiple Sequence Alignment With Gaps

1
Entering edit mode
10.2 years ago

look at this similar question Entropy From A Multiple Sequence Alignment With Gaps