Class: FastaRecord
- Inherits:
-
Object
- Object
- FastaRecord
- Defined in:
- lib/bigbio/db/fasta/fastarecord.rb
Instance Attribute Summary collapse
-
#descr ⇒ Object
Returns the value of attribute descr.
-
#id ⇒ Object
Returns the value of attribute id.
-
#seq ⇒ Object
Returns the value of attribute seq.
Instance Method Summary collapse
-
#initialize(id, descr, seq) ⇒ FastaRecord
constructor
A new instance of FastaRecord.
- #to_fasta ⇒ Object
Constructor Details
#initialize(id, descr, seq) ⇒ FastaRecord
Returns a new instance of FastaRecord.
5 6 7 8 9 |
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 5 def initialize id, descr, seq @id = id @descr = descr @seq = seq end |
Instance Attribute Details
#descr ⇒ Object
Returns the value of attribute descr.
3 4 5 |
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 3 def descr @descr end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 3 def id @id end |
#seq ⇒ Object
Returns the value of attribute seq.
3 4 5 |
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 3 def seq @seq end |
Instance Method Details
#to_fasta ⇒ Object
11 12 13 |
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 11 def to_fasta ">"+@descr+"\n"+@seq+"\n" end |