Question: Fetch mRNA sequence from mysql database using Bio::DB::SeqFeature::Store
gravatar for firoz.imtech
5.6 years ago by
United States
firoz.imtech50 wrote:

I have uploaded genomic fasta sequence and GFF3 file into local mysql database using "". Now, I want to extract sequence from position 8966215-8966961 on "+" strand of Chromosome I, and print only the mRNA transcript segment between 8966215-8966961. If there are many isoforms found between these position, print each isoform sequences with name and position as fasta format. Could you please tell me what is the best approach to do it for it. My code does not work well. Thanks


use strict;
use warnings;
use Bio::Seq;
use Bio::SeqIO;
use Bio::SeqFeatureI;
use Bio::DB::SeqFeature::Store;
use Bio::DB::SeqFeature::Segment;

my @features;
my $db = Bio::DB::SeqFeature::Store->
    new(-adaptor=> 'DBI::mysql',
        -dsn=> '..',
        -user=> '..',
        -pass=> '..',

my @foo = $db->features(-seq_id =>'I',-start=>'8966215',-end=>'8966961', -strand =>'+1',
                        -type => 'mRNA',

for my $f(@foo){

    print ">",$->name,"_",$f->start,"_",$f->end,"\n";
    print $f->dna,"\n";




genome sequence assembly gene • 1.7k views
ADD COMMENTlink written 5.6 years ago by firoz.imtech50
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 711 users visited in the last hour