Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation Panther
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation::Panther
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation
Synopsis
  # something like this
my $query = new Bio::Seq(-file => $queryfile,
-format => 'Fasta');
my $hmm = Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation::Panther->new ('-query' => $query, '-program' => 'Panther' or '/usr/local/pubseq/bin/Panther', '-database' => 'sf_hmm'); $hmm->workdir ($workdir); $hmm->run; my @results = $hmm->output;
Description
  Blast takes a Bio::Seq (or Bio::PrimarySeq) object and runs Panther.
The resulting output file is parsed to produce a set of Bio::EnsEMBL::FeaturePairs.
Methods
parse_resultsDescriptionCode
run_analysis
No description
Code
Methods description
parse_resultscode    nextTop
 Title    :  parse_results
Usage : $self->parse_results ($filename)
Function : parses program output to give a set of features
Example :
Returns :
Args : filename (optional, can be filename, filehandle or pipe, not implemented)
Throws :
Methods code
parse_resultsdescriptionprevnextTop
sub parse_results {
  my ($self) = @_;

  my $filehandle;
  my $resfile = $self->resultsfile();
  my @fps;
 

    if (-e $resfile) {
	if (-z $self->resultsfile) {  
	    print STDERR "Panther didn't find any hits\n";
	    return; }       
	else {
	    open (CPGOUT, "<$resfile") or $self->throw("Error opening ", $resfile, "\n ");#
} } # example output line:
#R186.4 PTHR10192 MOLYBDOPTERIN BIOSYNTHESIS PROTEIN 3.7e-116 396.7 12-391
#5 PTHR11865 NUCLEAR HORMONE RECEPTOR 3.2e-13 54.8 1-40
#^(\S+)\s+(\S+) \s+ ([A-Z]+\s)+ (\S+) \s+(\S+)\s+ (\S+)-(\S+)/
while (<CPGOUT>) { chomp; next if (/^\/\//); print "$_\n"; if (my ($id, $hid,$description,$evalue, $score, $start, $end) = /^(\S+)\s+(\S+)\s+(.+)?\s+(\S+)\s+(\S+)\s+(\S+)-(\S+)/) { print "matched ($id, $hid,$description,$evalue, $score, $start, $end)\n"; $hid =~ s/:SF\d+//; my $fp= $self->create_protein_feature($start,$end,$score,$id,0,0,$hid,$self->analysis, sprintf("%.3e", $evalue),0); push @fps,$fp; } } close (CPGOUT); $self->output(\@fps); } 1;
}
run_analysisdescriptionprevnextTop
sub run_analysis {
  my ($self) = @_;

  # run program
print STDERR "running ".$self->program." against ".$self->database."\n"; # some of these options require HMMER 2.2g (August 2001)
my @dbfiles = split(/;/,$self->analysis->db_file); print STDERR "FILENAME: ".$self->queryfile."\n"; my $cmd = $self->program .' '. $self->options .' '. '-n '. '-l ' . $dbfiles[0] . ' '. '-i ' . $self->queryfile . ' '. '-H /software/worm/iprscan/bin/binaries/hmmsearch ' . '-B /software/worm/iprscan/bin/binaries/blast/blastall ' . '-T /tmp ' . '-D I -z -E 1e-3 ' . '-o ' . $self->resultsfile; print STDERR "$cmd\n"; $self->throw ("Error running ".$self->program." on ".$self->filename." against ".$dbfiles[0]) unless ((system ($cmd)) == 0);
}
General documentation
CONTACTTop
   Marc Sohrmann: ms2@sanger.ac.uk
APPENDIXTop