Class: Bio::DB::Fasta::Entry
- Inherits:
-
Object
- Object
- Bio::DB::Fasta::Entry
- Defined in:
- lib/bio/db/fastadb.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
- #get_full_region ⇒ Object (also: #to_region)
-
#initialize(id, length) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(id, length) ⇒ Entry
Returns a new instance of Entry.
50 51 52 53 |
# File 'lib/bio/db/fastadb.rb', line 50 def initialize(id, length) @id=id @length=length.to_i end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
48 49 50 |
# File 'lib/bio/db/fastadb.rb', line 48 def id @id end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
48 49 50 |
# File 'lib/bio/db/fastadb.rb', line 48 def length @length end |
Instance Method Details
#get_full_region ⇒ Object Also known as: to_region
55 56 57 58 59 60 61 62 |
# File 'lib/bio/db/fastadb.rb', line 55 def get_full_region reg = Region.new reg.entry = id reg.start = 1 reg.end = @length reg.orientation = :forward reg end |