]> git.donarmstrong.com Git - samtools.git/commitdiff
* in snpFilter, suppress non-SNP sites
authorHeng Li <lh3@live.co.uk>
Wed, 3 Jun 2009 08:40:40 +0000 (08:40 +0000)
committerHeng Li <lh3@live.co.uk>
Wed, 3 Jun 2009 08:40:40 +0000 (08:40 +0000)
misc/samtools.pl

index a26ac10f47ad76cc273966b6f5ec1e05889a715b..ac5f34aa9739c1b1065c06ebee0a53ac417be224 100755 (executable)
@@ -118,6 +118,7 @@ Options: -d INT        minimum depth to call a SNP [$opts{d}]
   while (<>) {
        my @t = split;
        next if ($t[2] eq '*' || $hash{$t[0],$t[1]});
+       next if ($t[2] eq $t[3]);
        my $is_good = ($t[7] >= $opts{d} && $t[7] <= $opts{D} && $t[6] >= $opts{Q} && $t[5] >= $opts{q})? 1 : 0;
        next unless ($is_good); # drop
        if ($t[0] ne $last_chr) { # a different chr, print