Mercurial > repos > mcharles > rapsosnp
comparison rapsodyn/MergeSamFiles.pl @ 7:3f7b0788a1c4 draft
Uploaded
| author | mcharles |
|---|---|
| date | Tue, 07 Oct 2014 10:34:34 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 6:1776b8ddd87e | 7:3f7b0788a1c4 |
|---|---|
| 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 |
