I'm not sure that understand your question.
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:
- gap is "nucleotide" then entropy = - sum(paloga+pclogc+pglogg+ptlogt+p_*log_)
- or skip gaps then entropy = - sum(paloga+pclogc+pglogg+ptlogt)
If Shannon_column_entropy = 0 then a column is fully conserved.
And check this question http://biostar.stackexchange.com/questions/3864/entropy-from-a-multiple-sequence-alignment-with-gaps
look at this similar question http://biostar.stackexchange.com/questions/3864/entropy-from-a-multiple-sequence-alignment-with-gaps