[Bioperl-l] DB::GFF

Lincoln Stein lincoln.stein at gmail.com
Mon Sep 18 11:26:53 EDT 2006


If you use refseq() to set relative addresses, then you must be prepared to
have start features that are greater than end features. This is so that the
identity of a coordinate doesn't change depending on the direction you are
looking in!

Lincoln

On 9/18/06, Filipe Garrett <fgarret at ub.edu> wrote:
>
> 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
> _______________________________________________
> 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