[Bioperl-l] Bio::DB::GFF problem
Matthias Wahl
matthias.wahl at gsf.de
Wed Sep 10 17:58:20 EDT 2003
Hi Lincoln,
Thank you very much for your input. The $gff_db->segment call now works
fine.
However, I am still not able to generate an xyplot. Using the following
GFF file:
1 chromosome Component 1 195869683 . . .
Sequence "1"
1 EnsEMBL gene_density 1 200000 0 . .
gene_density "1.density"
1 EnsEMBL gene_density 200001 400000 0 . .
gene_density "1.density"
1 EnsEMBL gene_density 400001 600000 0 . .
gene_density "1.density"
1 EnsEMBL gene_density 600001 800000 0 . .
gene_density "1.density"
1 EnsEMBL gene_density 800001 1000000 0 . .
gene_density "1.density"
1 EnsEMBL gene_density 1000001 1200000 0 . .
gene_density "1.density"
...
I tried to aggregate all gene_density features
my $aggregator = Bio::DB::GFF::Aggregator->new(-method => 'density'
-sub_parts => 'gene_density');
my $gff_db = Bio::DB::GFF->new(-adaptor =>'dbi::mysqlopt',
-dsn=>'dbi:mysql:Mus_musculus_GFF',
-user =>
'XXXXX',
-pass => 'XXXXX,
-aggregator
=> $aggregator,
);
my $gene_density = $gff_db->segment($chromosome_name) or die "Can not
retrieve GFF segment: ".$gff_db->error;
my @features = $gene_density->features('gene_density');
This all works fine. But when I try to draw a xyplot
$picture->add_track(\@features,
-glyph => 'xyplot');
I end up with bars in my image, but no plot!
Could you by chance tell me what I am doing wrong?
Many thanks
Matthias
Lincoln Stein wrote:
>Hi,
>
>I'm catching up on my bioperl mail after being on vacation for August. The
>problem is that you need an entry for the whole chromosome because the
>segment() call needs to retrieve it in order to get the length. Something
>like this will do the trick:
>
>1 EnsEMBL chromosome 1 1502911 . . . Chromosome 1
>
>Lincoln
>
>On Wednesday 13 August 2003 07:02 pm, Matthias Wahl wrote:
>
>
>>Hi all!
>>
>>I have trouble in using Bio::DB::GFF with the following code:
>>
>>my $aggregator = Bio::DB::GFF::Aggregator->new(-method => 'gene_density'
>> -sub_parts =>
>>'EnsEMBL:gene_density');
>>
>>my $gff_db = Bio::DB::GFF->new(-adaptor =>'dbi::mysqlopt',
>> -dsn=>'dbi:mysql:Mus_musculus_GFF',
>> -user => 'xxxxx',
>> -pass => 'xxxxx',
>> -aggregator => $aggregator
>> );
>>
>>
>>Calling
>>
>>$gff_db->segment(-class=>'Chromosome',
>> -value=>'1');
>>
>>always returns undef (whatever arguments I use)!
>>The database has been generated by loading a GFF file of the following
>>format:
>>
>>1 EnsEMBL gene_density 1000001 2000000 0
>>Chromosome 1
>>
>>1 EnsEMBL gene_density 2000001 3000000 0
>>Chromosome 1
>>
>>1 EnsEMBL gene_density 3000001 4000000 1
>>Chromosome 1
>>
>>1 EnsEMBL gene_density 4000001 5000000 12
>>Chromosome 1
>>
>>1 EnsEMBL gene_density 5000001 6000000 4
>>Chromosome 1
>>
>>with load_gff.PLS (columns are tab-seperated, the 9th column consists of
>>'Chromosome' and name, seperated by space), both with and without the
>>associated sequence file.
>>
>>Calling
>>
>>$gff_db->features()
>>
>>works fine. But I need aggregated features for generating a
>>Bio::Graphics xyplot (to plot the gene density for a particular
>>chromosome).
>>
>>Many thanks,
>>
>>Matthias
>>
>>
>
>
>
--
Matthias Wahl
GSF-National Research Center for Environment and Health
Institute of Developmental Genetics
Ingolstaedter Landstrasse 1
D-85764 Neuherberg
Germany
TEL: ++49 89 3187-4117,-2638
FAX: ++49 89 3187-3099
E-mail: matthias.wahl at gsf.de
WWW: http://www.gsf.de/idg
More information about the Bioperl-l
mailing list