[BioSQL-l] SeqFeature scores

Hilmar Lapp hlapp at gmx.net
Mon Oct 13 20:03:32 UTC 2008


Hi Mark, this was a known bug at some point. In fact, I can't swear  
that it was solved, so if you are running the latest bioperl-db  
version then I think it hasn't been. Can you confirm?

	-hilmar

On Oct 13, 2008, at 2:29 PM, Mark Johnson wrote:

> I just noticed that instances of Bio::SeqFeature::Generic
> round-tripped through BioSQL (via bioperl-db) seem to be loosing their
> scores.
>
> Stored thusly:
>
> my $dbadp = Bio::DB::BioDB->new(
>                                -database => 'biosql',
>                                -user        => $user,
>                                -pass        => $pass,
>                                -dbname   => $oracle_instance,
>                                -driver       => 'Oracle'
>                            );
>
> my $adp = $dbadp->get_object_adaptor("Bio::SeqI");
>
> my $seq = Bio::Seq->new(
>                        -id               => 'DEBUG001',
>                        -accession_number => 'DBG001',
>                        -desc             => 'Debug Sequence',
>                        -seq              => 'GATTACA',
>                        -namespace        => 'DEBUG',
>                       );
>
> my $feature = Bio::SeqFeature::Generic->new(
>                                            -seq_id           =>  
> 'DEBUG001',
>                                            -display_name     =>  
> 'FEAT0001',
>                                            -primary          =>  
> 'debug',
>                                            -source           =>  
> 'mjohnson',
>                                            -start            => 1,
>                                            -end              => 1000,
>                                            -strand           => 1,
>                                            -score            => 100
>                                           );
>
> $seq->add_SeqFeature($feature);
>
> my $pseq = $dbadp->create_persistent($seq);
>
> $pseq->store();
> $adp->commit();
>
> Fetched thusly:
>
> my $dbadp = Bio::DB::BioDB->new(
>                                -database => 'biosql',
>                                -user        => $user,
>                                -pass        => $pass,
>                                -dbname   => $oracle_instance,
>                                -driver       => 'Oracle'
>                            );
>
> my $adp = $dbadp->get_object_adaptor("Bio::SeqI");
>
> my $query = Bio::DB::Query::BioQuery->new();
>
> $query->datacollections([
>                         "Bio::PrimarySeqI s",
>                        ]);
>
> $query->where(["s.display_id = 'DEBUG001'"]);
>
> my $result = $adp->find_by_query($query);
>
> while (my $seq = $result->next_object()) {
>
>    my @features = $seq->get_SeqFeatures();
>
>    foreach my $feature (@features) {
>
>        print join(
>                   "\t",
>                   $feature->display_name(),
>                   $feature->score()
>                  ), "\n";
>
>    }
>
> }
>
> It seems that $feature->score() is returning undef.
>
> I foresee three possibilities, in order of decreasing liklihood:
>
> 1) I'm doing something dumb
> 2) I'm expecting the wrong behaviour
> 3) I'm seeing some kind of odd bug
>
> I'm not opposed to spending some time in the debugger if it's 3, but I
> think 1 or 2 is far more likely.
>
> Comments/advice/rotten vegetables?
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biosql-l

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the BioSQL-l mailing list