Class: FastaRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/bigbio/db/fasta/fastarecord.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descrObject

Returns the value of attribute descr.



3
4
5
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 3

def descr
  @descr
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 3

def id
  @id
end

#seqObject

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_fastaObject



11
12
13
# File 'lib/bigbio/db/fasta/fastarecord.rb', line 11

def to_fasta
  ">"+@descr+"\n"+@seq+"\n"
end