Class: FastaPairedWriter

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

Overview

Paired FASTA writer (tracks matching NT and AA sequences in two FASTA files)

Instance Method Summary collapse

Constructor Details

#initialize(ntfn, aafn) ⇒ FastaPairedWriter

Returns a new instance of FastaPairedWriter.



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

def initialize ntfn, aafn
  @nt = FastaWriter.new(ntfn)
  @aa = FastaWriter.new(aafn)
end

Instance Method Details

#closeObject



17
18
19
20
# File 'lib/bigbio/db/fasta/fastapairedwriter.rb', line 17

def close
  @nt.close
  @aa.close
end

#write(rec) ⇒ Object



12
13
14
15
# File 'lib/bigbio/db/fasta/fastapairedwriter.rb', line 12

def write rec
  @nt.write rec.nt
  @aa.write rec.aa
end