Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation Superfamily_wormbase
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
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
No synopsis!
Description
No description!
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 $resfile) {  
	print STDERR "Superfamily didn't find any hits\n";
	return; 
      } else {
	open (CPGOUT, "<$resfile") or $self->throw("Error opening ", $resfile, "\n "); # 
} } # example output lines:
#R186.4 63882 0019507 9 181 2.6e-37 msssgllkPATLDDVFQKLEDLCKLFpPQEKTVNVTSLkTGRILAEDIITEYDIPAQRTSIVDGFAIIVNQLGTKREIVGLSTAVTPYNAELISNECVRITIGGVVPDGADTVVPIENVALlkEEKCIEVLRKPKEGDNIREVGSEAKTGEILLKDGHHLDTMSITLLHALGISQVEIYKKprvcvlsigsdlnsnkmygsfnrsqllelfqsqgftaidagsstehiteveekirtaasfacvlvtvggaqvirevaktlkfkfeiqdvdstpgnftvstgkidetpvvlsifpeyhvsswiganlfvspilramegqnsetshrfkaeltqpisktsetrflrarsevskgnlistplgcedifgansilevksntcfsagdvvdlrfa Molybdenum cofactor biosynthesis protein MoeA, N-terminal and linker domains
#//
#R186.4 53218 0017938 180 353 3.9e-14 msssgllkpatlddvfqkledlcklfppqektvnvtslktgrilaediiteydipaqrtsivdgfaiivnqlgtkreivglstavtpynaelisnecvritiggvvpdgadtvvpienvallkeekcievlrkpkegdnirevgseaktgeillkdghhldtmsitllhalgisqveiyKKPRVCVLSIGSDLNSNKMYgSFNRSQLLELFQSQGFTAIDAGSSTEHITEVEEKIRTAASFACVLVTVGGAQVIREVAKTLKFKFEIQDVDSTPGNFTVSTGKIDetPVVLSIFPEYHVSSWIGANLFVSPILRAMEGQNSETSHRFKAELTQPISKTSETRFLRARSEVSKGnlistplgcedifgansilevksntcfsagdvvdlrfa Molybdenum cofactor biosynthesis proteins
#//
my $id; while (<CPGOUT>) { chomp; next if (/^\/\//); print "$_\n"; if (my ($id, $hid, $start, $end, $evalue) = /^(\S+)\s+(\S+)\s+\S+\s+(\d+)\s+(\d+)\s+(\S+)/) { print "matched\n"; my $score = 0; my $hstart = 0; my $hend = 0; my $hid = "SSF$hid"; my $percentIdentity = 0; $evalue *= 1; # force evalue to be a float not a string
print "output= $start, $end, $score, $id, $hstart, $hend, $hid, $self->analysis, $evalue, $percentIdentity\n"; my $fp= $self->create_protein_feature($start, $end, $score, $id, $hstart, $hend, $hid, $self->analysis, $evalue, $percentIdentity); push @fps, $fp; } } close (CPGOUT); $self->output(\@fps); for ( @fps ) { print "value : " . $_->p_value() . "\n" ; } } 1;
}
run_analysisdescriptionprevnextTop
sub run_analysis {
    my ($self) = @_;

    # run program
print STDERR "running ".$self->program." against ".$self->queryfile."\n"; print STDERR "FILENAME: ".$self->queryfile."\n"; my $cmd = $self->program .' '. $self->analysis->parameters .' '. '-i ' . $self->queryfile.' '. '-o ' . $self->resultsfile; print STDERR "$cmd\n"; $self->throw ("Error running Superfamily_wormbase ".$self->program." on ".$self->filename) unless ((system ($cmd)) == 0);
}
General documentation
run_programTop
 Title    : run_program
Usage : $self->program
Function : makes the system call to program
Example :
Returns :
Args :
Throws :