[Bioperl-l] Bio::DB::GFF::Aggregator problem, new wormbase models.

Philip MacMenamin pm66 at nyu.edu
Mon Feb 23 16:06:50 EST 2004


This worked for me:

my $db = new Bio::DB::GFF(-adaptor=>'dbi::mysqlopt',
			  -dsn=>'dbi:mysql:WS118;host=localhost',
			  -user=>$user,
			  -pass=>$pass,
#			  -aggregator => [qw(wormabse_cds{coding_exon,5_UTR,3_UTR/CDS})], # Not 
working 
			  -aggregator => [qw(wormabse_cds{coding_exon:curated})],
			 ) or die();
my $panelSeg = $db->segment(CDS=>$CDS);
if(!$panelSeg)
{
#do something 
}
else
{
  my @features = $panelSeg->features();
  my @UTRs = $searchSeg->features('UTR');
  my @all_transcripts = $searchSeg->features('wormabse_cds');
  $all_transcripts[0]{subfeatures}{UTR} = \@UTRs; ###<<<<<THIS WORKS>>>>>
}

Its not really a nice way to do it, but, it does the job with the new models. 

Thanks for the advice, 

Philip.

On Tuesday 17 February 2004 05:10 pm, you wrote:
> Hi Phillip -
>
> You need to aggregate the separate parts of the CDS.  Create a wormbase_cds
> (or whatever you wish to call it), aggregating the following features using
> the CDS group: coding_exon,5_UTR,3_UTR.
>
> The following stanza should do the trick.
>
> $dbgff = (-adaptor => 'dbi::mysql',
>           -dsn     => 'dbi:mysql:database=your_database;host=your_host',
>           -aggregators => [qw(wormabse_cds{coding_exon,5_UTR,3_UTR/CDS})],
>           -user    => 'your_username',
>           -pass    => 'your_dbgff_pass');
>
> This should do the trick for properly aggregating genes under the new
> WormBase CDS class.
>
> Todd Harris
>


More information about the Bioperl-l mailing list