Class: Bio::TargetP::Report
Overview
A parser and container class for TargetP report.
Constant Summary collapse
- DELIMITER =
Delimiter
"\n \n"
- RS =
Delimiter
DELIMITER
Instance Attribute Summary collapse
-
#cleavage_site_prediction ⇒ Object
readonly
Returns ‘included’ or ‘not included’.
-
#cutoff ⇒ Object
readonly
Returns a Hash of cutoff values.
-
#networks ⇒ Object
readonly
Returns “PLANT” or “NON-PLANT” networks.
-
#prediction ⇒ Object
(also: #pred)
readonly
Returns a Hash of the prediction results.
-
#query_sequences ⇒ Object
readonly
Returns the query sequences.
-
#version ⇒ Object
readonly
Returns the program version.
Instance Method Summary collapse
-
#initialize(str) ⇒ Report
constructor
Sets output report.
-
#loc ⇒ Object
Returns the predicted localization signal: 1.
-
#name ⇒ Object
(also: #entry_id)
Returns the name of query sequence.
-
#query_len ⇒ Object
(also: #length)
Returns length of query sequence.
-
#rc ⇒ Object
Returns RC.
Constructor Details
#initialize(str) ⇒ Report
Sets output report.
63 64 65 66 67 68 69 70 71 |
# File 'lib/bio/appl/targetp/report.rb', line 63 def initialize(str) @version = nil @query_sequences = nil @cleavage_site_prediction = nil @networks = nil @prediction = {} @cutoff = {} parse_entry(str) end |
Instance Attribute Details
#cleavage_site_prediction ⇒ Object (readonly)
Returns ‘included’ or ‘not included’. If the value is ‘included’, Bio::TargetP::Report#prediction contains a valid value.
41 42 43 |
# File 'lib/bio/appl/targetp/report.rb', line 41 def cleavage_site_prediction @cleavage_site_prediction end |
#cutoff ⇒ Object (readonly)
Returns a Hash of cutoff values.
60 61 62 |
# File 'lib/bio/appl/targetp/report.rb', line 60 def cutoff @cutoff end |
#networks ⇒ Object (readonly)
Returns “PLANT” or “NON-PLANT” networks.
44 45 46 |
# File 'lib/bio/appl/targetp/report.rb', line 44 def networks @networks end |
#prediction ⇒ Object (readonly) Also known as: pred
Returns a Hash of the prediction results.
“Loc.”=>“_”, “RC”=>3, “SP”=>0.271,
"other"=>0.844, "mTP"=>0.161, "cTP"=>0.031, "Length"=>640
Keys: Name, Len, SP, mTP, other, Loc, RC Optional key for PLANT networks: cTP Optional key in Cleavage site: TPlen
Use ‘Length’ and ‘Loc.’ instead of ‘Len’ and ‘Loc’ respectively for the version 1.0 report.
57 58 59 |
# File 'lib/bio/appl/targetp/report.rb', line 57 def prediction @prediction end |
#query_sequences ⇒ Object (readonly)
Returns the query sequences.
36 37 38 |
# File 'lib/bio/appl/targetp/report.rb', line 36 def query_sequences @query_sequences end |
#version ⇒ Object (readonly)
Returns the program version.
33 34 35 |
# File 'lib/bio/appl/targetp/report.rb', line 33 def version @version end |
Instance Method Details
#loc ⇒ Object
Returns the predicted localization signal:
-
S (Signal peptide)
-
M (mTP)
-
C (cTP)
-
*
-
_
97 98 99 100 101 102 103 |
# File 'lib/bio/appl/targetp/report.rb', line 97 def loc if @prediction['Loc'] @prediction['Loc'] # version 1.0 else @prediction['Loc.'] # version 1.1 end end |
#name ⇒ Object Also known as: entry_id
Returns the name of query sequence.
76 77 78 |
# File 'lib/bio/appl/targetp/report.rb', line 76 def name @prediction['Name'] end |
#query_len ⇒ Object Also known as: length
Returns length of query sequence.
82 83 84 85 86 87 88 |
# File 'lib/bio/appl/targetp/report.rb', line 82 def query_len if @prediction['Len'] @prediction['Len'] else @prediction['Length'] end end |
#rc ⇒ Object
Returns RC.
106 107 108 |
# File 'lib/bio/appl/targetp/report.rb', line 106 def rc @prediction['RC'] end |