Class: Fastq

Inherits:
Record show all
Defined in:
lib/dna/parsers/fastq.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.



34
35
36
37
38
# File 'lib/dna/parsers/fastq.rb', line 34

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

Instance Attribute Details

#formatObject

Returns the value of attribute format.



32
33
34
# File 'lib/dna/parsers/fastq.rb', line 32

def format
  @format
end

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/dna/parsers/fastq.rb', line 32

def name
  @name
end

#qualityObject

Returns the value of attribute quality.



32
33
34
# File 'lib/dna/parsers/fastq.rb', line 32

def quality
  @quality
end

#sequenceObject

Returns the value of attribute sequence.



32
33
34
# File 'lib/dna/parsers/fastq.rb', line 32

def sequence
  @sequence
end

Instance Method Details

#to_sObject



40
41
42
# File 'lib/dna/parsers/fastq.rb', line 40

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