7
|
1 #!/usr/bin/perl
|
|
2 #V1.0.0
|
|
3 use strict;
|
|
4 use warnings;
|
|
5
|
|
6 my $header_done = 0;
|
|
7 my @files = split(/,/,$ARGV[0]);
|
|
8 for (my $i=0;$i<=$#files;$i++){
|
|
9 open(IN, $files[$i]) or die ("Can't open ",$files[$i],"\n");
|
|
10 while (my $line = <IN>){
|
|
11 if ($line =~ /^\@PG\s/){
|
|
12 if ($header_done == 0){
|
|
13 $header_done = 1;
|
|
14 print $line;
|
|
15 }
|
|
16 else {
|
|
17 }
|
|
18 }
|
|
19 elsif ($line =~ /^\@SQ\s/){
|
|
20 if ($header_done == 0){
|
|
21 print $line;
|
|
22 }
|
|
23 else {
|
|
24 }
|
|
25 }
|
|
26 else{
|
|
27 print $line;
|
|
28 }
|
|
29 }
|
|
30 close (IN);
|
|
31 }
|
|
32
|