NAME
Prospect::LocalClient -- execute Prospect locally
$Id: LocalClient.pm,v 1.30 2003/11/07 18:42:42 cavs Exp $
SYNOPSIS
my $in = new Bio::SeqIO( -format=> 'Fasta', '-file' => $ARGV[0] );
my $po = new Prospect::Options( seq=>1, svm=>1, global_local=>1,
templates=>['1alu', '1bgc','1eera']);
my $pf = new Prospect::LocalClient( {options=>$po );
while ( my $s = $in->next_seq() ) {
my @threads = $pf->thread( $s );
}
DESCRIPTION
Prospect::LocalClient is runs Prospect locally. It is intended to be used to facilitate high-throughput protein sequence threading and as the server-side component of Prospect::SoapClient, with which it is API compatible.
ROUTINES & METHODS
new()
Name: new()
Purpose: constructor
Arguments: hash reference with following key/value pairs
options => Prospect::Options object (required)
Returns: Prospect::LocalClient
thread()
Name: thread()
Purpose: return a list of Thread objects
Arguments: scalar sequence or Bio::PrimarySeqI-derived object
Returns: list of Prospect::Thread objects
thread_summary()
Name: thread_summary()
Purpose: return a list of ThreadSummary objects
Arguments: Bio::Seq object
Returns: list of rospect2::ThreadSummary objects
xml()
Name: xml()
Purpose: return xml string
Arguments: Bio::Seq object
Returns: string
INTERNAL METHODS & ROUTINES
The following functions are documented for developers' benefit. THESE SHOULD NOT BE CALLED OUTSIDE OF THIS MODULE. YOU'VE BEEN WARNED.
_get_svm_scores()
Name: _get_svm_scores()
Purpose: return a hash of svm scores from a prospect sort file
Arguments: sort filename
Returns: hash
- ::_thread_to_file( Bio::Seq | scalar )
-
Thread one sequence in the Bio::Seq object or the scalar string. The xml ouptut filename is returned. Threading results are cached by sequence for the lifetime of the LocalClient object. See also ::thread.
- ::_thread1( filename )
-
Threads the fasta-formatted sequence in
filename
which is passed directly to prospect. The name of a temporary file which contains the raw xml output is returned. This method will work with multiple sequences infilename
, but other routines in this module will not understand multi-query xml output reliably. Most callers should use thread() instead.
_hasSvmScore()
Name: _hasSvmScore()
Purpose: check whether the prospect xml file already contains a svmScore tag
Arguments: prospect xml file
Returns: 1 (has svm score) or 0 (no svm score)
_output_svm_score()
Name: _output_svm_score()
Purpose: output the svm score in the propsect output file
Arguments: prospect xml file, prospect sort file
Returns: prospect xml file with svm score
_sort1()
Name: _sort1()
Purpose: run sortProspect on threading file
Arguments: prospect xml file
Returns: filename of sortProspect results
- ::_prepare_options()
-
Prepares temporary files based on options (e.g., writes a temporary `tfile') and generates an array of command line options in @{$self->{commandline}}. Args 1 and 2 are input and output respectively and MUST be sprintf'd before use. See thread_1_file().
SEE ALSO
Prospect::Options, Prospect::File, Prospect::Client, Prospect::SoapClient, Prospect::Thread, Prospect::ThreadSummary
http://www.bioinformaticssolutions.com/