Class: Fastq

Inherits:
Record show all
Defined in:
lib/dna.rb

Overview

Fastq record

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Record

#length

Constructor Details

#initialize(args = {}) ⇒ Fastq

Returns a new instance of Fastq.



78
79
80
81
82
# File 'lib/dna.rb', line 78

def initialize(args={})
  @name = args[:name]
  @sequence = args[:sequence]
  @quality = args[:quality]
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



76
77
78
# File 'lib/dna.rb', line 76

def format
  @format
end

#nameObject

Returns the value of attribute name.



76
77
78
# File 'lib/dna.rb', line 76

def name
  @name
end

#qualityObject

Returns the value of attribute quality.



76
77
78
# File 'lib/dna.rb', line 76

def quality
  @quality
end

#sequenceObject

Returns the value of attribute sequence.



76
77
78
# File 'lib/dna.rb', line 76

def sequence
  @sequence
end

Instance Method Details

#to_sObject



84
85
86
# File 'lib/dna.rb', line 84

def to_s
  "@#{@name}\n#{@sequence}\n+#{@name}\n#{@quality}"
end