open (FH,"<uniprot_sprot.dat"); while (<FH>){ $c++; #SQ SEQUENCE 320 AA; 34642 MW; 9E110808B6E328E0 CRC64; #if (/^SQ SEQUENCE(.+)AA\;(.+)MW\;/) { if (/^ /) { chomp; s/ //g; #print "$1\t$2\n"; #print; @aa = split(//,$_); foreach $aa(@aa){ $count{$aa}++; } #last if $c > 10000; } } print "results\n"; foreach (keys %count) { $d++; print "$d:amino acid $_ occurs $count{$_}\n"; }
You must be logged in to post a comment.