[Bioperl-l] Extracting gene seq from Bio::DB::GFF

Marco Blanchette mblanche at berkeley.edu
Fri Aug 11 18:30:54 UTC 2006


Dear all,

I used to use this very simple script to extract the gene sequence as a
fasta flat file from a Bio::DB::GFF database containing the GadFly 4.3
annotations

#!/usr/bin/perl

use strict;
use warnings;
use Bio::DB::GFF;
use Bio::SeqIO;

my $out = Bio::SeqIO->new(    -fh => \*STDOUT,
                            -format => 'fasta');

my $db = Bio::DB::GFF->new( -adaptor => 'dbi::mysql',
                              -dsn => 'dbi:mysql:database=dmel_43_LS');

while (<>){
    chomp;
    my @feat = $db->get_feature_by_name($_);
    $out->write_seq($_) for @feat;
}

Somehow I now get the following output instead of the actual sequences:
>FBgn0024988 gene:.(FBgn0024988)
Bio::PrimarySeq=HASH(0x19fd3d8)
>FBgn0041184 gene:.(FBgn0041184)
Bio::PrimarySeq=HASH(0x19fa684)
>FBgn0033636 gene:.(FBgn0033636)
Bio::PrimarySeq=HASH(0x19e1908)

What change and what would be the right way to get what I want?

Many thanks

Marco
______________________________
Marco Blanchette, Ph.D.

mblanche at uclink.berkeley.edu

Donald C. Rio's lab
Department of Molecular and Cell Biology
16 Barker Hall
University of California
Berkeley, CA 94720-3204

Tel: (510) 642-1084
Cell: (510) 847-0996
Fax: (510) 642-6062
-- 





More information about the Bioperl-l mailing list