Class: Bio::MAF::Header
- Inherits:
-
Object
- Object
- Bio::MAF::Header
- Defined in:
- lib/bio/maf/maf.rb
Overview
A MAF header, containing the variable-value pairs from the first line of the file as well as the alignment parameters.
Instance Attribute Summary collapse
-
#alignment_params ⇒ Hash
Alignment parameters from the MAF header.
-
#vars ⇒ Hash
Variable-value pairs from the ##maf line.
Class Method Summary collapse
-
.default ⇒ Header
Create a default header with version=1.
Instance Method Summary collapse
-
#initialize(vars, params) ⇒ Header
constructor
A new instance of Header.
-
#scoring ⇒ String
The optional scoring parameter, if present.
-
#version ⇒ String
The required version parameter.
Constructor Details
#initialize(vars, params) ⇒ Header
Returns a new instance of Header.
32 33 34 35 |
# File 'lib/bio/maf/maf.rb', line 32 def initialize(vars, params) @vars = vars @alignment_params = params end |
Instance Attribute Details
#alignment_params ⇒ Hash
Alignment parameters from the MAF header.
24 25 26 |
# File 'lib/bio/maf/maf.rb', line 24 def alignment_params @alignment_params end |
#vars ⇒ Hash
Variable-value pairs from the ##maf line
21 22 23 |
# File 'lib/bio/maf/maf.rb', line 21 def vars @vars end |
Class Method Details
.default ⇒ Header
Create a default header with version=1.
28 29 30 |
# File 'lib/bio/maf/maf.rb', line 28 def Header.default Header.new({:version => 1}, nil) end |
Instance Method Details
#scoring ⇒ String
The optional scoring parameter, if present.
45 46 47 |
# File 'lib/bio/maf/maf.rb', line 45 def scoring vars[:scoring] end |
#version ⇒ String
The required version parameter.
39 40 41 |
# File 'lib/bio/maf/maf.rb', line 39 def version vars[:version] end |