[Bioperl-l] Bio::DB::SeqFeature::Segment problem

Lincoln Stein lincoln.stein at gmail.com
Fri May 1 17:33:09 UTC 2009


Hi Jon,

Sounds like your multiple chromosome-1 problems have been cleared up. The
documentation should mention the exception and doesn't. I will fix it.

Lincoln



On Thu, Apr 30, 2009 at 12:40 PM, Jon Flowers <jonathanmflowers at gmail.com>wrote:

>
> Dear colleagues,
>
> I have set up a mySQL database and loaded a GFF3 and fasta file using
> Bio::DB::SeqFeature::Store::GFF3Loader.  Everything appears to be working
> normally except when I attempt to create a Bio::DB::SeqFeature::Segment
> object.
>
> The following works as expected:
>
> my $db = Bio::DB::SeqFeature::Store->new(-adaptor => 'DBI::mysql',
>                                                                 -dsn =>
> 'dbi:mysql:foo',
>                                                                 -user =>
> 'myuser',
>                                                                 -pass =>
> 'mypassword',
>                                                                 -write =>
> '1');
>
> my @features = $db->features(-seq_id=>'chr1',
>                                              -start=>1,
>                                              -end=>10000,
>                                              -types=>['gene']);
>
> However, when I try to create a segment object using either of the two
> following method calls I get an error:
>
> my $segment  = $db->segment('chr1',1=>10000);
>
> my $segment  = $db->segment( -seq_id => 'chr1', -start => '1', -end =>
> '10000');
>
> -------------------------------- EXCEPTION
> ------------------------------------
>
> MSG: segment() called in a scalar context but multiple features match.
> Either call in a list context or narrow your search using the -types or
> -class arguments
>
> STACK Bio::DB::SeqFeature::Store::segment
> /usr/share/perl5/Bio/DB/SeqFeature/Store.pm:1178
> STACK toplevel trial.pl:42
> -------------------------------------------------------
>
> Calling in list context (which is not defined in the documentation)
> produces
> an array of 22 identical scalars = 'chr1:1..10000'.
>
> Any ideas?
>
> Thanks
>
> Jonathan
>
> --
> View this message in context:
> http://www.nabble.com/Bio%3A%3ADB%3A%3ASeqFeature%3A%3ASegment-problem-tp23319982p23319982.html
> Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <Renata.Musa at oicr.on.ca>



More information about the Bioperl-l mailing list