Fix for combining records in which one has a spanning deletion and needs a padded reference allele.
This was erroring out and not working.
This commit is contained in:
parent
071dbf29dd
commit
622ec352bb
|
|
@ -237,4 +237,18 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
|
||||||
Arrays.asList(""));
|
Arrays.asList(""));
|
||||||
executeTest("combineSymbolicVariants: ", spec);
|
executeTest("combineSymbolicVariants: ", spec);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Test
|
||||||
|
public void combineSpanningDels() {
|
||||||
|
// Just checking that this does not fail, hence no output files and MD5
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
"-T CombineVariants --no_cmdline_in_header -o %s "
|
||||||
|
+ " -R " + b37KGReference
|
||||||
|
+ " -V " + privateTestDir + "test.spanningdel.combine.1.vcf "
|
||||||
|
+ " -V " + privateTestDir + "test.spanningdel.combine.2.vcf "
|
||||||
|
+ " -genotypeMergeOptions UNIQUIFY",
|
||||||
|
0,
|
||||||
|
Arrays.asList(""));
|
||||||
|
executeTest("combineSpanningDels: ", spec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1468,7 +1468,9 @@ public class GATKVariantContextUtils {
|
||||||
if ( extended.equals(b) )
|
if ( extended.equals(b) )
|
||||||
extended = b;
|
extended = b;
|
||||||
map.put(a, extended);
|
map.put(a, extended);
|
||||||
} else if ( a.isSymbolic() ) {
|
}
|
||||||
|
// as long as it's not a reference allele then we want to add it as is (this covers e.g. symbolic and spanning deletion alleles)
|
||||||
|
else if ( !a.isReference() ) {
|
||||||
map.put(a, a);
|
map.put(a, a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1477,7 +1479,7 @@ public class GATKVariantContextUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
static private boolean isUsableAlternateAllele(final Allele allele) {
|
static private boolean isUsableAlternateAllele(final Allele allele) {
|
||||||
return ! (allele.isReference() || allele.isSymbolic() );
|
return ! (allele.isReference() || allele.isSymbolic() || allele == Allele.SPAN_DEL );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<VariantContext> sortVariantContextsByPriority(Collection<VariantContext> unsortedVCs, List<String> priorityListOfVCs, GenotypeMergeType mergeOption ) {
|
public static List<VariantContext> sortVariantContextsByPriority(Collection<VariantContext> unsortedVCs, List<String> priorityListOfVCs, GenotypeMergeType mergeOption ) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue