# this works as a bash include
#
#COMM test SeqLab::MotifHMMer
#COMM   - independent of front-end SeqMotif.pl
#COMM   - esp. &HmmsearchParse
#
perl -e '
    use lib shift();  # give include precedence to code directory, perl -I would not work!
    use SeqLab::MotifHMMer qw(&HmmsearchParse);
    my $pHmmsearch = &HmmsearchParse($ARGV[0]);
    foreach (sort keys %{$pHmmsearch->{seq}}){
      printf "%s : %d hits\n", $_, int(@{$pHmmsearch->{seq}{$_}{match}});
    }
  ' -- "$dircode" $dirtest/${setstamp}_search.out
