[Bioperl-l] Multiple gene segment problem
Lincoln Stein
lstein at cshl.edu
Sun Mar 12 16:27:31 UTC 2006
There may be several genes with the same name. Call segment() in a list
context to get them all.
Lincoln
On Saturday 11 March 2006 01:05, Marco Blanchette wrote:
> Dear all--
>
> One more unusual behavior from the latest GadFly gff3 database loaded into
> mySQL... I had been following Lincoln Stein advice as to how populate a
> Bio::DB::GFF mySQL database with GadFly. Everything seemed to work nicely
> but somehow, while calling for gene segment based on CG ids, I hit a CG
> with more than one assignment as in
>
> #!/usr/bin/perl
>
> use strict;
> use Bio::DB::GFF;
>
> my $agg1 = Bio::DB::GFF::Aggregator->new( -method => 'pre_mRNA',
> -sub_parts =>
> ['exon','five_prime_UTR','three_prime_UTR'],
> );
>
> my $dmdb = Bio::DB::GFF->new( -adaptor => 'dbi::mysql',
> -dsn =>
> 'dbi:mysql:database=dmel_421;host=riolab.net', -user => 'guest',
> -aggregators=> [$agg1],
> );
>
> my @hits = ('CG2086', 'CG17894', 'CG32912');
>
> for my $gene (@hits){
> my $tg = $dmdb->segment(-name => $gene);
> print "$gene is ", $tg->length, " nt long\n";
> }
>
> When I tried to get the segment for gene CG32912, I get the following:
>
> ------------- EXCEPTION -------------
> MSG: multiple segment exception
> STACK Bio::DB::GFF::_multiple_return_args
> /Library/Perl/5.8.6/Bio/DB/GFF.pm:953
> STACK Bio::DB::GFF::segment /Library/Perl/5.8.6/Bio/DB/GFF.pm:938
> STACK toplevel test.pl:19
>
> --------------------------------------
>
> Any clue??? Any fix???
>
> ______________________________
> Marco Blanchette, Ph.D.
>
> mblanche at uclink.berkeley.edu
>
> Donald C. Rio's lab
> Department of Molecular and Cell Biology
> 16 Barker Hall
> University of California
> Berkeley, CA 94720-3204
>
> Tel: (510) 642-1084
> Cell: (510) 847-0996
> Fax: (510) 642-6062
--
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu (516 367-5008)
More information about the Bioperl-l
mailing list