Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: simple but stuck

by Putzfrau (Beadle)
on Apr 25, 2002 at 15:09 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-23 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found