Merge pull request #1127 from broadinstitute/rhl_hc_qd
Compute genotype before info field annotations
This commit is contained in:
commit
a8851e6763
|
|
@ -123,10 +123,6 @@ public class QualByDepth extends InfoFieldAnnotation implements StandardAnnotati
|
|||
continue;
|
||||
|
||||
// if we have the AD values for this sample, let's make sure that the variant depth is greater than 1!
|
||||
// TODO -- If we like how this is working and want to apply it to a situation other than the single sample HC pipeline,
|
||||
// TODO -- then we will need to modify the annotateContext() - and related - routines in the VariantAnnotatorEngine
|
||||
// TODO -- so that genotype-level annotations are run first (to generate AD on the samples) and then the site-level
|
||||
// TODO -- annotations must come afterwards (so that QD can use the AD).
|
||||
if ( genotype.hasAD() ) {
|
||||
final int[] AD = genotype.getAD();
|
||||
final int totalADdepth = (int)MathUtils.sum(AD);
|
||||
|
|
|
|||
|
|
@ -181,8 +181,16 @@ public abstract class StrandBiasTest extends InfoFieldAnnotation {
|
|||
continue;
|
||||
|
||||
foundData = true;
|
||||
final String sbbsString = (String) g.getAnyAttribute(GATKVCFConstants.STRAND_BIAS_BY_SAMPLE_KEY);
|
||||
final int[] data = encodeSBBS(sbbsString);
|
||||
int[] data;
|
||||
if ( g.getAnyAttribute(GATKVCFConstants.STRAND_BIAS_BY_SAMPLE_KEY).getClass().equals(String.class)) {
|
||||
final String sbbsString = (String) g.getAnyAttribute(GATKVCFConstants.STRAND_BIAS_BY_SAMPLE_KEY);
|
||||
data = encodeSBBS(sbbsString);
|
||||
} else if (g.getAnyAttribute(GATKVCFConstants.STRAND_BIAS_BY_SAMPLE_KEY).getClass().equals(ArrayList.class)) {
|
||||
ArrayList sbbsList = (ArrayList) g.getAnyAttribute(GATKVCFConstants.STRAND_BIAS_BY_SAMPLE_KEY);
|
||||
data = encodeSBBS(sbbsList);
|
||||
} else
|
||||
throw new IllegalArgumentException("Unexpected " + GATKVCFConstants.STRAND_BIAS_BY_SAMPLE_KEY + " type");
|
||||
|
||||
if ( passesMinimumThreshold(data, minCount) ) {
|
||||
for( int index = 0; index < sbArray.length; index++ ) {
|
||||
sbArray[index] += data[index];
|
||||
|
|
@ -350,6 +358,20 @@ public abstract class StrandBiasTest extends InfoFieldAnnotation {
|
|||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to parse the genotype annotation into the SB annotation array
|
||||
* @param arrayList the ArrayList returned from StrandBiasBySample.annotate()
|
||||
* @return the array used by the per-sample Strand Bias annotation
|
||||
*/
|
||||
private static int[] encodeSBBS( final ArrayList<Integer> arrayList ) {
|
||||
final int[] array = new int[ARRAY_SIZE];
|
||||
int index = 0;
|
||||
for ( Integer item : arrayList )
|
||||
array[index++] = item.intValue();
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to turn the SB annotation array into a contingency table
|
||||
* @param array the array used by the per-sample Strand Bias annotation
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
public void testHasAnnotsAsking1() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + standardAnnotations + "--variant " + privateTestDir + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
|
||||
Arrays.asList("b829d22c62af2d77d595fbd246f5e6e9"));
|
||||
Arrays.asList("b3cd2c8b524b663b11fedb2f2d986b79"));
|
||||
executeTest("test file has annotations, asking for annotations, #1", spec);
|
||||
}
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
public void testHasAnnotsAsking2() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + standardAnnotations + "--variant " + privateTestDir + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
|
||||
Arrays.asList("fde5bc227b3bd9a98b04d730ea8d8c2a"));
|
||||
Arrays.asList("77332774f1501363f2844ae504ceb961"));
|
||||
executeTest("test file has annotations, asking for annotations, #2", spec);
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
public void testNoAnnotsAsking1() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + standardAnnotations + "--variant " + privateTestDir + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
|
||||
Arrays.asList("8af6faa01040e1d2ab57508ca4918657"));
|
||||
Arrays.asList("9e69eb0265df8cde57e71c82ec341a04"));
|
||||
executeTest("test file doesn't have annotations, asking for annotations, #1", spec);
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
public void testNoAnnotsAsking2() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + standardAnnotations + "--variant " + privateTestDir + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
|
||||
Arrays.asList("5150f3d9ee092c734a7eba48fc7f1093"));
|
||||
Arrays.asList("bb1f4e9f7565542dfa3eaf3d3686ce59"));
|
||||
executeTest("test file doesn't have annotations, asking for annotations, #2", spec);
|
||||
}
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
public void testExcludeAnnotations() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + standardAnnotations + "-XA FisherStrand -XA ReadPosRankSumTest --variant " + privateTestDir + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
|
||||
Arrays.asList("d27f142e8d0fe64ca835a187603d4fd4"));
|
||||
Arrays.asList("51b87ee60eebec229387091e034110ae"));
|
||||
executeTest("test exclude annotations", spec);
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
public void testOverwritingHeader() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + standardAnnotations + "--variant " + privateTestDir + "vcfexample4.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,001,292", 1,
|
||||
Arrays.asList("529d4a26cbabd0aa6a8b7b0dd7f45e15"));
|
||||
Arrays.asList("13735c65c8fb51a8631b23d0401a2963"));
|
||||
executeTest("test overwriting header", spec);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,16 +74,16 @@ public class UnifiedGenotyperGeneralPloidySuite1IntegrationTest extends WalkerTe
|
|||
|
||||
@Test(enabled = true)
|
||||
public void testBOTH_GGA_Pools() {
|
||||
executor.PC_LSV_Test(String.format("-A AlleleCountBySample -maxAltAlleles 2 -ploidy 24 -gt_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles %s", LSV_ALLELES), "LSV_BOTH_GGA", "BOTH", "ba1412a226b7261b1430d1a2ad3ab5e2");
|
||||
executor.PC_LSV_Test(String.format("-A AlleleCountBySample -maxAltAlleles 2 -ploidy 24 -gt_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles %s", LSV_ALLELES), "LSV_BOTH_GGA", "BOTH", "36456ac23382fadde9047f1daf06ba43");
|
||||
}
|
||||
|
||||
@Test(enabled = true)
|
||||
public void testINDEL_GGA_Pools() {
|
||||
executor.PC_LSV_Test(String.format("-A AlleleCountBySample -maxAltAlleles 1 -ploidy 24 -gt_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles %s", LSV_ALLELES), "LSV_INDEL_GGA", "INDEL", "05834d7716eba5846aa6cbb51d4cd892");
|
||||
executor.PC_LSV_Test(String.format("-A AlleleCountBySample -maxAltAlleles 1 -ploidy 24 -gt_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles %s", LSV_ALLELES), "LSV_INDEL_GGA", "INDEL", "38302eecda79cb64182661675304df5a");
|
||||
}
|
||||
|
||||
@Test(enabled = true)
|
||||
public void testINDEL_maxAltAlleles2_ploidy1_Pools_noRef() {
|
||||
executor.PC_LSV_Test_NoRef("-A AlleleCountBySample -maxAltAlleles 2 -ploidy 1", "LSV_INDEL_DISC_NOREF_p1", "INDEL", "4488717e2ab49bfc83abd6c49d3b1a08");
|
||||
executor.PC_LSV_Test_NoRef("-A AlleleCountBySample -maxAltAlleles 2 -ploidy 1", "LSV_INDEL_DISC_NOREF_p1", "INDEL", "ab572a288022bd95accc5762530ac239");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,16 +63,16 @@ public class UnifiedGenotyperGeneralPloidySuite2IntegrationTest extends WalkerTe
|
|||
|
||||
@Test(enabled = true)
|
||||
public void testINDEL_maxAltAlleles2_ploidy3_Pools_noRef() {
|
||||
executor.PC_LSV_Test_NoRef("-A AlleleCountBySample -maxAltAlleles 2 -ploidy 3","LSV_INDEL_DISC_NOREF_p3","INDEL","984c5d3252b6efc82f87a51fafee2a83");
|
||||
executor.PC_LSV_Test_NoRef("-A AlleleCountBySample -maxAltAlleles 2 -ploidy 3","LSV_INDEL_DISC_NOREF_p3","INDEL","0bd730fa290df403b8117016da8eebef");
|
||||
}
|
||||
|
||||
@Test(enabled = true)
|
||||
public void testMT_SNP_DISCOVERY_sp4() {
|
||||
executor.PC_MT_Test(CEUTRIO_BAM, "-A AlleleCountBySample -maxAltAlleles 1 -ploidy 8", "MT_SNP_DISCOVERY_sp4","7ef8e488a8125126a3411df7d3f6167a");
|
||||
executor.PC_MT_Test(CEUTRIO_BAM, "-A AlleleCountBySample -maxAltAlleles 1 -ploidy 8", "MT_SNP_DISCOVERY_sp4","4b58f34d7aa4a7b652e4a07bac19d23e");
|
||||
}
|
||||
|
||||
@Test(enabled = true)
|
||||
public void testMT_SNP_GGA_sp10() {
|
||||
executor.PC_MT_Test(CEUTRIO_BAM, String.format("-A AlleleCountBySample -maxAltAlleles 1 -ploidy 20 -gt_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles %s",NA12891_CALLS), "MT_SNP_GGA_sp10", "b18e9c44b3c834d1ca8bf03951cf0c33");
|
||||
executor.PC_MT_Test(CEUTRIO_BAM, String.format("-A AlleleCountBySample -maxAltAlleles 1 -ploidy 20 -gt_mode GENOTYPE_GIVEN_ALLELES -out_mode EMIT_ALL_SITES -alleles %s",NA12891_CALLS), "MT_SNP_GGA_sp10", "af9b5e39536a1177a0202269b516674c");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
" -o %s" +
|
||||
" -L 1:10,000,000-10,500,000",
|
||||
1,
|
||||
Arrays.asList("1d8b3a95f31364f8a88590b90e085558"));
|
||||
Arrays.asList("f831bf7891bf4f584eca64bcfc4b1ac5"));
|
||||
executeTest(String.format("test indel caller in SLX"), spec);
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
" -minIndelCnt 1" +
|
||||
" -L 1:10,000,000-10,100,000",
|
||||
1,
|
||||
Arrays.asList("f71ee7c0757b1c1fcf9390b2fbfc12ae"));
|
||||
Arrays.asList("e550d525c6908534aa2d414e642e2a52"));
|
||||
|
||||
executeTest(String.format("test indel caller in SLX with low min allele count"), spec);
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
" -o %s" +
|
||||
" -L 1:10,000,000-10,500,000",
|
||||
1,
|
||||
Arrays.asList("b75617d7557dd2b67fd8d74ed53b31ff"));
|
||||
Arrays.asList("ddd634ad432e47d7d05c8b4cb92a65b3"));
|
||||
|
||||
executeTest(String.format("test indel calling, multiple technologies"), spec);
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
baseCommandIndels + " --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + privateTestDir + "indelAllelesForUG.vcf -I " + validationDataLocation +
|
||||
"pilot2_daughters.chr20.10k-11k.bam -o %s -L 20:10,000,000-10,100,000", 1,
|
||||
Arrays.asList("e626454b67d56380b288671e57844616"));
|
||||
Arrays.asList("ebd243a11a0b4526df857b75518525cc"));
|
||||
executeTest("test MultiSample Pilot2 indels with alleles passed in", spec);
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
baseCommandIndels + " --output_mode EMIT_ALL_SITES --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles "
|
||||
+ privateTestDir + "indelAllelesForUG.vcf -I " + validationDataLocation +
|
||||
"pilot2_daughters.chr20.10k-11k.bam -o %s -L 20:10,000,000-10,100,000", 1,
|
||||
Arrays.asList("1c66d5c77701f36182ead88a0bc8bed7"));
|
||||
Arrays.asList("4e59c1a8d88e9dac0faefb1b2c08458e"));
|
||||
executeTest("test MultiSample Pilot2 indels with alleles passed in and emitting all sites", spec);
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
WalkerTest.WalkerTestSpec spec2 = new WalkerTest.WalkerTestSpec(
|
||||
baseCommandIndels + " --genotyping_mode GENOTYPE_GIVEN_ALLELES -alleles " + result.get(0).getAbsolutePath() + " -I " + validationDataLocation +
|
||||
"low_coverage_CEU.chr1.10k-11k.bam -o %s -L " + result.get(0).getAbsolutePath(), 1,
|
||||
Arrays.asList("ed618b3c82e86cdf80f4865d838a7aaa"));
|
||||
Arrays.asList("f37b78c43cc150c6c1b3e4fd1fd280f0"));
|
||||
executeTest("test MultiSample Pilot1 CEU indels using GENOTYPE_GIVEN_ALLELES", spec2);
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
" -o %s" +
|
||||
" -L 20:10,000,000-10,100,000",
|
||||
1,
|
||||
Arrays.asList("9eaa295625e025099ce3b235590f7b6a"));
|
||||
Arrays.asList("e554f7ee4849454cf5d396aab8675d80"));
|
||||
|
||||
executeTest(String.format("test UG with base indel quality scores"), spec);
|
||||
}
|
||||
|
|
@ -181,7 +181,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
public void testMinIndelFraction0() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
assessMinIndelFraction + " -minIndelFrac 0.0", 1,
|
||||
Arrays.asList("a6c3f664391f0f4a6e8afb3dfa68e871"));
|
||||
Arrays.asList("1180352a1b13b2c53d896ebc5f8a65ba"));
|
||||
executeTest("test minIndelFraction 0.0", spec);
|
||||
}
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
public void testMinIndelFraction25() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
assessMinIndelFraction + " -minIndelFrac 0.25", 1,
|
||||
Arrays.asList("acf4f7a8ebfaee05fc229340d1a3be7c"));
|
||||
Arrays.asList("991269bc8bbfa8ed4077b93038650d51"));
|
||||
executeTest("test minIndelFraction 0.25", spec);
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ public class UnifiedGenotyperIndelCallingIntegrationTest extends WalkerTest {
|
|||
public void testMinIndelFraction100() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
assessMinIndelFraction + " -minIndelFrac 1", 1,
|
||||
Arrays.asList("1d1cd231a2eee6338bd3a320b01bac3c"));
|
||||
Arrays.asList("61b59e8beec18f5134d02d7d0ecf1195"));
|
||||
executeTest("test minIndelFraction 1.0", spec);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testMinBaseQualityScore() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 --min_base_quality_score 26", 1,
|
||||
Arrays.asList("24e3de56a64cf50e1ce159c640d2a914"));
|
||||
Arrays.asList("30d867f213824cc3e9898f4be4430b3d"));
|
||||
executeTest("test min_base_quality_score 26", spec);
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testSLOD() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper --disableDithering -R " + b36KGReference + " --computeSLOD --no_cmdline_in_header -glm BOTH --dbsnp " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
Arrays.asList("500036226dd2dfb3593b8c203d818e28"));
|
||||
Arrays.asList("fe5a85d63549deab8dcc039f8700d625"));
|
||||
executeTest("test SLOD", spec);
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testNDA() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " --annotateNDA -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
Arrays.asList("f04503b889f4510023f00082afe65079"));
|
||||
Arrays.asList("aee607c8664af075bd274eb6f3ecbec3"));
|
||||
executeTest("test NDA", spec);
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testCompTrack() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper --disableDithering -R " + b36KGReference + " --no_cmdline_in_header -glm BOTH -comp:FOO " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
Arrays.asList("7c9a4c9283185d6d0e5263040cd04527"));
|
||||
Arrays.asList("614cdbd62b95ac9dfadcb36f15bab9c9"));
|
||||
executeTest("test using comp track", spec);
|
||||
}
|
||||
|
||||
|
|
@ -124,17 +124,17 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
|
||||
@Test
|
||||
public void testOutputParameterSitesOnly() {
|
||||
testOutputParameters("-sites_only", "433df49e8ba3bfa3b32ff165b717ab51");
|
||||
testOutputParameters("-sites_only", "084dd06b0e66336c66790fbc2497302e");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOutputParameterAllConfident() {
|
||||
testOutputParameters("--output_mode EMIT_ALL_CONFIDENT_SITES", "5628f9829474896fcc3a743d92f8300f");
|
||||
testOutputParameters("--output_mode EMIT_ALL_CONFIDENT_SITES", "d8701057b0fa73030ab638b7a64631b4");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOutputParameterAllSites() {
|
||||
testOutputParameters("--output_mode EMIT_ALL_SITES", "4371fd83cc4904d60b943a7777e8e292");
|
||||
testOutputParameters("--output_mode EMIT_ALL_SITES", "9cbf58f3bf9f3056564425a4fed3ad61");
|
||||
}
|
||||
|
||||
private void testOutputParameters(final String args, final String md5) {
|
||||
|
|
@ -148,7 +148,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testConfidence() {
|
||||
WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 -stand_call_conf 10 ", 1,
|
||||
Arrays.asList("a1d212a5d23400f29517a4f25bff2fe2"));
|
||||
Arrays.asList("12d40e136155d9d0a4196e2dfd6dd5d7"));
|
||||
executeTest("test confidence 1", spec1);
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testNoPrior() {
|
||||
WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 -stand_call_conf 10 -inputPrior 0.33333 -inputPrior 0.33333", 1,
|
||||
Arrays.asList("32b02c0315248dd69f19000f0a9687bb"));
|
||||
Arrays.asList("89c41056db88f00494dc9237e7a8910e"));
|
||||
executeTest("test no prior 1", spec1);
|
||||
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void testUserPrior() {
|
||||
WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 -stand_call_conf 10 -inputPrior 0.001 -inputPrior 0.495", 1,
|
||||
Arrays.asList("5b6576518c62fab480252311dae8e716"));
|
||||
Arrays.asList("102a5cbab75c85d9d5be769aa67cce50"));
|
||||
executeTest("test user prior 1", spec1);
|
||||
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
public void emitPLsAtAllSites() {
|
||||
WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000 --output_mode EMIT_ALL_SITES -allSitePLs", 1,
|
||||
Arrays.asList("c9074a9ea9aa1ec42fc71cc1bc6b589f"));
|
||||
Arrays.asList("589a330ea622f3ae039dcad29d82a18d"));
|
||||
// GDA: TODO: BCF encoder/decoder doesn't seem to support non-standard values in genotype fields. IE even if there is a field defined in FORMAT and in the header the BCF2 encoder will still fail
|
||||
spec1.disableShadowBCF();
|
||||
|
||||
|
|
@ -190,12 +190,12 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
|
||||
@Test
|
||||
public void testHeterozyosity1() {
|
||||
testHeterozosity( 0.01, "c7f8684e4cb3175f274f91f80573d910" );
|
||||
testHeterozosity( 0.01, "3e4ae3580cbf850401cc53ab13659bf6" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHeterozyosity2() {
|
||||
testHeterozosity( 1.0 / 1850, "1f067c6442dbccf5c341ea1a41e9d28b" );
|
||||
testHeterozosity( 1.0 / 1850, "8b683c10a352915c022d8d101c028a3f" );
|
||||
}
|
||||
|
||||
private void testHeterozosity(final double arg, final String md5) {
|
||||
|
|
@ -274,7 +274,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
" -o %s" +
|
||||
" -L 1:10,000,000-10,100,000",
|
||||
1,
|
||||
Arrays.asList("ac54cc421a4c8a441179cd85653715a7"));
|
||||
Arrays.asList("4a677119cbbdd5d13a7864216e0a011b"));
|
||||
|
||||
executeTest(String.format("test multiple technologies"), spec);
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
" -L 1:10,000,000-10,100,000" +
|
||||
" -baq CALCULATE_AS_NECESSARY",
|
||||
1,
|
||||
Arrays.asList("f561ce9ab992c99caea934fa7d649ee6"));
|
||||
Arrays.asList("0a3f67df5656aa7684f383b24ec988ef"));
|
||||
|
||||
executeTest(String.format("test calling with BAQ"), spec);
|
||||
}
|
||||
|
|
@ -310,7 +310,8 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
baseCommand + " -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -o %s -L 1:10,022,000-10,025,000 " +
|
||||
"-A SnpEff",
|
||||
1,
|
||||
Arrays.asList("42c2d98ed221b30b6a8986ce65b13066"));
|
||||
Arrays.asList("ee281ae8f32944eec5da6aac28c2e184"));
|
||||
|
||||
executeTest("testSnpEffAnnotationRequestedWithoutRodBinding", spec);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class UnifiedGenotyperNormalCallingIntegrationTest extends WalkerTest{
|
|||
public void testMultiSamplePilot1() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -o %s -L 1:10,022,000-10,025,000", 1,
|
||||
Arrays.asList("b0eee799738d0ffa007a368fb30d3f35"));
|
||||
Arrays.asList("b0e861320af97cf107c59af721dcdd0b"));
|
||||
executeTest("test MultiSample Pilot1", spec);
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ public class UnifiedGenotyperNormalCallingIntegrationTest extends WalkerTest{
|
|||
public void testSingleSamplePilot2() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,100,000", 1,
|
||||
Arrays.asList("16341ab632b503f79cd14678aee76106"));
|
||||
Arrays.asList("a759ccb4056c70a815e1f191136614e2"));
|
||||
executeTest("test SingleSample Pilot2", spec);
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ public class UnifiedGenotyperNormalCallingIntegrationTest extends WalkerTest{
|
|||
public void testMultipleSNPAlleles() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper --contamination_fraction_to_filter 0.05 --disableDithering -R " + b37KGReference + " --no_cmdline_in_header -glm BOTH --dbsnp " + b37dbSNP129 + " -I " + privateTestDir + "multiallelic.snps.bam -o %s -L " + privateTestDir + "multiallelic.snps.intervals", 1,
|
||||
Arrays.asList("fafb5e1fd44f51c523eb3650e8e79a76"));
|
||||
Arrays.asList("aa4955df668c4e39b3994ec198da0e15"));
|
||||
executeTest("test Multiple SNP alleles", spec);
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ public class UnifiedGenotyperNormalCallingIntegrationTest extends WalkerTest{
|
|||
public void testReverseTrim() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper --contamination_fraction_to_filter 0.05 --disableDithering -R " + b37KGReference + " --no_cmdline_in_header -glm INDEL -I " + validationDataLocation + "CEUTrio.HiSeq.b37.chr20.10_11mb.bam -o %s -L 20:10289124 -L 20:10090289", 1,
|
||||
Arrays.asList("9ef30185c2ae2a4c7180cc500cc3b97c"));
|
||||
Arrays.asList("941f68bad6b71504ad0cfc47ef765f91"));
|
||||
executeTest("test reverse trim", spec);
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ public class UnifiedGenotyperNormalCallingIntegrationTest extends WalkerTest{
|
|||
public void testMismatchedPLs() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper --contamination_fraction_to_filter 0.05 --disableDithering -R " + b37KGReference + " --no_cmdline_in_header -glm INDEL -I " + privateTestDir + "mismatchedPLs.bam -o %s -L 1:24020341", 1,
|
||||
Arrays.asList("a22ad5f0b5e4734f7ac441d09cbbffa1"));
|
||||
Arrays.asList("b19a081c07fe31b6fe27b35252ba9316"));
|
||||
executeTest("test mismatched PLs", spec);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa
|
|||
|
||||
@Test
|
||||
public void testHaplotypeCallerMultiSampleComplex1() {
|
||||
HCTestComplexVariants(privateTestDir + "AFR.complex.variants.bam", "", "b57861e1945f81b7f6a11f23243efbb3");
|
||||
HCTestComplexVariants(privateTestDir + "AFR.complex.variants.bam", "", "fc09bd1a934a6bd0af6fed52e78cfd9a");
|
||||
}
|
||||
|
||||
private void HCTestSymbolicVariants(String bam, String args, String md5) {
|
||||
|
|
@ -96,7 +96,7 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa
|
|||
@Test
|
||||
public void testHaplotypeCallerMultiSampleGGAComplex() {
|
||||
HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538",
|
||||
"0329146d969340fbfdd0182273837324");
|
||||
"17c8bc400af71cf3311f903cf1bb3ffc");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -114,7 +114,7 @@ public class HaplotypeCallerComplexAndSymbolicVariantsIntegrationTest extends Wa
|
|||
@Test
|
||||
public void testHaplotypeCallerMultiSampleConsensusModeComplex() {
|
||||
HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538 -L 20:133041-133161 -L 20:300207-300337",
|
||||
"a2b0fa398422df24f5e24b66da98226b");
|
||||
"b4ffbfad682d68db29075a538de5eeab");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest {
|
|||
final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals;
|
||||
|
||||
// this functionality can be adapted to provide input data for whatever you might want in your data
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "468b2b827297422033ccd85050ac119f"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "ba441c7186f48aa868fceb802ef83b7e"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "8f31fb899458aad4d8809e98c1b19e9c"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "4f19785171b41fd01327f95af2d0385b"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "44be8f4f74a73632f2805efa6a8608e4"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "2cacc6dcee8f770af91b32260a90cbe6"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "5a986c2c4f2f9b3bc1cb7bead4794d85"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "cbe35a80d1988ab9693d6d32996a34ed"});
|
||||
|
||||
|
|
@ -94,10 +94,10 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest {
|
|||
final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals;
|
||||
|
||||
// this functionality can be adapted to provide input data for whatever you might want in your data
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "20f149f41438c6cc64af829cb5cd6eb6"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "4fdbd93808ed28ec207c6eed95496846"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "381e3fed6b1826047cda2ea990b7e41f"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "1d5f6804e07590850601a515c821548a"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "d2b86f9be8dde27038a964cb4b87d99f"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "2bde7c2469cc24ba317217e8b8cec8b6"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "75d10db3eb4a65037c652830f5865dcf"});
|
||||
|
||||
final String NA12878bandedResolutionMD5 = "b536f1e09d92d501fa6e891dbcafbad2";
|
||||
|
|
@ -117,10 +117,10 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest {
|
|||
final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals;
|
||||
|
||||
// this functionality can be adapted to provide input data for whatever you might want in your data
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "c9a85dd80f745d6433fff2c139c7158a"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "aca36d83e7a24099b5b27ff6a222a1c0"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "402fcd74bd6a880f7dd5b6b5acda6a33"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "ec2b1af010ba6c8e84aaa694adbee326"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "1e58a154bb5f390d5a63a42955ac94da"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "6d8ee133a62fdddc7a8120cc85e3184f"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "b998e52a00d97ad27fb196a211205009"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "f9fdc0054819f69df30e00268d926318"});
|
||||
|
||||
|
|
@ -135,10 +135,10 @@ public class HaplotypeCallerGVCFIntegrationTest extends WalkerTest {
|
|||
final String WExIntervals = "-L 20:10,000,000-10,100,000 -isr INTERSECTION -L " + hg19Chr20Intervals;
|
||||
|
||||
// this functionality can be adapted to provide input data for whatever you might want in your data
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "c29c62be67c4a39a37a3bd1b4ca56c1d"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.NONE, PCRFreeIntervals, "59219c7cbf1f939654f3bd7f3a275423"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.BP_RESOLUTION, PCRFreeIntervals, "f969ca63fbb736ef0ef3a39bf9d5b48d"});
|
||||
tests.add(new Object[]{NA12878_PCRFREE, ReferenceConfidenceMode.GVCF, PCRFreeIntervals, "0272c2c5aae6aa8197711f450e604bbc"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "9ced0d30ddcabff1af2083a0fa944d9d"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.NONE, WExIntervals, "d64ae1dd725cc1ffe13d0b805fd192eb"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.BP_RESOLUTION, WExIntervals, "465b9ec2bfaca04adfd7abd54205a16f"});
|
||||
tests.add(new Object[]{NA12878_WEx, ReferenceConfidenceMode.GVCF, WExIntervals, "4e70638705b65c91a0a86771ec13ef74"});
|
||||
|
||||
|
|
|
|||
|
|
@ -96,82 +96,82 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
|
||||
@Test
|
||||
public void testHaplotypeCallerMultiSample() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "", "dd7580015e546e7311cfaa15ca1b3afc");
|
||||
HCTest(CEUTRIO_BAM, "", "37668b547d12abf39315db75ef8d96b8");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerSingleSample() throws IOException {
|
||||
|
||||
HCTest(NA12878_BAM, "", "6f3f96081b5e6c8489cc051269aacb9c");
|
||||
HCTest(NA12878_BAM, "", "5bab7c9cd4f806a5cae32c9f41372a24");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMultiSampleHaploid() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "-ploidy 1", "0036eaa05a1ac38764ad5445bf8b23cc");
|
||||
HCTest(CEUTRIO_BAM, "-ploidy 1", "8485f24659c6e5888df9c05869673ba5");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerSingleSampleHaploid() throws IOException {
|
||||
HCTest(NA12878_BAM, "-ploidy 1", "e751950efc7713d2ba64ad4316a74903");
|
||||
HCTest(NA12878_BAM, "-ploidy 1", "ce4392ff217838b2a351a826c30ff182");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerSingleSampleTetraploid() throws IOException {
|
||||
HCTest(NA12878_BAM, "-ploidy 4", "139e0d3bbea7903f66941053f2b1a2fd");
|
||||
HCTest(NA12878_BAM, "-ploidy 4", "b0ca6f64488a09cbb79d8491f297aff5");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMinBaseQuality() throws IOException {
|
||||
HCTest(NA12878_BAM, "-mbq 15", "6f3f96081b5e6c8489cc051269aacb9c");
|
||||
HCTest(NA12878_BAM, "-mbq 15", "5bab7c9cd4f806a5cae32c9f41372a24");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMinBaseQualityHaploid() throws IOException {
|
||||
HCTest(NA12878_BAM, "-mbq 15 -ploidy 1", "e751950efc7713d2ba64ad4316a74903");
|
||||
HCTest(NA12878_BAM, "-mbq 15 -ploidy 1", "ce4392ff217838b2a351a826c30ff182");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMinBaseQualityTetraploid() throws IOException {
|
||||
HCTest(NA12878_BAM, "-mbq 15 -ploidy 4", "139e0d3bbea7903f66941053f2b1a2fd");
|
||||
HCTest(NA12878_BAM, "-mbq 15 -ploidy 4", "b0ca6f64488a09cbb79d8491f297aff5");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerGraphBasedSingleSample() throws IOException {
|
||||
HCTest(NA12878_BAM, "-likelihoodEngine GraphBased", "c0b7d3a147491445cbe7f2aef910d7f7");
|
||||
HCTest(NA12878_BAM, "-likelihoodEngine GraphBased", "708469e0a6a04de0d11d96072079cd7a");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerGraphBasedMultiSampleHaploid() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased -ploidy 1", "6d4700884f9cbb1d65196d299370e056");
|
||||
HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased -ploidy 1", "aee3d42a15134cb05664d2b2992de2b0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerGraphBasedMultiSample() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased", "ea5ff9d7729147d63f7a99001cea7e43");
|
||||
HCTest(CEUTRIO_BAM, "-likelihoodEngine GraphBased", "b9e646394f0cf24090f6feb7db6fc7aa");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerSingleSampleWithDbsnp() throws IOException {
|
||||
HCTest(NA12878_BAM, "-D " + b37dbSNP132, "7b303fcf907e4df7a3087778e2ccabeb");
|
||||
HCTest(NA12878_BAM, "-D " + b37dbSNP132, "35b92e6b347909bf6efa21be9a03aaaf");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMultiSampleGGA() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "--max_alternate_alleles 3 -gt_mode GENOTYPE_GIVEN_ALLELES -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf" +
|
||||
" -isr INTERSECTION -L " + GGA_INTERVALS_FILE,
|
||||
"b245ec43915c87a10ba081ed51bd34fa");
|
||||
"a93ba962a21d4c6d8b937f1bb5e18965");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMultiSampleGGAHaploid() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "--max_alternate_alleles 3 -gt_mode GENOTYPE_GIVEN_ALLELES -ploidy 1 -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf -isr INTERSECTION -L 20:10080000-10100000",
|
||||
"612a8fcddd2cda58184d9a58a150af67");
|
||||
"31070ac31ef5abfa8997b6d7d44411c2");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHaplotypeCallerMultiSampleGGATetraploid() throws IOException {
|
||||
HCTest(CEUTRIO_BAM, "--max_alternate_alleles 3 -gt_mode GENOTYPE_GIVEN_ALLELES -ploidy 4 -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf -isr INTERSECTION -L 20:10080000-10100000",
|
||||
"5f12e02d06fdf7f4beee6ccdbe77f466");
|
||||
"12e7b65e6f2a01d42313b9dee2aad420");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -187,7 +187,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
|
||||
@Test
|
||||
public void testHaplotypeCallerSingleSampleIndelQualityScores() {
|
||||
HCTestIndelQualityScores(NA12878_RECALIBRATED_BAM, "", "a39b12f33f4b5f877195ff0c86eb6d3e");
|
||||
HCTestIndelQualityScores(NA12878_RECALIBRATED_BAM, "", "c117128dd6ace297f2771d7d30f084cd");
|
||||
}
|
||||
|
||||
private void HCTestNearbySmallIntervals(String bam, String args, String md5) {
|
||||
|
|
@ -234,7 +234,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void HCTestProblematicReadsModifiedInActiveRegions() {
|
||||
final String base = String.format("-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub %s %s -R %s -I %s", HMM_SUB_IMPLEMENTATION, ALWAYS_LOAD_VECTOR_HMM, REF, privateTestDir + "haplotype-problem-4.bam") + " --no_cmdline_in_header -o %s -minPruning 3 -L 4:49139026-49139965";
|
||||
final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("c6775f54873d9c37703f371caf7c6c9e"));
|
||||
final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("f80eb5322c0d5822199b293a05188ce9"));
|
||||
executeTest("HCTestProblematicReadsModifiedInActiveRegions: ", spec);
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
public void HCTestDBSNPAnnotationWGS() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,090,000-10,100,000 -D " + b37dbSNP132, 1,
|
||||
Arrays.asList("115d973436460efb99df2bf5de6a1e8d"));
|
||||
Arrays.asList("993944bada254002995b33d3c05ced6d"));
|
||||
executeTest("HC calling with dbSNP ID annotation on WGS intervals", spec);
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T HaplotypeCaller --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,100,000-11,000,000 -D " + b37dbSNP132
|
||||
+ " -L " + hg19Intervals + " -isr INTERSECTION", 1,
|
||||
Arrays.asList("1282faeeb89a4cb9d0d04cb24669a1c8"));
|
||||
Arrays.asList("17f1109e3804f095d13042a12d4e14e2"));
|
||||
executeTest("HC calling with dbSNP ID annotation on WEx intervals", spec);
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
public void HCTestDBSNPAnnotationWGSGraphBased() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T HaplotypeCaller -likelihoodEngine GraphBased --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,090,000-10,100,000 -D " + b37dbSNP132, 1,
|
||||
Arrays.asList("445e4be6c21dadd81f68122a74704f86"));
|
||||
Arrays.asList("258169cbd15d6f48e2be0f2981a23c5f"));
|
||||
executeTest("HC calling with dbSNP ID annotation on WGS intervals", spec);
|
||||
}
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T HaplotypeCaller -likelihoodEngine GraphBased --disableDithering --pcr_indel_model NONE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_PCRFREE + " -o %s -L 20:10,000,000-11,000,000 -D " + b37dbSNP132
|
||||
+ " -L " + hg19Intervals + " -isr INTERSECTION", 1,
|
||||
Arrays.asList("418b054ed991c0ecd9ffd1c980a6c7dc"));
|
||||
Arrays.asList("0e1a04500daaa66973acb9df8c9356c7"));
|
||||
executeTest("HC calling with dbSNP ID annotation on WEx intervals", spec);
|
||||
}
|
||||
|
||||
|
|
@ -345,7 +345,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
public void HCTestAggressivePcrIndelModelWGS() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T HaplotypeCaller --disableDithering --pcr_indel_model AGGRESSIVE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_BAM + " -o %s -L 20:10,270,000-10,300,000", 1,
|
||||
Arrays.asList("9ef202d2e6f9732b629f1876eb6395a0"));
|
||||
Arrays.asList("34d34772c625e2f8c57c9cf508d632e3"));
|
||||
executeTest("HC calling with aggressive indel error modeling on WGS intervals", spec);
|
||||
}
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
public void HCTestConservativePcrIndelModelWGS() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T HaplotypeCaller --disableDithering --pcr_indel_model CONSERVATIVE -pairHMMSub " + HMM_SUB_IMPLEMENTATION + " " + ALWAYS_LOAD_VECTOR_HMM + " -R " + b37KGReference + " --no_cmdline_in_header -I " + NA12878_BAM + " -o %s -L 20:10,270,000-10,300,000", 1,
|
||||
Arrays.asList("c806855db1c464d2b6d3dd6a9b5ac152"));
|
||||
Arrays.asList("c85731f741b7b63971f5d3f9c23b0193"));
|
||||
executeTest("HC calling with conservative indel error modeling on WGS intervals", spec);
|
||||
}
|
||||
|
||||
|
|
@ -459,7 +459,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
|||
|
||||
@Test
|
||||
public void testHaplotypeCallerTandemRepeatAnnotator() throws IOException{
|
||||
HCTest(NA12878_BAM, " -L 20:10001000-10010000 -A TandemRepeatAnnotator -XA MappingQualityZero -XA SpanningDeletions", "1003c8c13efef8f4f439151460ccc32a");
|
||||
HCTest(NA12878_BAM, " -L 20:10001000-10010000 -A TandemRepeatAnnotator -XA MappingQualityZero -XA SpanningDeletions", "1980724876c4d1adeebd167cade401d9");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,23 +197,23 @@ public class VariantAnnotatorEngine {
|
|||
final Map<String, AlignmentContext> stratifiedContexts,
|
||||
final VariantContext vc,
|
||||
final Map<String,PerReadAlleleLikelihoodMap> perReadAlleleLikelihoodMap) {
|
||||
final Map<String, Object> infoAnnotations = new LinkedHashMap<>(vc.getAttributes());
|
||||
// annotate genotypes
|
||||
final VariantContextBuilder builder = new VariantContextBuilder(vc).genotypes(annotateGenotypes(tracker, ref, stratifiedContexts, vc, perReadAlleleLikelihoodMap));
|
||||
VariantContext newGenotypeAnnotatedVC = builder.make();
|
||||
|
||||
// annotate expressions where available
|
||||
annotateExpressions(tracker, ref.getLocus(), vc, infoAnnotations);
|
||||
final Map<String, Object> infoAnnotations = new LinkedHashMap<>(newGenotypeAnnotatedVC.getAttributes());
|
||||
annotateExpressions(tracker, ref.getLocus(), newGenotypeAnnotatedVC, infoAnnotations);
|
||||
|
||||
// go through all the requested info annotationTypes
|
||||
for ( final InfoFieldAnnotation annotationType : requestedInfoAnnotations ) {
|
||||
final Map<String, Object> annotationsFromCurrentType = annotationType.annotate(tracker, walker, ref, stratifiedContexts, vc, perReadAlleleLikelihoodMap);
|
||||
final Map<String, Object> annotationsFromCurrentType = annotationType.annotate(tracker, walker, ref, stratifiedContexts, newGenotypeAnnotatedVC, perReadAlleleLikelihoodMap);
|
||||
if ( annotationsFromCurrentType != null )
|
||||
infoAnnotations.putAll(annotationsFromCurrentType);
|
||||
}
|
||||
|
||||
// generate a new annotated VC
|
||||
final VariantContextBuilder builder = new VariantContextBuilder(vc).attributes(infoAnnotations);
|
||||
|
||||
// annotate genotypes, creating another new VC in the process
|
||||
final VariantContext annotated = builder.genotypes(annotateGenotypes(tracker, ref, stratifiedContexts, vc, perReadAlleleLikelihoodMap)).make();
|
||||
// create a new VC in the with info and genotype annotations
|
||||
final VariantContext annotated = builder.attributes(infoAnnotations).make();
|
||||
|
||||
// annotate db occurrences
|
||||
return annotateDBs(tracker, annotated);
|
||||
|
|
@ -234,24 +234,25 @@ public class VariantAnnotatorEngine {
|
|||
final RefMetaDataTracker tracker,
|
||||
final Map<String, PerReadAlleleLikelihoodMap> perReadAlleleLikelihoodMap,
|
||||
final VariantContext vc) {
|
||||
final Map<String, Object> infoAnnotations = new LinkedHashMap<>(vc.getAttributes());
|
||||
// annotate genotypes
|
||||
final VariantContextBuilder builder = new VariantContextBuilder(vc).genotypes(annotateGenotypes(null, null, null, vc, perReadAlleleLikelihoodMap));
|
||||
VariantContext newGenotypeAnnotatedVC = builder.make();
|
||||
|
||||
final Map<String, Object> infoAnnotations = new LinkedHashMap<>(newGenotypeAnnotatedVC.getAttributes());
|
||||
|
||||
// go through all the requested info annotationTypes
|
||||
for ( final InfoFieldAnnotation annotationType : requestedInfoAnnotations ) {
|
||||
if ( !(annotationType instanceof ActiveRegionBasedAnnotation) )
|
||||
continue;
|
||||
|
||||
final Map<String, Object> annotationsFromCurrentType = annotationType.annotate(referenceContext, perReadAlleleLikelihoodMap, vc);
|
||||
final Map<String, Object> annotationsFromCurrentType = annotationType.annotate(referenceContext, perReadAlleleLikelihoodMap, newGenotypeAnnotatedVC);
|
||||
if ( annotationsFromCurrentType != null ) {
|
||||
infoAnnotations.putAll(annotationsFromCurrentType);
|
||||
}
|
||||
}
|
||||
|
||||
// generate a new annotated VC
|
||||
final VariantContextBuilder builder = new VariantContextBuilder(vc).attributes(infoAnnotations);
|
||||
|
||||
// annotate genotypes, creating another new VC in the process
|
||||
final VariantContext annotated = builder.genotypes(annotateGenotypes(null, null, null, vc, perReadAlleleLikelihoodMap)).make();
|
||||
// create a new VC with info and genotype annotations
|
||||
final VariantContext annotated = builder.attributes(infoAnnotations).make();
|
||||
|
||||
// annotate db occurrences
|
||||
return annotateDBs(tracker, annotated);
|
||||
|
|
|
|||
Loading…
Reference in New Issue