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

- (Locus) initialize(locus_line)



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

- (Object) circular

Returns the value of attribute circular



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

def circular
  @circular
end

- (Object) date

Returns the value of attribute date



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

def date
  @date
end

- (Object) division

Returns the value of attribute division



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

def division
  @division
end

- (Object) entry_id

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

- (Object) length

Returns the value of attribute length



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

def length
  @length
end