class Bio::TRANSFAC::MATRIX

Public Class Methods

new(entry) click to toggle source
Calls superclass method Bio::TRANSFAC.new
# File lib/bio/db/transfac.rb, line 90
def initialize(entry)
  super(entry)
end

Public Instance Methods

ba() click to toggle source

BA Statistical basis

# File lib/bio/db/transfac.rb, line 132
def ba
  field_fetch('BA')
end
bf() click to toggle source

BF List of linked factor entries

# File lib/bio/db/transfac.rb, line 105
def bf
  field_fetch('bf')
end
de() click to toggle source

DE Short factor description

# File lib/bio/db/transfac.rb, line 100
def de
  field_fetch('DE')
end
ma() click to toggle source
# File lib/bio/db/transfac.rb, line 110
def ma
  ma_dat = {}
  ma_ary = []
  key = ''
  @orig.each do |k, v|
    if k =~ /^0*(\d+)/
      key = $1.to_i
      ma_dat[key] = fetch(k) unless ma_dat[key]
    end
  end
  ma_dat.keys.sort.each_with_index do |k, i|
    ma_dat[k].slice!(-1, 1)
    ma_dat[k].slice!(-1, 1)
    ma_ary[i] = ma_dat[k].split(/\s+/)
    ma_ary[i].each_with_index do |x, j|
      ma_ary[i][j] = x.to_i
    end
  end
  Matrix[*ma_ary]
end
na() click to toggle source

NA Name of the binding factor

# File lib/bio/db/transfac.rb, line 95
def na
  field_fetch('NA')
end