[Bioperl-l] DB::GFF

Filipe Garrett fgarret at ub.edu
Mon Sep 18 14:48:40 UTC 2006


Hi all,

When trying to fetch some GFF features from a GFF DB there are some 
options that do not seem to be working well.

In Flybase, on the - strand features, the start is bigger than the stop 
positions (they assume the start of the feature rather than the start of 
the sequence).

I managed to fix it by using the '$db->absolute(1)'. However, when 
performing a '$segment->refseq($segment);' (to reset the positions) the 
absolute option is ignored and returns to "Flybase style" positions.

Here's the code I'm using

'use Bio::DB::GFF;
use Bio::Tools::GFF;

# Open the sequence database
my $db = Bio::DB::GFF->new(-adaptor => 'dbi::mysql',
                            -dsn => 'dbi:mysql:dmel_gff:123.456.78.90',
                            -user => 'user',
                            -pass => 'pass') || die("database open failed");

$db->absolute(1);
my $segment = $db->segment(-name => '4', -start => 20000, -end => 25000);
$segment->refseq($segment);
my @features = $segment->features(-types => ['gene', 'exon', 'intron', 
'five_prime_UTR', 'three_prime_UTR', 'CDS']) or die "no features";
print(scalar(@features)."\n");

my $gffio = Bio::Tools::GFF->new(-file => '>'.'gff.out.gff', 
-gff_version => 3);
$gffio->write_feature(@features);

exit(1);'


Does anyone knows what can be going wrong?

Thanks in adv,
FG



More information about the Bioperl-l mailing list