Class: Ms::Select::Fasta
- Inherits:
-
Tap::Task
- Object
- Tap::Task
- Ms::Select::Fasta
- Defined in:
- lib/ms/select/fasta.rb
Overview
:startdoc::task selects entries from a fasta file
Load the selected entries from a fasta file. Entries are returned as an array and by default as Ms::Fasta::Entry objects.
Instance Method Summary collapse
Instance Method Details
#process(fasta_file) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ms/select/fasta.rb', line 15 def process(fasta_file) Ms::Fasta::Archive.open(fasta_file) do |archive| entries = archive[range] # totally wasteful... ExternalArchive needs # a way to read a selection of string without # conversion to entries. # watch (http://bahuvrihi.lighthouseapp.com/projects/10590-external/tickets/7-for-strings) entries.collect! {|entry| entry.to_s } if fasta entries end end |