Skip to content

Commit

Permalink
Merge remote-tracking branch 'unstable/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Geraldine Van der Auwera committed Nov 9, 2017
2 parents 50aa013 + 5ec70e2 commit fcf2061
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@ public WalkerTestSpec testDefaultBaseQualities(final Integer value, final String

@Test()
public void testDefaultBaseQualities20() {
executeTest("testDefaultBaseQualities20", testDefaultBaseQualities(20, "90a450f74554bbd2cc3a9e0f9de68e26"));
executeTest("testDefaultBaseQualities20", testDefaultBaseQualities(20, "da5a4293e125f00ecbdfd450b80d8357"));
}

@Test()
public void testDefaultBaseQualities30() {
executeTest("testDefaultBaseQualities30", testDefaultBaseQualities(30, "ec11db4173ce3b8e43997f00dab5ae26"));
executeTest("testDefaultBaseQualities30", testDefaultBaseQualities(30, "c82e72ee08d545266927a7f2e8ab24c3"));
}

@Test(expectedExceptions = Exception.class)
Expand Down Expand Up @@ -732,10 +732,10 @@ private File testBAMFeatures(final String args, final String md5) {
public void testSAMWriterFeatures() {
testBAMFeatures("-compress 0", "49228d4f5b14c4cfed4a09372eb71139");
testBAMFeatures("-compress 9", "bc61a1b2b53a2ec7c63b533fa2f8701b");
testBAMFeatures("-simplifyBAM", "a1127bab46674b165496b79bb9fa7964");
testBAMFeatures("-simplifyBAM", "f66b671b32d1bbbf65a88585a64b556a");

//Validate MD5
final String expectedMD5 = "c58b9114fc15b53655f2c03c819c29fd";
final String expectedMD5 = "a0c0f1fafc248ac82a84b8ca71292caf";
final File md5Target = testBAMFeatures("--generate_md5", expectedMD5);
final File md5File = new File(md5Target.getAbsoluteFile() + ".md5");
md5File.deleteOnExit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ public Object[][] getCRAMData() {
return new Object[][] {
{"PrintReads", "exampleBAM.bam", "", "cram", ""}, // Bypass MD5 check since the CRAM header stores the file name
{"PrintReads", "exampleCRAM.cram", "", "cram", ""},
{"PrintReads", "exampleCRAM.cram", "", "bam", "e7834d5992a69143d7c463275213bbf8"},
{"PrintReads", "exampleCRAM.cram", " -L chr1:200", "bam", "d362fbf30a2c77a2653f1c8eb2dd8fc1"},
{"PrintReads", "exampleCRAM.cram", "", "bam", "50c55e1040aa0ffd4036aa581fcfe8af"},
{"PrintReads", "exampleCRAM.cram", " -L chr1:200", "bam", "f74f78bd16aed8a395f0e79e3898ab19"},
{"CountLoci", "exampleCRAM.cram", "", "txt", "ade93df31a6150321c1067e749cae9be"},
{"CountLoci", "exampleCRAM.cram", " -L chr1:200", "txt", "b026324c6904b2a9cb4b88d6d61c81d1"},
{"CountReads", "exampleCRAM.cram", "", "txt", "4fbafd6948b6529caa2b78e476359875"},
{"CountReads", "exampleCRAM.cram", " -L chr1:200", "txt", "b026324c6904b2a9cb4b88d6d61c81d1"},
{"PrintReads", "exampleCRAM.cram", " -L chr1:200 -L chr1:89597", "bam", "a11bd125b69f651aaa2ae68c8ccab22f"},
{"PrintReads", "exampleCRAM.cram", " -L chr1:200 -L chr1:89597", "bam", "1a6331f0e7afdccd07425df251d28811"},
{"CountLoci", "exampleCRAM.cram", " -L chr1:200 -L chr1:89597", "txt", "26ab0db90d72e28ad0ba1e22ee510510"},
{"CountReads", "exampleCRAM.cram", " -L chr1:200 -L chr1:89597", "txt", "6d7fce9fee471194aa8b5b6e47267f03"},
{"PrintReads", "exampleCRAM-nobai-withcrai.cram", " -L chr1:200 -L chr1:89597", "bam", "9e3e8b5a58dfcb50f5b270547c01d56a"},
{"PrintReads", "exampleCRAM-nobai-withcrai.cram", " -L chr1:200 -L chr1:89597", "bam", "41f8ebb256120befc6ea7d228915b349"},
{"CountLoci", "exampleCRAM-nobai-withcrai.cram", " -L chr1:200 -L chr1:89597", "txt", "26ab0db90d72e28ad0ba1e22ee510510"},
{"CountReads", "exampleCRAM-nobai-withcrai.cram", " -L chr1:200 -L chr1:89597", "txt", "6d7fce9fee471194aa8b5b6e47267f03"},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testUnmappedReadInclusion() {
// our base file
File baseOutputFile = createTempFile("testUnmappedReadInclusion",".bam");
spec.setOutputFileLocation(baseOutputFile);
spec.addAuxFile("c66bb2c3c5382e2acff09b2b359562bb",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
spec.addAuxFile("4eeb9b07d3c9ddd4ea9eada7805903a2",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
spec.addAuxFile("fadcdf88597b9609c5f2a17f4c6eb455", createTempFileFromBase(baseOutputFile.getAbsolutePath().substring(0,baseOutputFile.getAbsolutePath().indexOf(".bam"))+".bai"));

executeTest("testUnmappedReadInclusion",spec);
Expand Down Expand Up @@ -109,8 +109,8 @@ public void testMixedMappedAndUnmapped() {
// our base file
File baseOutputFile = createTempFile("testMixedMappedAndUnmapped",".bam");
spec.setOutputFileLocation(baseOutputFile);
spec.addAuxFile("c64cff3ed376bc8f2977078dbdac4518",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
spec.addAuxFile("fa90ff91ac0cc689c71a3460a3530b8b", createTempFileFromBase(baseOutputFile.getAbsolutePath().substring(0,baseOutputFile.getAbsolutePath().indexOf(".bam"))+".bai"));
spec.addAuxFile("70ac0317c0c13d885e6c2de4f837cdd3",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
spec.addAuxFile("df469db01610ddb731868dfb28917142", createTempFileFromBase(baseOutputFile.getAbsolutePath().substring(0,baseOutputFile.getAbsolutePath().indexOf(".bam"))+".bai"));

executeTest("testMixedMappedAndUnmapped",spec);
}
Expand Down
2 changes: 1 addition & 1 deletion public/gatk-root/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<dependency>
<groupId>com.intel.gkl</groupId>
<artifactId>gkl</artifactId>
<version>0.5.2</version>
<version>0.6.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
*
* <h3>Caveats</h3>
* <ul>
* <li>Some annotations cannot be applied to all variant sites, so VCFs typically contain records where some annotation values are missing. By default this tool the tool will emit the special value NA for the missing annotations if you request export of an annotation for which not all records have values. You can override this behavior by setting --errorIfMissingData in the command line. As a result, the tool will throw an error if a record is missing a value.</li>
* <li>Some annotations cannot be applied to all variant sites, so VCFs typically contain records where some annotation values are missing. By default this tool will emit the special value NA for the missing annotations if you request export of an annotation for which not all records have values. You can override this behavior by setting --errorIfMissingData in the command line. As a result, the tool will throw an error if a record is missing a value.</li>
* <li>When you request export of sample-level annotations (FORMAT field annotations such as GT), the annotations will be identified per-sample. If multiple samples are present in the VCF, the columns will be ordered alphabetically by sample name (SM tag).</li>
* </ul>
*
Expand Down Expand Up @@ -181,7 +181,7 @@ public class VariantsToTable extends RodWalker<Integer, Integer> {

/**
* By default, this tool will write out NA values indicating missing data when it encounters a field without a value in a record.
* If this flag is added to the command, the tool will instead exit with an error if missing data is encountered..
* If this flag is added to the command, the tool will instead exit with an error if missing data is encountered.
*/
@Advanced
@Argument(fullName="errorIfMissingData", shortName="EMD", doc="If provided, we will require every record to contain every field", required=false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public class BAQIntegrationTest extends WalkerTest {
// --------------------------------------------------------------------------------------------------------------
@Test
public void testPrintReadsNoBAQ() {
WalkerTestSpec spec = new WalkerTestSpec( baseCommand +" -baq OFF", 1, Arrays.asList("e33187ca383c7f5c75c5d547ec79e1cb"));
WalkerTestSpec spec = new WalkerTestSpec( baseCommand +" -baq OFF", 1, Arrays.asList("526dbbb390dbd36daa70ac35a8eddc36"));
executeTest(String.format("testPrintReadsNoBAQ"), spec);
}

@Test
public void testPrintReadsRecalBAQ() {
WalkerTestSpec spec = new WalkerTestSpec( baseCommand +" -baq RECALCULATE", 1, Arrays.asList("a25043edfbfa4f21a13cc21064b460df"));
WalkerTestSpec spec = new WalkerTestSpec( baseCommand +" -baq RECALCULATE", 1, Arrays.asList("25cb8f91e31a07cca2e141a119c9e020"));
executeTest(String.format("testPrintReadsRecalBAQ"), spec);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ public void testClipper(String name, String args, String md51, String md52) {
}

final static String Q10ClipOutput = "b29c5bc1cb9006ed9306d826a11d444f";
@Test public void testQClip0() { testClipper("clipQSum0", "-QT 0", "117a4760b54308f81789c39b1c9de578", "bcf0d1e13537f764f006ef6d9b401ea7"); }
@Test public void testQClip2() { testClipper("clipQSum2", "-QT 2", Q10ClipOutput, "27847d330b962e60650df23b6efc8c3c"); }
@Test public void testQClip10() { testClipper("clipQSum10", "-QT 10", "b29c5bc1cb9006ed9306d826a11d444f", "27847d330b962e60650df23b6efc8c3c"); }
@Test public void testQClip20() { testClipper("clipQSum20", "-QT 20", "6c3434dce66ae5c9eeea502f10fb9bee", "f89ec5439e88f5a75433150da0069034"); }
@Test public void testQClip0() { testClipper("clipQSum0", "-QT 0", "117a4760b54308f81789c39b1c9de578", "2e617e0f0b4a1bf45dbb666da0a6a16c"); }
@Test public void testQClip2() { testClipper("clipQSum2", "-QT 2", Q10ClipOutput, "1b0d2317dfd1fd5a4d14eea3f560ac17"); }
@Test public void testQClip10() { testClipper("clipQSum10", "-QT 10", "b29c5bc1cb9006ed9306d826a11d444f", "1b0d2317dfd1fd5a4d14eea3f560ac17"); }
@Test public void testQClip20() { testClipper("clipQSum20", "-QT 20", "6c3434dce66ae5c9eeea502f10fb9bee", "3a9a10966cce58baf9e9400a2c5f99ca"); }

@Test public void testClipRange1() { testClipper("clipRange1", "-CT 1-5", "b5acd753226e25b1e088838c1aab9117", "987007f6e430cad4cb4a8d1cc1f45d91"); }
@Test public void testClipRange2() { testClipper("clipRange2", "-CT 1-5,11-15", "be4fcad5b666a5540028b774169cbad7", "ec4cf54ed50a6baf69dbf98782c19aeb"); }
@Test public void testClipRange1() { testClipper("clipRange1", "-CT 1-5", "b5acd753226e25b1e088838c1aab9117", "701f03388ffaeb0f92be1e719e2477df"); }
@Test public void testClipRange2() { testClipper("clipRange2", "-CT 1-5,11-15", "be4fcad5b666a5540028b774169cbad7", "7dc5da735c437b6523e0823a1ed0e981"); }

@Test public void testClipSeq() { testClipper("clipSeqX", "-X CCCCC", "db199bd06561c9f2122f6ffb07941fbc", "a9cf540e4ed2514061248a878e09a09c"); }
@Test public void testClipSeqFile() { testClipper("clipSeqXF", "-XF " + privateTestDir + "seqsToClip.fasta", "22cd33dbd06cc425ce3626360367bfca", "906871df304dd966682e5798d59fc86b"); }
@Test public void testClipSeq() { testClipper("clipSeqX", "-X CCCCC", "db199bd06561c9f2122f6ffb07941fbc", "daa41acd8c9f1a75c8107d0fd0db8cf0"); }
@Test public void testClipSeqFile() { testClipper("clipSeqXF", "-XF " + privateTestDir + "seqsToClip.fasta", "22cd33dbd06cc425ce3626360367bfca", "b1812de69c967059362139a269044362"); }

@Test public void testClipMulti() { testClipper("clipSeqMulti", "-QT 10 -CT 1-5 -XF " + privateTestDir + "seqsToClip.fasta -X CCCCC", "e4a88276a6f76ccc2b05a06c76305a1c", "b41995fea04034ca0427c4a71504ef83"); }
@Test public void testClipMulti() { testClipper("clipSeqMulti", "-QT 10 -CT 1-5 -XF " + privateTestDir + "seqsToClip.fasta -X CCCCC", "e4a88276a6f76ccc2b05a06c76305a1c", "9f999ed70684fdfb8dba019ff71741fe"); }

@Test public void testClipNs() { testClipper("testClipNs", "-QT 10 -CR WRITE_NS", Q10ClipOutput, "27847d330b962e60650df23b6efc8c3c"); }
@Test public void testClipQ0s() { testClipper("testClipQs", "-QT 10 -CR WRITE_Q0S", Q10ClipOutput, "195b8bdfc0186fdca742764aa9b06363"); }
@Test public void testClipSoft() { testClipper("testClipSoft", "-QT 10 -CR SOFTCLIP_BASES", Q10ClipOutput, "08d16051be0b3fa3453eb1e6ca48b098"); }
@Test public void testClipNs() { testClipper("testClipNs", "-QT 10 -CR WRITE_NS", Q10ClipOutput, "1b0d2317dfd1fd5a4d14eea3f560ac17"); }
@Test public void testClipQ0s() { testClipper("testClipQs", "-QT 10 -CR WRITE_Q0S", Q10ClipOutput, "b7ce95f277d5f66b7f5a60ffbf9692cf"); }
@Test public void testClipSoft() { testClipper("testClipSoft", "-QT 10 -CR SOFTCLIP_BASES", Q10ClipOutput, "55c9d86c18c5a59a98429e8a5076e871"); }

@Test
public void testUseOriginalQuals() {
Expand All @@ -74,7 +74,7 @@ public void testUseOriginalQuals() {
" -OQ -QT 4 -CR WRITE_Q0S" +
" -o %s -os %s",
2,
Arrays.asList("a2819d54b2110150e38511f5a55db91d", "55c01ccc2e84481b22d3632cdb06c8ba"));
Arrays.asList("0e4c116fa07c3d8190eefe6968a0b819", "55c01ccc2e84481b22d3632cdb06c8ba"));
executeTest("clipOriginalQuals", spec);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,27 @@ public String toString() {
@DataProvider(name = "PRTest")
public Object[][] createPrintReadsTestData() {
return new Object[][]{
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, "", "0aa3505ba61e05663e629011dd54e423")},
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, "", "83d1454dc01cd2e7458dad4012695f64")},
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, " -compress 0", "0aec10d19e0dbdfe1d0cbb3eddaf623a")},
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, " -simplifyBAM", "c565d9cd4838a313e7bdb30530c0cf71")},
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, " -n 10", "917440a38aba707ec0e012168590981a")},
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, " -simplifyBAM", "60255a68df1b8f2fbba373d75274f0de")},
{new PRTest(hg18Reference, new String[]{"HiSeq.1mb.bam"}, " -n 10", "eb7c6bacca5fee09b8df50880eb81ee6")},
// See: GATKBAMIndex.getStartOfLastLinearBin(), BAMScheduler.advance(), IntervalOverlapFilteringIterator.advance()
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, "", "0b58c903f54e8543a8b2ce1439aa769b")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, " -L 1", "5b1154cc81dba6bcfe76188e4df8d79c")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.cram"}, " -L 1:10001 -L GL000192.1:500204", "a84efdc3d4a8d6329b5f0b494dd280d2")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, " -L unmapped", "cbd3d1d50c8674f79033aa8c36aa3cd1")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, " -L 1 -L unmapped", "5b1154cc81dba6bcfe76188e4df8d79c")},
{new PRTest(b37KGReference, new String[]{"oneReadAllInsertion.bam"}, "", "e212d1799ae797e781b17e630656a9a1")},
{new PRTest(b37KGReference, new String[]{"NA12878.1_10mb_2_10mb.bam"}, "", "0387c61303140d8899fcbfdd3e72ed80")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, "", "3d67c398ce2ac1deeddbccbd850380a7")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, " -L 1", "37cdd8871843693f2650d7b48c8ae1d4")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.cram"}, " -L 1:10001 -L GL000192.1:500204", "4d63fd6e977a53e5d9590bd030b40bd0")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, " -L unmapped", "a834400e3bd69045eb8a9e94131633f5")},
{new PRTest(b37KGReference, new String[]{"unmappedFlagReadsInLastLinearBin.bam"}, " -L 1 -L unmapped", "37cdd8871843693f2650d7b48c8ae1d4")},
{new PRTest(b37KGReference, new String[]{"oneReadAllInsertion.bam"}, "", "6c04aac25e2136fee395897aac96bea8")},
{new PRTest(b37KGReference, new String[]{"NA12878.1_10mb_2_10mb.bam"}, "", "57a9bc1f7dd4e7717ee796c484bcf45a")},
// Tests for filtering options
{new PRTest(b37KGReference, new String[]{"NA12878.1_10mb_2_10mb.bam", "NA20313.highCoverageRegion.bam"},
"", "ad56da66be0bdab5a8992de9617ae6a5")},
"", "e691d61df10f7614d73c8ecb46c75ee1")},
{new PRTest(b37KGReference, new String[]{"NA12878.1_10mb_2_10mb.bam", "NA20313.highCoverageRegion.bam"},
" -readGroup SRR359098", "c3bfe28722a665e666098dbb7048a9f1")},
" -readGroup SRR359098", "7644eab114bf537411218f782d75a6a6")},
{new PRTest(b37KGReference, new String[]{"NA12878.1_10mb_2_10mb.bam", "NA20313.highCoverageRegion.bam"},
" -readGroup 20FUK.3 -sn NA12878", "8191f8d635d00b1f4d0993b785cc46c5")},
" -readGroup 20FUK.3 -sn NA12878", "351d5da29874033e50d29c5c36575a6c")},
{new PRTest(b37KGReference, new String[]{"NA12878.1_10mb_2_10mb.bam", "NA20313.highCoverageRegion.bam"},
" -sn na12878", "92a85b4223ec45e114f12a1fe6ebbaeb")},
" -sn na12878", "9056d852418dd2083f38e3eac1551fcd")},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public void testSplitSamFile() {
" --outputRoot " + prefix,
Collections.<String>emptyList()
);
addSplitOutput(spec, prefix, "NA12878", "3e28b666fb673be138eca9bd3db9520b");
addSplitOutput(spec, prefix, "NA12891", "af01069bc3da4252ce8417a03d11f48b");
addSplitOutput(spec, prefix, "NA12892", "cfa1cb6aaca03900160bd5627f4f698b");
addSplitOutput(spec, prefix, "NA12878", "356bddf614a44a0234f7b116f5cde998");
addSplitOutput(spec, prefix, "NA12891", "5dd92a0089e3f781e77d94010264b9fd");
addSplitOutput(spec, prefix, "NA12892", "ea8f16c18c89b49ce9d32d76c6af75f9");
executeTest("testSplitSamFile", spec);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,13 @@ private static GenotypesContext createGenotypesWithSubsettedLikelihoods(final Ge

if ( newLikelihoods == null || (originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0) == 0 && likelihoodsAreUninformative(newLikelihoods) )) {
gb.noPL();
gb.noGQ();
} else {
gb.PL(newLikelihoods);
final int PLindex = MathUtils.maxElementIndex(newLikelihoods);
gb.log10PError(GenotypeLikelihoods.getGQLog10FromLikelihoods(PLindex, newLikelihoods));
}

}

// create the new strand allele counts array from the used alleles
Expand Down
Loading

0 comments on commit fcf2061

Please sign in to comment.