Bioperl-guts: Re: Bioperl: Truely working pre-release of bioperl (fwd)

Ewan Birney birney@sanger.ac.uk
Thu, 12 Nov 1998 16:32:33 +0000 (GMT)


Bug in restriction enzyme due to knock on effect of me chaning
revcom over to sequence object return.

I'll track these down. Just so you know. ;)



[messages about bioperl installation at the sanger centre follow]

Ewan Birney
<birney@sanger.ac.uk>
http://www.sanger.ac.uk/Users/birney/

---------- Forwarded message ----------
Date: Thu, 12 Nov 1998 14:55:34 GMT
From: John Attwood <ja1@sanger.ac.uk>
To: birney@sanger.ac.uk
Cc: ja1@sanger.ac.uk
Subject: Re: Bioperl: Truely working pre-release of bioperl

Hi Ewan,

> 
> Bugger!
> 
> Why don't you give me a single distribution of confirm and I'll
> take a look at it over this week.
> 
> Perhaps I can fix it to the point where you can be persuaded that
> it works ;)
> 

I've not been able to do any of what I was supposed to this morning so
have been playing with bioperl and confirm.  I now have it compiling and
running and am at the stage where I need to find out why the results are
different with the new version.

One nasty, hard-to-spot difference between the Preseq and Seq is that
the revcom() method now returns a Seq object whereas before it returned
a string.  I had to change my code from $string . Seqobj->revcom to
$string . Seqobj->revcom->str to get rid of warning messages about bad 
alphabets in sequence objects constructed downstream of this call.

What's worst about it is that the docs for revcom() still say that it
returns a string, even though it clearly doesn't:-

 Title       : revcom
 Usage       : $reverse_complemented_seq = $mySeq->revcom;
 Function    : Returns a char string containing the reverse
             : complement of a nucleotide object sequence
[snip]

  $out = Bio::Seq->new(-"id"=>"$id.revcom", -"seq"=>$revseq, -"type"=>'Dna' ); 
  return $out;
}

However, it seems that the RestrictionEnzyme->cut_seq() method, which
was my only reason for using Bioperl in the first place, has not been
altered to take account of this.  For example, it contains:-

    my $seq = $reSeq->str;
    $seq =~ s/N/\./g;
    $seq =~ s/R/\[AG\]/g;
    $seq =~ s/Y/\[CT\]/g;
    $seq =~ s/S/\[GC\]/g;
    $seq =~ s/W/\[AT\]/g;
    if(!$self->palindromic) {
        my $revseq .= $reSeq->revcom;  <------------------- 
        $revseq =~ s/N/\./g;


Here, the result of a call to revcom() is being treated as a string and
concatenated to $revseq (I don't know why concatenation rather than
assignment).

I don't know whether this is cause of the 86 6-base fragments which the
new version is creating along with the correct set of fragments, but
suspect it might be.  Has anyone actually tested cut_seq in this new
release?

Hope this helps,
Regards,

John.

=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl-guts.html
====================================================================