AssessNA12878 bugfixes

-- @Output isn't required for AssessNA12878
-- Previous version would could non-variant sites in NA12878 that resulted from subsetting a multi-sample VC to NA12878 as CALLED_BUT_NOT_IN_DB sites.  Now they are properly skipped
-- Bugfix for subsetting samples to NA12878.  Previous version wouldn't trim the alleles when subsetting down a multi-sample VCF, so we'd have false FN/FP sites at indels when the multi-sample VCF has alleles that result in the subset for NA12878 having non-trimmed alleles.  Fixed and unit tested now.
This commit is contained in:
Mark DePristo 2013-03-18 12:55:58 -04:00
parent a36e2b8f9d
commit d7bec9eb6e
2 changed files with 10 additions and 1 deletions

View File

@ -1000,7 +1000,7 @@ public class GATKVariantContextUtils {
public static VariantContext trimAlleles(final VariantContext inputVC, final boolean trimForward, final boolean trimReverse) {
if ( inputVC == null ) throw new IllegalArgumentException("inputVC cannot be null");
if ( inputVC.getNAlleles() <= 1 )
if ( inputVC.getNAlleles() <= 1 || inputVC.isSNP() )
return inputVC;
// see whether we need to trim common reference base from all alleles

View File

@ -694,6 +694,15 @@ public class GATKVariantContextUtilsUnitTest extends BaseTest {
root.alleles(Arrays.asList(CAref, C)).stop(11).make(),
root.alleles(Arrays.asList(CAAAref, C)).stop(13).make())});
final Allele threeCopies = Allele.create("GTTTTATTTTATTTTA", true);
final Allele twoCopies = Allele.create("GTTTTATTTTA", true);
final Allele zeroCopies = Allele.create("G", false);
final Allele oneCopies = Allele.create("GTTTTA", false);
tests.add(new Object[]{root.alleles(Arrays.asList(threeCopies, zeroCopies, oneCopies)).stop(25).make(),
Arrays.asList(
root.alleles(Arrays.asList(threeCopies, zeroCopies)).stop(25).make(),
root.alleles(Arrays.asList(twoCopies, zeroCopies)).stop(20).make())});
return tests.toArray(new Object[][]{});
}