Class: FastaPairedWriter
- Inherits:
-
Object
- Object
- FastaPairedWriter
- 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
- #close ⇒ Object
-
#initialize(ntfn, aafn) ⇒ FastaPairedWriter
constructor
A new instance of FastaPairedWriter.
- #write(rec) ⇒ Object
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
#close ⇒ Object
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 |