Class: FastaPairedReader

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

Overview

FASTA paired reader keeps track of two FASTA files containing matching NT and AA sequences.

Instance Method Summary collapse

Constructor Details

#initialize(ntfn, aafn, opts = {:regex => '(\S+)'}) ⇒ FastaPairedReader

Returns a new instance of FastaPairedReader.



7
8
9
10
# File 'lib/bigbio/db/fasta/fastapairedreader.rb', line 7

def initialize ntfn, aafn, opts={:regex => '(\S+)'}
  @nt = FastaReader.new(ntfn, opts)
  @aa = FastaReader.new(aafn, opts)
end

Instance Method Details

#get(id) ⇒ Object

return a NT+AA pair



13
14
15
16
17
# File 'lib/bigbio/db/fasta/fastapairedreader.rb', line 13

def get id
  nt = @nt.get(id)
  aa = @aa.get(id)
  FastaPairedRecord.new(nt, aa)
end