From 8d814236252feed3c3486514f44e4d0eb4fbf44c Mon Sep 17 00:00:00 2001 From: orlicohen <107129422+orlicohen@users.noreply.github.com> Date: Thu, 4 Aug 2022 10:09:00 -0400 Subject: [PATCH] Cloud tests for CompareReferences and CheckReferenceCompatibility tools (#7973) * Comprehensive cloud tests for CompareReferences and CheckReferenceCompatibility tools. --- .../tools/reference/CompareReferences.java | 2 +- ...ReferenceCompatibilityIntegrationTest.java | 47 +++++++++++++++++++ .../CompareReferencesIntegrationTest.java | 43 +++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/broadinstitute/hellbender/tools/reference/CompareReferences.java b/src/main/java/org/broadinstitute/hellbender/tools/reference/CompareReferences.java index 882612a89ae..fc3d44f8322 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/reference/CompareReferences.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/reference/CompareReferences.java @@ -56,7 +56,7 @@ *
* gatk CompareReferences \ * -R reference1.fasta \ - * -refcomp reference2.fasta + * -refcomp reference2.fasta \ * -O output.fasta \ * -md5-calculation-mode USE_DICT *diff --git a/src/test/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibilityIntegrationTest.java b/src/test/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibilityIntegrationTest.java index 885f99fee5d..7c9f6df6074 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibilityIntegrationTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibilityIntegrationTest.java @@ -8,6 +8,9 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; public class CheckReferenceCompatibilityIntegrationTest extends CommandLineProgramTest { @@ -209,4 +212,48 @@ public void testReferenceCompatibilityNoBAMOrVCF() throws IOException { final String[] args = new String[]{"-refcomp", ref1.getAbsolutePath()}; runCommandLine(args); } + + @DataProvider(name = "cloudInputData") + public Object[][] cloudInputData() { + String testBucket = getGCPTestInputPath() + "org/broadinstitute/hellbender/tools/reference/"; + return new Object[][]{ + // dict, list of refs, expected output, isBAM, isVCF + new Object[]{testBucket + "reads_data_source_test1_withmd5s.bam", + Arrays.asList(testBucket + "hg19mini.fasta"), + new File(getToolTestDataDir(), "expected.testReferenceCompatibilityBAMWithMD5s_exactmatch.table"), + true, false + }, + new Object[]{ testBucket + "example_variants_withSequenceDict_withmd5.vcf", + Arrays.asList(testBucket + "hg19mini.fasta"), + new File(getToolTestDataDir(), "expected.testReferenceCompatibilityVCFWithMD5s.table"), + false, true + }, + }; + } + + @Test(dataProvider = "cloudInputData", groups = "bucket") + public void testReferenceCompatibilityCloudInputs(String dict, List