Class: Bioinform::TransfacFormatter
- Inherits:
-
Object
- Object
- Bioinform::TransfacFormatter
- Defined in:
- lib/bioinform/formatters/transfac_formatter.rb
Instance Attribute Summary collapse
-
#with_name ⇒ Object
Returns the value of attribute with_name.
Instance Method Summary collapse
- #format(motif) ⇒ Object
-
#initialize(options = {}) ⇒ TransfacFormatter
constructor
A new instance of TransfacFormatter.
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( = {}) @with_name = .fetch(:with_name, true) end |
Instance Attribute Details
#with_name ⇒ Object
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 |