#!/usr/bin/env perl
# Remove all SNPs but keep SVs

while (<STDIN>) {
    if ($_ =~ /^#/) {
        print;
    } else {
        $_ =~ /^(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.+?)\t/;
        $chrom = $1;
        $pos = $2;
        $tag = $3;
        $ref = $4;
        $alts = $5;
        $hasindel = 0;
        @alts = split(/,/, $alts);
        $snp = 1;
        foreach $alt (@alts) {
            if (length($ref) > 1 || length($alt) != length($ref)) {
                $snp = 0;
            }
        }
        if (!$snp) {
            print;
        }
    }
}
