Class: Bio::TMHMM::Report
Overview
TMHMM report parser class.
Instance Attribute Summary (collapse)
-
- (Object) entry_id
readonly
Returns.
-
- (Object) exp_aas_in_tmhs
readonly
Returns.
-
- (Object) exp_first_60aa
readonly
Returns.
-
- (Object) predicted_tmhs
readonly
Returns.
-
- (Object) query_len
(also: #length)
readonly
Returns.
-
- (Object) tmhs
readonly
Returns an Array of Bio::TMHMM::TMH.
-
- (Object) total_prob_of_N_in
readonly
Returns.
Instance Method Summary (collapse)
-
- (Object) helix
Returns an Array of Bio::TMHMM::TMH including only "TMhelix".
-
- (Report) initialize(entry = nil)
constructor
A new instance of Report.
- - (Object) to_s
Constructor Details
- (Report) initialize(entry = nil)
A new instance of Report
85 86 87 88 89 90 91 92 93 94 95 |
# 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 |
Instance Attribute Details
- (Object) entry_id (readonly)
Returns
65 66 67 |
# File 'lib/bio/appl/tmhmm/report.rb', line 65 def entry_id @entry_id end |
- (Object) exp_aas_in_tmhs (readonly)
Returns
74 75 76 |
# File 'lib/bio/appl/tmhmm/report.rb', line 74 def exp_aas_in_tmhs @exp_aas_in_tmhs end |
- (Object) exp_first_60aa (readonly)
Returns
77 78 79 |
# File 'lib/bio/appl/tmhmm/report.rb', line 77 def exp_first_60aa @exp_first_60aa end |
- (Object) predicted_tmhs (readonly)
Returns
71 72 73 |
# File 'lib/bio/appl/tmhmm/report.rb', line 71 def predicted_tmhs @predicted_tmhs end |
- (Object) query_len (readonly) Also known as: length
Returns
68 69 70 |
# File 'lib/bio/appl/tmhmm/report.rb', line 68 def query_len @query_len end |
- (Object) tmhs (readonly)
Returns an Array of Bio::TMHMM::TMH.
62 63 64 |
# File 'lib/bio/appl/tmhmm/report.rb', line 62 def tmhs @tmhs end |
- (Object) total_prob_of_N_in (readonly)
Returns
80 81 82 |
# File 'lib/bio/appl/tmhmm/report.rb', line 80 def total_prob_of_N_in @total_prob_of_N_in end |
Instance Method Details
- (Object) helix
Returns an Array of Bio::TMHMM::TMH including only "TMhelix".
98 99 100 |
# File 'lib/bio/appl/tmhmm/report.rb', line 98 def helix @tmhs.map {|t| t if t.status == 'TMhelix' }.compact end |
- (Object) to_s
103 104 105 106 107 108 109 110 111 112 113 114 |
# 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 |