Class: Bio::GenPept::Locus

Inherits:
Object show all
Defined in:
lib/bio/db/genbank/genpept.rb

Overview

LOCUS

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locus_line) ⇒ Locus

Returns a new instance of Locus.



20
21
22
23
24
25
26
# File 'lib/bio/db/genbank/genpept.rb', line 20

def initialize(locus_line)
  @entry_id = locus_line[12..27].strip
  @length   = locus_line[29..39].to_i
  @circular = locus_line[55..62].strip	# always linear
  @division = locus_line[63..66].strip
  @date     = locus_line[68..78].strip
end

Instance Attribute Details

#circularObject

Returns the value of attribute circular.



27
28
29
# File 'lib/bio/db/genbank/genpept.rb', line 27

def circular
  @circular
end

#dateObject

Returns the value of attribute date.



27
28
29
# File 'lib/bio/db/genbank/genpept.rb', line 27

def date
  @date
end

#divisionObject

Returns the value of attribute division.



27
28
29
# File 'lib/bio/db/genbank/genpept.rb', line 27

def division
  @division
end

#entry_idObject

Returns the value of attribute entry_id.



27
28
29
# File 'lib/bio/db/genbank/genpept.rb', line 27

def entry_id
  @entry_id
end

#lengthObject

Returns the value of attribute length.



27
28
29
# File 'lib/bio/db/genbank/genpept.rb', line 27

def length
  @length
end