Class | Bio::PTS1
In: | lib/bio/appl/pts1.rb
Parent: | Object

# 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

### Methods

exec function new new_with_fungi_function new_with_general_function new_with_metazoa_function

### Classes and Modules

Class Bio::PTS1::Report

### Constants

FUNCTION | = | { 'METAZOA-specific' => 1, 'FUNGI-specific' => 2, 'GENERAL' => 3, } |  | Organism specific parameter value: function names.

### Attributes

output | [R] | Output report.

### Public Class methods

new(func = 'METAZOA-specific')

Constructs Bio::PTS1 web service client.

## Examples

      serv_default_metazoa_specific = Bio::PTS1.new
      serv_general_function = Bio::PTS1.new('GENERAL')
      serv_fungi_specific = Bio::PTS1.new(2)    # See Bio::PTS1::FUNCTION.

[Source]

        # File lib/bio/appl/pts1.rb, line 92
    92:   def initialize(func = 'METAZOA-specific')
    93:     @uri = "http://mendel.imp.ac.at/jspcgi/cgi-bin/pts1/pts1.cgi"
    94:     @output = nil
    95:     @function = function(func)
    96:   end

new_with_fungi_function()

Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION[‘FUNGI-specific’])

[Source]

        # File lib/bio/appl/pts1.rb, line 74
    74:   def self.new_with_fungi_function
    75:     self.new('FUNGI-specific')
    76:   end

new_with_general_function()

Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION[‘GENERAL’])

[Source]

        # File lib/bio/appl/pts1.rb, line 79
    79:   def self.new_with_general_function
    80:     self.new('GENERAL')
    81:   end

new_with_metazoa_function()

Short-cut for Bio::PTS1.new(Bio::PTS1::FUNCTION[‘METAZOA-specific’])

[Source]

        # File lib/bio/appl/pts1.rb, line 69
    69:   def self.new_with_metazoa_function
    70:     self.new('METAZOA-specific')
    71:   end

### Public Instance methods

exec(query)

Executes the query request and returns result output in Bio::PTS1::Report. The query argument is available both aSting in fasta format text and aBio::FastaFormat.

## Examples

      require 'bio'
      pts1 = Bio::PTS1.new
      pts1.exec(">title\nKLMFKTEGPDSD")

      pts1.exec(Bio::FastaFormat.new(">title\nKLMFKTEGPDSD"))

[Source]

         # File lib/bio/appl/pts1.rb, line 141
    141:   def exec(query)
    142:     seq = set_sequence_in_fastaformat(query)
    143:
    144:     @form_data = {'function' => @function.values.join(''),
    145:                   'sequence' => seq.seq,
    146:                   'name'     => seq.definition }
    147:
    148:     result = Bio::Command.post_form(@uri, @form_data)
    149:     @output = Report.new(result.body)
    150:
    151:     return @output
    152:   end

function(func = nil)

Sets and shows the function parameter.

Organism specific parameter: function names (Bio::PTS1::FUNTION.keys).

## Examples

     # sets function name parameter.
     serv = Bio::PTS1.new
     serv.function('METAZOA-specific')

     # shows function name parameter.
     serv.function #=> "METAZOA-specific"

[Source]

         # File lib/bio/appl/pts1.rb, line 113
    113:   def function(func = nil)
    114:     return @function.keys.join('') if func == nil
    115:
    116:     if FUNCTION.values.include?(func)
    117:       @function = Hash[*FUNCTION.find {|x| x[1] == func}]
    118:     elsif FUNCTION[func]
    119:       @function = {func => FUNCTION[func]}
    120:     else
    121:       raise ArgumentError,
    122:             "Invalid argument: #{func}",
    123:             "Available function names: #{FUNCTION.keys.inspect}"
    124:     end
    125:     @function
    126:   end

[Validate]