in reply to Counting amino acids

Ah, you want to modify this script?

If you don't want percentages, you can just modify the last $count line:

from

$count{$a}= sprintf("%0.1f",($count{$a}/length($seq{$k}))*100);

to this:

$count{$a}= sprintf("%0.6f",($count{$a}/length($seq{$k})));

Replies are listed 'Best First'.
Re^2: Counting amino acids
by yuvraj_ghaly (Sexton) on Jul 19, 2013 at 07:14 UTC

    see the problem is I don't want any decimal. This code do division calculation between amino acid counted to overall length of sequence. I just require the amino acid counted.

      Well then replace the line I mentioned above with:

       count{$a};

        I have sorted out the problem

        I modify this code

        $count{$a}= sprintf("%0.6f",($count{$a}/length($seq{$k})));

        to this code

        $count{$a}=length($seq{$k});

        also I have to modify this code

        my @aa= qw(A R N D C Q E G H I L K M F P S T W Y V);

        to this code

        my @aa= qw(A);