in reply to Re: counting the number of 16384 pattern matches in a large DNA sequence
in thread counting the number of 16384 pattern matches in a large DNA sequence

Hey, Thanks.I modified the code above as below to iterate over each value in the %seq hash and it works pretty fast :)

while (my $string = <IN1>) { chomp $string; #my ($value) = values %seq; foreach $value (values %seq) { my $result = () = $value =~ /$string/g; print "$string => $result\n"; } }
  • Comment on Re^2: counting the number of 16384 pattern matches in a large DNA sequence
  • Download Code

Replies are listed 'Best First'.
Re^3: counting the number of 16384 pattern matches in a large DNA sequence
by anonym (Acolyte) on Jun 14, 2012 at 20:57 UTC

    still for 16384 strings it is taking a lot of time to get the count.Hmm