[Bioperl-l] how to get unigene-cluster with bio-db

Hilmar Lapp hlapp at gmx.net
Tue Mar 11 02:53:47 UTC 2008


Stephan -

what is the result that you are getting? Do you receive an error? Or  
simply nothing?

(BTW note that the object adaptor that you let the query execute will  
determine what you kind of object you get in return. Hence, I'd  
expect your $qres2 to return Bio::ClusterI compliant objects, not  
Bio::PrimarySeqI ones. That is probably not at the root of the  
problem here, though.)

	-hilmar

On Mar 10, 2008, at 12:27 PM, stephan.rosecker wrote:

> Dear list,
>
> I try to understand how to fetch unigene-cluster with help of bio- 
> db and a local biosql-db, but without success.
> I have transfered "Hs.data" with help of "bp_load_seqdatabase.pl".
>
> #!/usr/local/bin/perl -w
>
> use strict;
> use Bio::DB::BioDB;
> use Bio::DB::Query::BioQuery;
>
> my $db = Bio::DB::BioDB->new(
>         -database => 'biosql',
>         -user   => 'postgres',
>         -pass   => 'foo',
>         -dbname   => 'bioseqdb',
>         -host     => 'foo.bar',
>         -port     => 5435,    # optional
>         -driver   => 'Pg'
> );
>
> my $query = Bio::DB::Query::BioQuery->new();
>
> $query->datacollections(
>          ["Bio::PrimarySeqI c::subject",
>          "Bio::PrimarySeqI p::object",
>         "Bio::PrimarySeqI<=>Bio::ClusterI<=>Bio::Ontology::TermI"]);
> $query->where(["p.accession_number = 'Hs.2'"]);
>
> my $adp = $db->get_object_adaptor('Bio::PrimarySeqI');
> my $adp2 = $db->get_object_adaptor('Bio::ClusterI');
> my $qres = $adp->find_by_query($query);
> my $qres2 = $adp2->find_by_query($query);
>
> while(my $pseq = $qres->next_object()) {
>         print $pseq->accession_number,”\n”;
> }
> while(my $pseq = $qres2->next_object()) {
>         print $pseq->accession_number,”\n”;
> }
>
> Maybe this way is wrong.
> Hope you can help me.
>
> stephan
>  _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

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







More information about the Bioperl-l mailing list