class Bio::TMHMM::Report

TMHMM report parser class.

Attributes

entry_id[R]

Returns

exp_aas_in_tmhs[R]

Returns

exp_first_60aa[R]

Returns

length[R]

Returns

predicted_tmhs[R]

Returns

query_len[R]

Returns

tmhs[R]

Returns an Array of Bio::TMHMM::TMH.

total_prob_of_N_in[R]

Returns

Public Class Methods

new(entry = nil) click to toggle source
# File lib/bio/appl/tmhmm/report.rb, line 85
def initialize(entry = nil)
  begin
    str = entry.to_str
  rescue NoMethodError
  end
  if str then
    entry = str.enum_for(:each_line)
  end
  parse_header(entry)
  @tmhs = parse_tmhs(entry)
end

Public Instance Methods

helix() click to toggle source

Returns an Array of Bio::TMHMM::TMH including only “TMhelix”.

# File lib/bio/appl/tmhmm/report.rb, line 98
def helix
  @tmhs.map {|t| t if t.status == 'TMhelix' }.compact
end
to_s() click to toggle source
# File lib/bio/appl/tmhmm/report.rb, line 103
def to_s
  [
    [
      ["Length:",                    @query_len],
      ["Number of predicted TMHs:",  @predicted_tmhs],
      ["Exp number of AAs in THMs:", @exp_aas_in_tmhs],
      ["Exp number, first 60 AAs:",  @exp_first_60aa],
      ["Total prob of N-in:",        @total_prob_of_N_in]
    ].map {|e| "\# " + [@entry_id, e].flatten.join("\t") },
    tmhs.map {|ent| ent.to_s }
  ].flatten.join("\n")
end