Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: simple but stuck

by Putzfrau (Beadle)
on Apr 25, 2002 at 15:09 UTC ( #161987=note: print w/replies, xml ) Need Help??


in reply to Base sequence length in fasta format file

By base i assume you mean each occurence of the four letters representing A is for adenine, G is for guanine, C is for cytosine, T is for thymine, and so you would want to count each of those occurences? so you could
while(<input>) { $sequence = $_; chomp($sequence); $count=length($sequence); if ($count >= $ideal) { print "$sequence\n"; # or whatever you want here } }

Hope this is what you had in mind and that it helps
"when a new client is created, we have to kill all the children..." --Sams Teach yourself Perl 5

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2022-01-22 00:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (60 votes). Check out past polls.

    Notices?