extract mRNA sequence from mysql database using Bio::DB::SeqFeature::Store

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

extract mRNA sequence from mysql database using Bio::DB::SeqFeature::Store

Firoz Ahmed

I have uploaded genomic fasta sequence and GFF3 file into local mysql database using "bp_seqfeature_load.pl". Now, I want to 
extract sequence from position 8966215-8966961 on "+" strand of Chromosome I, and print only the mRNA segment between 8966215-8966961. If there are many transcripts/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


#!/user/bin/perl
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";

}

exit;


_______________________________________________
Bioperl-l mailing list
[hidden email]
http://mailman.open-bio.org/mailman/listinfo/bioperl-l
Loading...