[BioSQL-l] Query Problem.

Marc Logghe Marc.Logghe at devgen.com
Tue Feb 17 11:23:50 EST 2004


Hi,
I was not able to figure it out completely, but found a fix.
In Bio::DB::BioSQL::BiosequenceAdaptor the marked (#ml) line was added:

sub get_persistent_slot_values {
    my ($self,$obj,$fkobjs) = @_;
    my @vals;
    if($obj->isa("Bio::Seq::RichSeqI")) {
        @vals = ($obj->seq_version());
    } else {
        @vals = (undef);
    }
#ml
    $obj->seq_has_changed(1) if $obj->length > 4000;

    push(@vals,
         $obj->length(),
         $obj->alphabet(),
         $obj->seq_has_changed() ? $obj->seq() : undef);
    return \@vals;
}

This forces an 'update' of the sequence if it is larger than 4000 bp.

> -----Original Message-----
> From: Marc Logghe 
> Sent: dinsdag 17 februari 2004 11:01
> To: biosql-l at open-bio.org
> Subject: RE: [BioSQL-l] Query Problem.
> 
> 
> Hi,
> I have been trying to track down a nasty bug, but failed :-( 
> Sorry, Hilmar.
> A biosequence containing more than 4000 nt is fine. No 
> problem in loading that.
> A colleague of mine (FredericP) found out that as soon as you 
> add a feature to the corresponding bioentry later, and you do 
> an update (store+commit) your biosequence ends up truncated (4000).
> Hoped that  
> Bio::DB::BioSQL::Oracle::BiosequenceAdaptorDriver::get_sth 
> had to do something with it.
> It appears that a different sth is chosen depending on e.g. 
> the field size (_upd_sth2 if length > 4000). I tried to force 
> this by changing the line "grep { $_ && (length($_) > 4000);"
> to "grep { $_ && (length($_) > 4000 || $_ > 4000);" but that 
> was even worse: seq field in biosequence was null.
> Anyhow, the sequence should not have been updated after all, 
> cos it was not changed.
> Any clues ?
> Thanks,
> Marc
> 



More information about the BioSQL-l mailing list