Class: Phobius::Index
- Includes:
- TransmembraneIndex
- Defined in:
- lib/transmembrane/phobius.rb
Overview
note: to implement some of the TransmembraneIndex features, the update_aaseq method must be called!
Instance Method Summary collapse
-
#initialize(file) ⇒ Index
constructor
will update_aaseq if given a fasta_obj.
-
#reference_to_key(reference) ⇒ Object
we need to match whatever function phobius uses to generate identifiers if we want derivative processes to be fast and accurate.
Methods included from TransmembraneIndex
#avg_overlap, filetype, new, #num_certain_index, #num_overlapping_chars, #num_transmem_aa
Constructor Details
#initialize(file) ⇒ Index
will update_aaseq if given a fasta_obj
18 19 20 |
# File 'lib/transmembrane/phobius.rb', line 18 def initialize(file) Phobius.default_index(file, self) end |
Instance Method Details
#reference_to_key(reference) ⇒ Object
we need to match whatever function phobius uses to generate identifiers if we want derivative processes to be fast and accurate
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/transmembrane/phobius.rb', line 24 def reference_to_key(reference) if reference if reference.size > 0 index = reference.index(' ') string = if index reference[0...index] else reference end string.gsub('"','') else '' end else nil end end |