[Bioperl-l] Help with Bio::DB::GFF

Lincoln Stein lincoln.stein at gmail.com
Wed Sep 13 07:55:10 EDT 2006


This is the correct way to do it:


my $segment1 = $db->segment(-name => '4', -start => 200000, -end => 230000);
> my @features = $segment1->features('transcript') or die "no features";


You should also check that you are getting a database handle in $db:

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";
>
>
>
>
Are you sure that there are features named "transcript" in that GFF file?
I'm looking at release 4.3, and there are NO "transcript" features listed.
Instead I see genes and mRNAs.

Lincoln

On 9/12/06, Filipe Garrett <fgarret at ub.edu> wrote:
>
> Hi all,
>
> I'm trying to access to Flybase Dmel GFF files through the bioperl
> module. I've tried different approaches (below) but none seem to work.
>
>
> "
> use DBI;
> use Bio::DB::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');
>
> $db->initialize(1);
> $db->load_gff('dmel-4-r4.2.1.gff');
>
>
>
> my @f;
> my $segment1 = $db->segment(-name => '4', -start => 200000, -end =>
> 230000);
> my @features = $segment1->features('transcript', -automerge=>0);
>
>
>
> @f = $db->contained_features(-start => 200000, -stop => 230000);
> @f = $db->overlapping_features(-start => 200000, -stop => 230000);
>
>
> @f = $db->features(-start => 200000, -end => 230000);
>
>
> my $g = $db->segment(-start => 200000, $end => 230000);
>
> "
>
>
> What I need is to get all the features in a genome region.
> Can anyone help me?
>
> 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