X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=misc%2Fexport2sam.pl;h=8e3e2800c3ac82cf9d3d3581b02768ddfd9a16f2;hb=63e8f525a5fd57be4c3471739a3996016e0c25f9;hp=ae82123f9d3a7fd2fdb7a029f55c7200bd8be755;hpb=f93dae0d03856955f9424e8b2aaf261304ca647e;p=samtools.git diff --git a/misc/export2sam.pl b/misc/export2sam.pl index ae82123..8e3e280 100755 --- a/misc/export2sam.pl +++ b/misc/export2sam.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Contact: lh3 -# Version: 0.1.0 +# Version: 0.1.2 (03JAN2009) use strict; use warnings; @@ -83,10 +83,10 @@ sub export2sam_aux { # coor my $has_coor = 0; $s->[2] = "*"; - if ($t[10] eq 'NM') { - $s->[1] |= 0x8; # unmapped + if ($t[10] eq 'NM' || $t[10] eq 'QC') { + $s->[1] |= 0x4; # unmapped } elsif ($t[10] =~ /(\d+):(\d+):(\d+)/) { - $s->[1] |= 0x8; # TODO: should I set BAM_FUNMAP in this case? + $s->[1] |= 0x4; # TODO: should I set BAM_FUNMAP in this case? push(@$s, "H0:i:$1", "H1:i:$2", "H2:i:$3") } else { $s->[2] = $t[10];