def get_sm_pssm(ma, threshold = 0.7)
      sm = ''
      freq = []
      (0..ma[0].length - 1).each do |i|
        freqs = Hash.new(0)
        ma.map { |seq| seq[i] }.each { |res| freqs[res] += 1 }
        # get the residue with the highest frequency
        max_freq = freqs.map { |_res, n| n }.max
        residue = freqs.map { |res, n| n == max_freq ? res : [] }.flatten[0]

        freq << residue == '-' ? 0 : (max_freq / ma.length.to_f)
        sm += (max_freq / ma.length.to_f) >= threshold ? residue : '?'
      end
      [sm, freq]
    end
def get_sm_pssm(ma, threshold = 0.7)
      sm = ''
      freq = []
      (0..ma[0].length - 1).each do |i|
        freqs = Hash.new(0)
        ma.map { |seq| seq[i] }.each { |res| freqs[res] += 1 }
        # get the residue with the highest frequency
        max_freq = freqs.map { |_res, n| n }.max
        residue = freqs.map { |res, n| n == max_freq ? res : [] }.flatten[0]

        freq << residue == '-' ? 0 : (max_freq / ma.length.to_f)
        sm += (max_freq / ma.length.to_f) >= threshold ? residue : '?'
      end
      [sm, freq]
    end
Builds a statistical model from
 a set of multiple aligned sequences
 based on PSSM (Position Specific Matrix)
 Params:
 +ma+: array of +String+s, corresponding to the multiple aligned sequences
 +threshold+: percentage of genes that are considered in statistical model
 Output:
 +String+ representing the statistical model
 +Array+ with the maximum frequeny of the majoritary residue for each
 position