Class: Bio::PSORT::PSORT2

Inherits:
Object show all
Defined in:
lib/bio/appl/psort.rb,
lib/bio/appl/psort/report.rb

Overview

Bio::PSORT::PSORT2

Bio::PSORT::PSORT2 is a wapper class for the original PSORT program.

Example

serv = Bio::PSORT::PSORT2.imsut
serv.title = 'Query_title_splited_by_white space'
serv.exec(seq, false)  # seq.class => String
serv.exec(seq)
report = serv.exec(Bio::FastaFormat.new(seq))
report_raw = serv.exec(Bio::FastaFormat.new(seq), false)

References

  1. Nakai, K. and Horton, P., PSORT: a program for detecting the sorting signals of proteins and predicting their subcellular localization, Trends Biochem. Sci, 24(1) 34-35 (1999).

    PMID:10087920

Defined Under Namespace

Classes: Remote, Report

Constant Summary collapse

SclNames =

Subcellular localization name codes used by PSORT2

{ 
  'csk' => 'cytoskeletal',
  'cyt' => 'cytoplasmic',
  'nuc' => 'nuclear',
  'mit' => 'mitochondrial',
  'ves' => 'vesicles of secretory system',
  'end' => 'endoplasmic reticulum',
  'gol' => 'Golgi',
  'vac' => 'vacuolar',
  'pla' => 'plasma membrane',
  'pox' => 'peroxisomal',
  'exc' => 'extracellular, including cell wall',
  '---' => 'other'
}
Features =

Feature name codes

[
  'psg',  # PSG: PSG score
  'gvh',  # GvH: GvH score
  'alm',  # ALOM: $xmax
  'tms',  # ALOM: $count
  'top',  # MTOP: Charge difference: $mtopscr
  'mit',  # MITDISC: Score: $score
  'mip',  # Gavel: motif at $isite
  'nuc',  # NUCDISC: NLS Score: $score
  'erl',  # KDEL: ($seg|none)
  'erm',  # ER Membrane Retention Signals: ($cseg|none) $scr
  'pox',  # SKL: ($pat|none) $scr
  'px2',  # PTS2: (found|none)              ($#match < 0) ? 0 : ($#match+1);
  'vac',  # VAC: (found|none)               ($#match < 0) ? 0 : ($#match+1);
  'rnp',  # RNA-binding motif: (found|none) ($#match < 0) ? 0 : ($#match+1);
  'act',  # Actinin-type actin-binding motif: (found|none)  $hit
  'caa',  # Prenylation motif: (2|1|0) CaaX,CXC,CC,nil
  'yqr',  # memYQRL: (found|none) $scr
  'tyr',  # Tyrosines in the tail: (none|\S+[,])  
          # 10 * scalar(@ylist) / ($end - $start + 1);
  'leu',  # Dileucine motif in the tail: (none|found) $scr
  'gpi',  # >>> Seem to be GPI anchored
  'myr',  # NMYR: (none|\w) $scr
  'dna',  # checking 63 PROSITE DNA binding motifs:              $hit
  'rib',  # checking 71 PROSITE ribosomal protein motifs:        $hit
  'bac',  # checking 33 PROSITE prokaryotic DNA binding motifs:  $hit
  'm1a',  # $mtype eq '1a'  
  'm1b',  # $mtype eq '1b'
  'm2',   # $mtype eq '2 '
  'mNt',  # $mtype eq 'Nt'
  'm3a',  # $mtype eq '3a' 
  'm3b',  # $mtype eq '3b'  
  'm_',   # $mtype eq '__'  tms == 0
  'ncn',  # NNCN: ($NetOutput[1] > $NetOutput[0]) ? $output : (-$output);
  'lps',  # COIL: $count
  'len'   # $leng
]
FeaturesLong =

Feature name codes (long version).

{
  'psg' => 'PSG',  
  'gvh' => 'GvH',
  'tms' => 'ALOM',
  'alm' => 'ALOM',
  'top' => 'MTOP',
  'mit' => 'MITDISC',
  'mip' => 'Gavel',
  'nuc' => 'NUCDISC',
  'erl' => 'KDEL',
  'erm' => 'ER Membrane Retention Signals',
  'pox' => 'SKL',
  'px2' => 'PTS2', 
  'vac' => 'VAC', 
  'rnp' => 'RNA-binding motif',
  'act' => 'Actinin-type actin-binding motif',
  'caa' => 'Prenylation motif',
  'yqr' => 'memYQRL', 
  'tyr' => 'Tyrosines in the tail',
  'leu' => 'Dileucine motif in the tail',
  'gpi' => '>>> Seems to be GPI anchored',
  'myr' => 'NMYR', 
  'dna' => 'checking 63 PROSITE DNA binding motifs',
  'rib' => 'checking 71 PROSITE ribosomal protein motifs',
  'bac' => 'ochecking 33 PROSITE prokaryotic DNA binding motifs:', 
  'm1a' => '', 
  'm1b' => '', 
  'm2'  => '', 
  'mNt' => '', 
  'm3a' => '', 
  'm3b' => '', 
  'm_'  => '', 
  'ncn' => 'NNCN', 
  'lps' => 'COIL',
  'len' => 'AA'       # length of input sequence
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(driver, origin = 'yeast') ⇒ PSORT2

Sets a server CGI Driver (Bio::PSORT::PSORT2::Remote).


357
358
359
360
361
# File 'lib/bio/appl/psort.rb', line 357

def initialize(driver, origin = 'yeast')
  @serv   = driver
  @origin = origin
  @title  = ''
end

Instance Attribute Details

#originObject

An accessor of the origin argument. Default setting is “yeast''.


349
350
351
# File 'lib/bio/appl/psort.rb', line 349

def origin
  @origin
end

#titleObject

An accessor of the title argument. Default setting is “QUERY''. The value is automatically setted if you use a query in Bio::FastaFormat.


354
355
356
# File 'lib/bio/appl/psort.rb', line 354

def title
  @title
end

Class Method Details

.imsutObject

Returns a PSORT2 CGI Driver object (Bio::PSORT::PSORT2::Remote)

connecting to the IMSUT server.


331
332
333
# File 'lib/bio/appl/psort.rb', line 331

def self.imsut
  self.remote(ServerURI[:IMSUT][:PSORT2])
end

.okazakiObject

Returns a PSORT2 CGI Driver object (Bio::PSORT::PSORT2::Remote) connecting to the NIBB server.


337
338
339
# File 'lib/bio/appl/psort.rb', line 337

def self.okazaki
  self.remote(ServerURI[:Okazaki][:PSORT2])
end

.pekingObject

Returns a PSORT2 CGI Driver object (Bio::PSORT::PSORT2::Remote) connecting to the Peking server.


343
344
345
# File 'lib/bio/appl/psort.rb', line 343

def self.peking
  self.remote(ServerURI[:Peking][:PSORT2])
end

.remote(host, path = nil) ⇒ Object

Returns a PSORT2 CGI Driver object (Bio::PSORT::PSORT2::Remote).

PSORT official hosts:

key      host                     path
-------  -----------------------  --------------------  ---------
IMSUT    psort.ims.u-tokyo.ac.jp  /cgi-bin/runpsort.pl  (default)
Okazaki  psort.nibb.ac.jp         /cgi-bin/runpsort.pl
Peking   srs.pku.edu.cn:8088      /cgi-bin/runpsort.pl

325
326
327
# File 'lib/bio/appl/psort.rb', line 325

def self.remote(host, path = nil)
  self.new(Remote.new(host, path))
end

Instance Method Details

#exec(faa, parsing = true) ⇒ Object

Executes PSORT II prediction and returns Report object (Bio::PSORT::PSORT2::Report) if parsing = true. Returns PSORT II report in text if parsing = false.


367
368
369
370
371
372
373
374
375
376
377
# File 'lib/bio/appl/psort.rb', line 367

def exec(faa, parsing = true)
  if faa.class == Bio::FastaFormat
    @title = faa.entry_id if @title == nil
    @sequence = faa.seq
    @serv.args = {'origin' => @origin, 'title' => @title}
    @serv.parsing = parsing
    return @serv.exec(@sequence)
  else
    self.exec(Bio::FastaFormat.new(faa), parsing)
  end
end