Class: Bio::DB::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/db/alignment.rb

Overview

a class to represent the SAM OPT values, presented in SAM as TAG:VTYPE:VALUE

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#tagObject

Returns the value of attribute tag


6
7
8
# File 'lib/bio/db/alignment.rb', line 6

def tag
  @tag
end

#typeObject

Returns the value of attribute type


6
7
8
# File 'lib/bio/db/alignment.rb', line 6

def type
  @type
end

#valueObject

Returns the value of attribute value


6
7
8
# File 'lib/bio/db/alignment.rb', line 6

def value
  @value
end

Instance Method Details

#set(str) ⇒ Object


7
8
9
10
11
# File 'lib/bio/db/alignment.rb', line 7

def set(str)
  @tag   = str[0..1]
  @type  = str[3]
  @value = str[5..-1]
end