[Bioperl-l] extract mRNA sequence from mysql database using Bio::DB::SeqFeature::Store
firoz.imtech at gmail.com
firoz.imtech at gmail.com
Mon Jul 7 21:30:55 UTC 2014
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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/bioperl-l/attachments/20140707/9e60a791/attachment.html>
More information about the Bioperl-l
mailing list