[BioSQL-l] Problem with Bio::DB::BioSQL::PrimarySeqAdapter

Roy Chaudhuri roy at colibase.bham.ac.uk
Fri May 27 06:37:57 EDT 2005


> Doesn't look immediately obvious what's going on but one suspicion I 
> have is that the sequence retrieval optimization is playing a role 
> here. The sequence of a db-retrieved entry is actually lazy-loaded, 
> i.e., only on demand. Theoretically, though, truncating or revcom'ing 
> the sequence should provide for the demand ...
> 
> Can you try in your test script to print out $pseq before you truncate 
> and revcom it? I.e.,
> 
> 	my $pseq=$objadap->find_by_query($query)->next_object;
> 	print "\$pseq isa Bio::PrimarySeq\n" if $pseq->isa('Bio::PrimarySeq');
> 	print $out $pseq;
> 	my $ptrunc=$pseq->trunc(100,120);
> 	my $prc=$pseq->revcom;
> 	print $out $ptrunc, $prc;
> 
> Does this yield a different result?

Yes, that works as it should, correctly truncating and reverse
complementing the sequence. Calling $pseq->seq in a void context before
revcom/trunc is useful as a 'silent' workaround.

Thanks.
Roy.

--
Dr. Roy Chaudhuri
Bioinformatics Research Fellow
Division of Immunity and Infection
University of Birmingham, UK

http://colibase.bham.ac.uk


More information about the BioSQL-l mailing list