1#!/usr/bin/env perl 2# 3 4while (<STDIN>) { 5 if ($_ =~ /^#/) { 6 print; 7 } else { 8 $_ =~ /^(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.+?)\t/; 9 $chrom = $1; 10 $pos = $2; 11 $tag = $3; 12 $ref = $4; 13 $alts = $5; 14 $hasindel = 0; 15 @alts = split(/,/, $alts); 16 $snp = 1; 17 foreach $alt (@alts) { 18 if (length($ref) > 1 || length($alt) != length($ref)) { 19 $snp = 0; 20 } 21 } 22 if (!$snp) { 23 print; 24 } 25 } 26} 27