Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Trying to get intergenic sequences using BioPerl

by poj (Abbot)
on Jul 27, 2015 at 11:14 UTC ( [id://1136442]=note: print w/replies, xml ) Need Help??


in reply to Trying to get intergenic sequences using BioPerl

I haven't yet worked out what you are doing with the @two array but here is what I have working so far.

#!perl use strict; use warnings; use autodie; use Bio::SeqIO; STDOUT->autoflush(1); my $gbffpath = 'your path'; opendir DIR, $gbffpath; my @files = grep {/\.gbff$/ } readdir DIR; closedir DIR; foreach my $gbfffile (@files){ my $in = Bio::SeqIO->new(-file=>$gbffpath.'/'.$gbfffile, -format=>"genbank"); my $obj = $in->next_seq(); my @feat = $obj->get_SeqFeatures(); my $start = 0; my $length = 9; foreach my $n (0..$#feat){ my $pt = $feat[$n]->primary_tag(); $start += $feat[$n]->start(); my $end = $start + $length; my $subseq = $obj->subseq($start,$end); printf "%2d %-10s %2d %2d %s\n",$n,$pt,$start,$end,$subseq; $start = $end; } }
poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1136442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found