From 0edbe6eb3dda517f551415a397180216c8a76015 Mon Sep 17 00:00:00 2001 From: jamesnemesh Date: Mon, 9 Jan 2023 17:18:15 -0500 Subject: [PATCH] Filter out sites with symbolic alleles when filtering to diploid sites (#330) --- .../vcftools/filters/SimpleDiploidVariantContextFilter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/java/org/broadinstitute/dropseqrna/vcftools/filters/SimpleDiploidVariantContextFilter.java b/src/java/org/broadinstitute/dropseqrna/vcftools/filters/SimpleDiploidVariantContextFilter.java index 6405662e..fec70e3a 100644 --- a/src/java/org/broadinstitute/dropseqrna/vcftools/filters/SimpleDiploidVariantContextFilter.java +++ b/src/java/org/broadinstitute/dropseqrna/vcftools/filters/SimpleDiploidVariantContextFilter.java @@ -103,6 +103,11 @@ public SimpleDiploidVariantContextFilter (final Iterator underly @Override public boolean filterOut(final VariantContext site) { + // Remove variants with symbolic alleles. + // These would not pass the isCanonicalAllele test later. + if (site.hasSymbolicAlleles()) { + return true; + } // if requested, filter out any "filtered" site. if (filterFilterFlagedVariants && site.isFiltered()) { if (verbose) log.info("Rejecting variant site filtered "+site.toStringWithoutGenotypes());