class Phobius::Index

note: to implement some of the TransmembraneIndex features, the update_aaseq method must be called!

Public Class Methods

new(file) click to toggle source

will update_aaseq if given a fasta_obj

# File lib/transmembrane/phobius.rb, line 18
def initialize(file)
  Phobius.default_index(file, self)
end

Public Instance Methods

reference_to_key(reference) click to toggle source

we need to match whatever function phobius uses to generate identifiers if we want derivative processes to be fast and accurate

# 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