Class: Bio::PTS1
Overview
Bio::PTS1 - A web service client class for PTS1 predictor.
Peroxisomal targeting signal type 1 (PTS1) predictor
Bio::PTS1 class is a client of the PTS1 predictor.
Examples
require 'bio'
sp = Bio::SPTR.new(Bio::Fetch.query("sp", "p53_human"))
faa = sp.seq.to_fasta(sp.entry_id)
pts1 = Bio::PTS1.new
report = pts1.exec_remote(faa)
report.output #=> "<HTML>\n<HEAD><TITLE>PTS1 Prediction Server ..."
report.prediction #=> "Not targeted"
report.cterm #=> "KLMFKTEGPDSD"
report.score #=> "-79.881"
report.fp #=> "67.79%"
report.sppta #=> "-1.110"
report.spptna #=> "-41.937"
report.profile #=> "-36.834"
References
-
The PTS1 predictor mendel.imp.ac.at/pts1/
-
Neuberger G, Maurer-Stroh S, Eisenhaber B, Hartig A, Eisenhaber F. Motif refinement of the peroxisomal targeting signal 1 and evaluation of taxon-specific differences. J Mol Biol. 2003 May 2;328(3):567-79. PMID: 12706717
-
Neuberger G, Maurer-Stroh S, Eisenhaber B, Hartig A, Eisenhaber F. Prediction of peroxisomal targeting signal 1 containing proteins from amino acid sequence. J Mol Biol. 2003 May 2;328(3):581-92. PMID: 12706718
Defined Under Namespace
Classes: Report
Constant Summary collapse
- FUNCTION =
Organism specific parameter value: function names.
{ 'METAZOA-specific' => 1, 'FUNGI-specific' => 2, 'GENERAL' => 3, }
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Output report.
Class Method Summary collapse
-
.new_with_fungi_function ⇒ Object
Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION).
-
.new_with_general_function ⇒ Object
Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION).
-
.new_with_metazoa_function ⇒ Object
Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION).
Instance Method Summary collapse
-
#exec(query) ⇒ Object
Executes the query request and returns result output in Bio::PTS1::Report.
-
#function(func = nil) ⇒ Object
Sets and shows the function parameter.
-
#initialize(func = 'METAZOA-specific') ⇒ PTS1
constructor
Constructs Bio::PTS1 web service client.
Constructor Details
#initialize(func = 'METAZOA-specific') ⇒ PTS1
92 93 94 95 96 |
# File 'lib/bio/appl/pts1.rb', line 92 def initialize(func = 'METAZOA-specific') @uri = "http://mendel.imp.ac.at/jspcgi/cgi-bin/pts1/pts1.cgi" @output = nil @function = function(func) end |
Instance Attribute Details
#output ⇒ Object (readonly)
Output report.
66 67 68 |
# File 'lib/bio/appl/pts1.rb', line 66 def output @output end |
Class Method Details
.new_with_fungi_function ⇒ Object
Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION)
74 75 76 |
# File 'lib/bio/appl/pts1.rb', line 74 def self.new_with_fungi_function self.new('FUNGI-specific') end |
.new_with_general_function ⇒ Object
Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION)
79 80 81 |
# File 'lib/bio/appl/pts1.rb', line 79 def self.new_with_general_function self.new('GENERAL') end |
.new_with_metazoa_function ⇒ Object
Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION)
69 70 71 |
# File 'lib/bio/appl/pts1.rb', line 69 def self. self.new('METAZOA-specific') end |
Instance Method Details
#exec(query) ⇒ Object
141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/bio/appl/pts1.rb', line 141 def exec(query) seq = set_sequence_in_fastaformat(query) @form_data = {'function' => @function.values.join(''), 'sequence' => seq.seq, 'name' => seq.definition } result = Bio::Command.post_form(@uri, @form_data) @output = Report.new(result.body) return @output end |
#function(func = nil) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/bio/appl/pts1.rb', line 113 def function(func = nil) return @function.keys.join('') if func == nil if FUNCTION.values.include?(func) @function = Hash[*FUNCTION.find {|x| x[1] == func}] elsif FUNCTION[func] @function = {func => FUNCTION[func]} else raise ArgumentError, "Invalid argument: #{func}", "Available function names: #{FUNCTION.keys.inspect}" end @function end |