Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Genbank file parsing

by insaniac (Friar)
on Jan 11, 2005 at 12:47 UTC ( #421262=note: print w/ replies, xml ) Need Help??


in reply to Genbank file parsing

maybe something like:
my $found_origin = 0; while (my $line = <FILE>) { if ($line =~ /(FEATURES)\s+(\w+)/) { $found_origin = 0; $features = $2; } elsif ($line =~ /(COUNT)\s+(\d+)/) { $count = $2; } elsif ($line =~ /^ORIGIN/) { # print "$line\n"; $found_origin=1; } push @seq, "$line\n" if $found_origin and not $line =~ m!//!; }

it's a very simplistic solution.. there are probably better ones...

--
to ask a question is a moment of shame
to remain ignorant is a lifelong shame

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2016-06-30 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (399 votes). Check out past polls.