Class: Ms::Fasta::Archive

Inherits:
ExternalArchive
  • Object
show all
Defined in:
lib/ms/fasta/archive.rb

Overview

Provides access to a FASTA file as an ExternalArchive.

Instance Method Summary collapse

Instance Method Details

#reindex(&block) ⇒ Object

Reindexes self to each FASTA entry in io



10
11
12
# File 'lib/ms/fasta/archive.rb', line 10

def reindex(&block)
  reindex_by_sep(nil, :sep_regexp => /\n>/, :sep_length => 1, :entry_follows_sep => true, &block)
end

#str_to_entry(str) ⇒ Object

Returns a Fasta::Entry initialized using str



15
16
17
# File 'lib/ms/fasta/archive.rb', line 15

def str_to_entry(str)
  Entry.parse(str)
end