3 Author: Hu Xuesong @ BIOPIC <galaxy001@gmail.com>
4 Version: 1.0.0 @ 20120720
10 die "Usage: $0 <pad to len> <fq.gz> [out midfix]\n" if @ARGV<2;
16 $main =~ s/\.fq(\.gz)$//;
20 $main .= ".$padto.fq.gz";
21 warn "\@$padto. From [$inf] to [$main]\n";
23 my $infh = openfile
($inf);
24 open OUT
,'|-',"gzip -9c > $main" or die "Error opening $main: $!\n";
31 if (length($b) < $padto) {
32 my $t = $padto - length($b);
35 } elsif (length($b) == $padto) {
38 print OUT
"$a$b\n$c$d\n";