
Bio::Tools::Analysis::Protein::HNN - a wrapper around HNN protein secondary structure prediction server

use Bio::Tools::Analysis::Protein::HNN;
#get a Bio::Seq or Bio::PrimarySeq
use Bio::PrimarySeq;
my $seq = new Bio::PrimarySeq
(-seq=>'IKLCVHHJHJHJHJHJHJHNLAILAKAHLIELALAL',
-primary_id=>'test'); # a Bio::PrimarySeqI object
my $hnn = Bio::Tools::Analysis::Protein::HNN->new (-seq=>$seq);
$hnn->run;
print $hnn->result;# #raw text to standard error

A module to remotely retrieve predictions of protein secondary structure. Each residue in the protein receives a score representing the likelihood of existing in each of three different states (helix, coil or sheet), e.g.:
my $analysis_object = Bio::Tools::SimpleAnalysis::Protein::HNN->new
(-seq => $seq);
creates a new object
$analysis_object->run;
submits the query to the server and obtains raw text output.
Given an amino acid sequence the results can be obtained in 4 formats, determined by the argument to the result method
my $rawdata = $analysis_object->result;
my $data_ref = $analysis_object->result('parsed');
print "score for helix at residue 2 is $data_ref->[1]{'helix'}\n";
print "predicted struc at residue 2 is $data_ref->[1]{'struc}\n";
my @fts = $analysis_object->result(Bio::SeqFeatureI);
for my $ft (@fts) {
print " From ", $ft->start, " to ",$ft->end, " struc: " ,
($ft->each_tag_value('type'))[0] ,"\n";
}
This is a Bio::Seq object that can also hold data about each residue in the sequence In this case, the sequence can be associated with a single array of HNN prediction scores. e.g.,
my $meta_sequence = $analysis_object->result('meta');
print "helix scores from residues 10-20 are ",
$meta_sequence->named_submeta_text("HNN_helix",10,20), "\n";
Meta sequence default names are : HNN_helix, HNN_sheet, HNN_coil, HNN_struc, representing the scores for each residue.
Many methods common to all analyses are inherited from Bio::Tools::Analysis::SimpleAnalysisBase.

Bio::SimpleAnalysisI, Bio::Tools::Analysis::SimpleAnalysisBase, Bio::Seq::Meta::Array, Bio::WebAgent

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion http://bio.perl.org/MailList.html - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via email or the web:
bioperl-bugs@bio.perl.org http://bugzilla.bioperl.org/

Richard Adams, Richard.Adams@ed.ac.uk,

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
NAme : result Usage : $job->result (...) Returns : a result created by running an analysis Args : see keys of $INPUT_SPEC
The method returns a result of an executed job. If the job was terminated by an error the result may contain an error message instead of the real data.
This implementation returns differently processed data depending on argument:
Returns the raw ASCII data stream but without HTML tags
The argument string defines the type of bioperl objects returned in an array. The objects are Bio::SeqFeature::Generic. Feature primary tag is "2ary". Feature tags are "type" (which can be helix, sheet or coil) "method" (HNN)
Array of hash references of scores/structure assignations { helix =>, sheet => , coil => , struc=>}.
A Bio::Seq::Meta::Array object. Scores can be accessed using methods from this class. Meta sequence names are HNN_helix, HNN_sheet, HNN_coil, HNN_struc.