http://www.perlmonks.org?node_id=1045259


in reply to Counting amino acids

As the previous poster has said, you have not given us much to go on, but if you are just starting out and have nothing so far, here's a plan of attack for the problem

One way to do it is to write your own routine which would read FASTA format and then simply greps or counts the number of amino acids. This is not the recommended way however!

A better way is to look on CPAN and see if someone has done some or all of the work for you.Bio::DB:Fasta and Bio::SeqIO, FastaParse and Bio::Phylo::IO are all starting points for reading FASTA files and parsing FASTA data.

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)