Class: Bioinform::TransfacFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/bioinform/formatters/transfac_formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TransfacFormatter

Returns a new instance of TransfacFormatter.



5
6
7
# File 'lib/bioinform/formatters/transfac_formatter.rb', line 5

def initialize(options = {})
  @with_name = options.fetch(:with_name, true)
end

Instance Attribute Details

#with_nameObject

Returns the value of attribute with_name.



3
4
5
# File 'lib/bioinform/formatters/transfac_formatter.rb', line 3

def with_name
  @with_name
end

Instance Method Details

#format(motif) ⇒ Object



25
26
27
# File 'lib/bioinform/formatters/transfac_formatter.rb', line 25

def format(motif)
  header(motif) + matrix_string(motif) + "\nXX\n//"
end