]> git.donarmstrong.com Git - samtools.git/blobdiff - misc/soap2sam.pl
Merge remote branch 'remotes/pierre/master' into develop
[samtools.git] / misc / soap2sam.pl
index 1628c0f2230b4cfbb45f3830e1e93bc2cb097e94..b37135e811c6300d734488ae5a112f421bb920b5 100755 (executable)
@@ -64,6 +64,8 @@ sub soap2sam_aux {
   my @t = split(/\s+/, $line);
   return -1 if (@t < 9 || $line =~ /^\s/ || !$t[0]);
   @$s = ();
+  # fix SOAP-2.1.x bugs
+  @t = @t[0..2,4..$#t] unless ($t[3] =~ /^\d+$/);
   # read name
   $s->[0] = $t[0];
   $s->[0] =~ s/\/[12]$//g;