3 Author: Hu Xuesong @ BIOPIC <galaxy001@gmail.com>
4 Version: 1.0.0 @ 20120330
8 #use Data::Dump qw(ddx);
10 die "Usage: $0 <fq_base_list> <genome_list> <sam_path> <out>\n" if @ARGV<1;
19 if ($filename=~/.xz$/) {
20 open( $infile,"-|","xz -dc $filename") or die "Error opening $filename: $!\n";
21 } elsif ($filename=~/.gz$/) {
22 open( $infile,"-|","gzip -dc $filename") or die "Error opening $filename: $!\n";
23 } else {open( $infile,"<",$filename) or die "Error opening $filename: $!\n";}
27 open L
,'<',$fqlst or die;
35 open L
,'<',$reflst or die;
44 for my $fq (@fqpres) {
46 my $fh = openfile
("$sampath/${fq}_$ref.sam.gz");
54 ./countmsam.pl fqbase.lst genomes.lst ./check pigv2
.stat