in reply to I need to sort out some values and get only the highest generated by my perl script
sub get_Hx{ my $site = $_[0]; my $no_of_sequences =length($site); my $sum = 0; foreach(qw/A C D E F G H I J K L M N P Q R S T V W Y _ \./){ my $count = () = $site =~ /$_/g; $sum += -($count/$no_of_sequences)*log_2($count/$no_of_sequences) +if($count > 0); } return $sum; }
|
|---|