13 if (open $file{$_}, "-|", "gzip -dc $a") {
14 print STDERR
"open $a was succesful!\n";
16 print STDERR
"open $a failed!\n";
19 print STDERR
"Read file list complete!\n";
23 foreach (sort keys %file) {
25 if ($t > $maxthreads ) {
26 for (sort keys %thread) {
27 $count{$_} = $thread{$_}->join;
28 print STDERR
"$t: Count $_ complete!\n";
34 $thread{$_} = threads
->new(\
&countsam
, $file{$_});
36 $thread{$_} = threads
->new(\
&countfq
, $file{$_});
40 foreach (sort keys %thread) {
41 $count{$_} = $thread{$_}->join;
42 print STDERR
"Count $_ complete!\n";
45 foreach (sort keys %count) {
46 print $_, "\t", join( ',',@
{$count{$_}} ), "\n";
54 if (/^\@[^ ]+ [12]:([YN]):/) {