[Bioperl-l] xyplot glyph problem with previous aggregation

Lincoln Stein lincoln.stein at gmail.com
Thu Apr 10 13:55:06 EDT 2008


Hi Luis,

When you aggregate the atpc 1 features together, you end up with one
feature. Thus @features3 is an array of size 1. The $# operator returns the
index of the last element, which is 0. If @features3 were empty, $#features3
would return -1.

Lincoln

On Thu, Apr 10, 2008 at 11:52 AM, Luis A. M. Quintales <lamq at usal.es> wrote:

> I am not able to add xyplot glyphs to one panel because I have some
> problems with the aggregations.
>
> Using that GFF file:
>
> ##sequence-region chr1 1 5578650
> chr1  atfreq  atpc    1  50   58.8000   .  .  atpc 1
> chr1  atfreq  atpc   51 100   58.4000   .  .  atpc 1
> chr1  atfreq  atpc  101 150   57.6000   .  .  atpc 1
> chr1  atfreq  atpc  151 200   57.8000   .  .  atpc 1
> . . .
>
>
> And this source code for preparing the aggregated features necessary for
> the xyplot glyph:
>
> my $filin  = $ARGV[0];
> my $db = Bio::DB::GFF->new( -dsn => $filin,
>                           -adaptor => 'memory',
>                           -aggregator => 'at{atpc:atfreq}'
>                          );
> my $segment  = $db->segment('chr1');
> my @features1 = $db->features('atpc');
> print "$#features1 \n";
> my @features2 = $segment->features('atpc');
> print "$#features2 \n";
> my @features3 = $db->features('at');
> print "$#features3 \n";
> my @features4 = $segment->features('at');
> print "$#features4 \n";
>
> I obtain:
>
> 111572
> 111572
> 0
> 0
>
> What I am doing wrong with the aggregator?
>
> Many thanks.
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu


More information about the Bioperl-l mailing list