[Bioperl-l] seq truncation by Bio::Tools::Run::Signalp

Marc Logghe Marc.Logghe at devgen.com
Wed May 26 09:39:37 EDT 2004


Hi,
I don't know what your experience is with Bio::Tools::Run::Signalp, but I was feeling a little uncomfortable about the current behaviour of this package. The issue is that when you do:
my @signals = $factory->run($seq)
your sequence gets truncated to 50 aa !!! 
AFAIK, one expects of Bio::Tools::Run::* that your seq object remains intact and that you only obtain your returned features, no ?
Anyhow, this behaviour can be fixed with the patch below. Basically, it passes the '-trunc 50' parameter to the signalp executable, which has the same effect as first truncating your query seq to 50 aa.
HTH, 
Marc

*** /usr/lib/perl5/site_perl/5.6.1/Bio/Tools/Run/Signalp.pm	Wed May 26 15:21:55 2004
--- Signalp.pm 	Wed May 26 13:20:23 2004
*************** sub run {
*** 179,184 ****
--- 179,190 ----
              $self->throw("cannot use filehandle");
          } 
  
+   #first 50 aa is enough for signalp
+ 	if ($seq->length>50){
+ 
+ 	    my $sub_seq = $seq->subseq(1, 50);
+ 	    $seq->seq($sub_seq);
+ 	}
  	my $infile1 = $self->_writeSeqFile($seq);
  
  	$self->_input($infile1);
*************** sub run {
*** 191,197 ****
--- 197,207 ----
  	my $in  = Bio::SeqIO->new(-file => $seq, '-format' =>'fasta');
  	my $infile1;  
  
+   #first 50 aa is enough for signalp
  	while ( my $tmpseq = $in->next_seq() ) {
+ 
+ 	    my $sub_seq = $tmpseq->length > 50 ? $tmpseq->subseq(1,50) : $tmpseq->seq;
+ 	    $tmpseq->seq($sub_seq);
  	    $infile1 = $self->_writeSeqFile($tmpseq);  
  	}
  
*************** sub _run {
*** 233,239 ****
       my ($self)= @_;
       
       my ($tfh1,$outfile) = $self->io->tempfile(-dir=>$self->tempdir());
!      my $str =$self->executable." -t euk -trunc 50 ".$self->{'input'}." > ".$outfile;
       my $status = system($str);
       $self->throw( "Signalp call ($str) crashed: $? \n") unless $status==0;
       
--- 243,249 ----
       my ($self)= @_;
       
       my ($tfh1,$outfile) = $self->io->tempfile(-dir=>$self->tempdir());
!      my $str =$self->executable." -t euk ".$self->{'input'}." > ".$outfile;
       my $status = system($str);
       $self->throw( "Signalp call ($str) crashed: $? \n") unless $status==0;

***********************************************************
Marc Logghe, Ph.D.
Senior Scientist
Scientific Computing Group
Devgen nv
Technologiepark 9
As of March 1st, 2004 : Technologiepark 30
B - 9052 Ghent-Zwijnaarde
Belgium
Tel: +32 9 324 24 88
Fax: +32 9 324 24 25

> **** DISCLAIMER ********************************************************** 
> "This e-mail and any attachments thereto may contain information 
> which is confidential and/or protected by intellectual property 
> rights and are intended for the sole use of the recipient(s) named above. 
> Any use of the information contained herein (including, but not limited to, 
> total or partial reproduction, communication or distribution in any form) 
> by persons other than the designated recipient(s) is prohibited. 
> If you have received this e-mail in error, please notify the sender either 
> by telephone or by e-mail and delete the material from any computer. 
> Thank you for your cooperation."
> 



More information about the Bioperl-l mailing list