diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperIntegrationTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperIntegrationTest.java index 27622523759..8463cbf7d91 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperIntegrationTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperIntegrationTest.java @@ -1,46 +1,22 @@ package org.broadinstitute.hellbender.tools.walkers; -import com.intel.genomicsdb.reader.GenomicsDBFeatureReader; -import htsjdk.tribble.AbstractFeatureReader; -import htsjdk.tribble.CloseableTribbleIterator; -import htsjdk.tribble.readers.LineIterator; -import htsjdk.tribble.readers.PositionalBufferedStream; -import htsjdk.variant.bcf2.BCF2Codec; -import htsjdk.variant.variantcontext.Genotype; -import htsjdk.variant.variantcontext.GenotypeBuilder; import htsjdk.variant.variantcontext.VariantContext; -import htsjdk.variant.variantcontext.VariantContextBuilder; -import htsjdk.variant.vcf.VCFCodec; import htsjdk.variant.vcf.VCFHeader; import org.broadinstitute.hellbender.CommandLineProgramTest; -import org.broadinstitute.hellbender.Main; -import org.broadinstitute.hellbender.tools.genomicsdb.GenomicsDBConstants; -import org.broadinstitute.hellbender.tools.genomicsdb.GenomicsDBImport; -import org.broadinstitute.hellbender.utils.IntervalUtils; +import org.broadinstitute.hellbender.testutils.ArgumentsBuilder; +import org.broadinstitute.hellbender.testutils.GenomicsDBTestUtils; +import org.broadinstitute.hellbender.testutils.VariantContextTestUtils; import org.broadinstitute.hellbender.utils.SimpleInterval; -import org.broadinstitute.hellbender.utils.Utils; -import org.broadinstitute.hellbender.utils.runtime.ProcessController; -import org.broadinstitute.hellbender.utils.test.ArgumentsBuilder; -import org.broadinstitute.hellbender.utils.test.BaseTest; -import org.broadinstitute.hellbender.utils.test.GenomicsDBTestUtils; -import org.broadinstitute.hellbender.utils.test.VariantContextTestUtils; -import org.broadinstitute.hellbender.utils.variant.GATKVariantContextUtils; -import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.io.File; -import java.io.FileWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.function.BiConsumer; -import java.util.stream.Collectors; -import static org.broadinstitute.hellbender.utils.test.VariantContextTestUtils.getVariantContexts; -import static org.testng.Assert.*; +import static org.broadinstitute.hellbender.testutils.VariantContextTestUtils.getVariantContexts; /** * Created by gauthier on 3/9/18. diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperUnitTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperUnitTest.java index 9b77e7b1262..a4efc5000ff 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperUnitTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/GnarlyGenotyperUnitTest.java @@ -1,7 +1,7 @@ package org.broadinstitute.hellbender.tools.walkers; import htsjdk.variant.variantcontext.*; -import org.broadinstitute.hellbender.utils.test.VariantContextTestUtils; +import org.broadinstitute.hellbender.testutils.VariantContextTestUtils; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/PosteriorProbabilitiesUtilsUnitTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/PosteriorProbabilitiesUtilsUnitTest.java index 20e2dd130f5..7eca8eedfa3 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/PosteriorProbabilitiesUtilsUnitTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/PosteriorProbabilitiesUtilsUnitTest.java @@ -12,9 +12,9 @@ import java.util.*; -import static org.broadinstitute.hellbender.utils.test.VariantContextTestUtils.makeG; -import static org.broadinstitute.hellbender.utils.test.VariantContextTestUtils.makeGwithPLs; -import static org.broadinstitute.hellbender.utils.test.VariantContextTestUtils.makeVC; +import static org.broadinstitute.hellbender.testutils.VariantContextTestUtils.makeG; +import static org.broadinstitute.hellbender.testutils.VariantContextTestUtils.makeGwithPLs; +import static org.broadinstitute.hellbender.testutils.VariantContextTestUtils.makeVC; @SuppressWarnings("unchecked") @@ -70,32 +70,17 @@ private int[] _mleparse(final List s) { */ private Genotype makeGwithLog10GLs(final String sample, final Allele a1, final Allele a2, final double[] log10GLs) { final Genotype gt = new GenotypeBuilder(sample, Arrays.asList(a1, a2)).PL(log10GLs).make(); - if ( log10GLs != null && log10GLs.length > 0 ) { + if (log10GLs != null && log10GLs.length > 0) { Assert.assertNotNull(gt.getPL()); Assert.assertTrue(gt.getPL().length > 0); - for ( final int i : gt.getPL() ) { + for (final int i : gt.getPL()) { Assert.assertTrue(i >= 0); } - Assert.assertNotEquals(Arrays.toString(gt.getPL()),"[0]"); + Assert.assertNotEquals(Arrays.toString(gt.getPL()), "[0]"); } return gt; } - private Genotype makeG(final String sample, final Allele a1, final Allele a2) { - return GenotypeBuilder.create(sample, Arrays.asList(a1, a2)); - } - - private Genotype makeG(final String sample, final Allele a1, final Allele a2, final int... pls) { - return new GenotypeBuilder(sample, Arrays.asList(a1, a2)).PL(pls).make(); - } - - //NOTE: for deletions use the method makeDeletionVC so stop position validates - private VariantContext makeVC(final String source, final List alleles, final Genotype... genotypes) { - final int start = 10; - final int stop = start; - return new VariantContextBuilder(source, "1", start, stop, alleles).genotypes(Arrays.asList(genotypes)).filters((String)null).make(); - } - private VariantContext makeDeletionVC(final String source, final List alleles, final int refLength, final Genotype... genotypes) { final int start = 10; final int stop = start+refLength-1;