Skip to content

Commit

Permalink
Remove org.apache.commons.collections.IteratorUtils dependency from t…
Browse files Browse the repository at this point in the history
…he test suite

-This was a dependency of the test suite, but not the GATK proper,
 which caused problems when running the test suite on the packaged
 GATK jar at release time

-Use GATKVCFUtils.readVCF() instead
  • Loading branch information
droazen committed Aug 21, 2013
1 parent 4b00c81 commit 42d771f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Expand Up @@ -47,15 +47,13 @@
package org.broadinstitute.sting.gatk.walkers.genotyper;

import net.sf.samtools.util.BlockCompressedInputStream;
import org.apache.commons.collections.IteratorUtils;
import org.broad.tribble.readers.AsciiLineReader;
import org.broadinstitute.sting.WalkerTest;
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
import org.broadinstitute.sting.utils.exceptions.UserException;
import org.broadinstitute.sting.utils.variant.GATKVCFUtils;
import org.broadinstitute.variant.variantcontext.Genotype;
import org.broadinstitute.variant.variantcontext.VariantContext;
import org.broadinstitute.variant.vcf.VCFCodec;
import org.testng.Assert;
import org.testng.annotations.Test;

Expand Down Expand Up @@ -345,12 +343,12 @@ public void testOnlyEmitSample() throws Exception {
final WalkerTestSpec specAllSamples = new WalkerTestSpec(base, 1, Arrays.asList(""));
specAllSamples.disableShadowBCF();
final File allSamplesVCF = executeTest("testOnlyEmitSampleAllSamples", specAllSamples).first.get(0);
List<VariantContext> allSampleVCs = IteratorUtils.toList(GATKVCFUtils.readAllVCs(allSamplesVCF, new VCFCodec()).getSecond());
final List<VariantContext> allSampleVCs = GATKVCFUtils.readVCF(allSamplesVCF).getSecond();

final WalkerTestSpec onlyHG01879 = new WalkerTestSpec(base + " -onlyEmitSamples HG01879", 1, Arrays.asList(""));
onlyHG01879.disableShadowBCF();
final File onlyHG01879VCF = executeTest("testOnlyEmitSample", onlyHG01879).first.get(0);
List<VariantContext> onlyHG01879VCs = IteratorUtils.toList(GATKVCFUtils.readAllVCs(onlyHG01879VCF, new VCFCodec()).getSecond());
final List<VariantContext> onlyHG01879VCs = GATKVCFUtils.readVCF(onlyHG01879VCF).getSecond();

Assert.assertEquals(allSampleVCs.size(), onlyHG01879VCs.size());
for ( int i = 0; i < allSampleVCs.size(); i++ ) {
Expand Down
Expand Up @@ -46,7 +46,6 @@

package org.broadinstitute.sting.gatk.walkers.variantrecalibration;

import org.apache.commons.collections.IteratorUtils;
import org.broadinstitute.sting.WalkerTest;
import org.broadinstitute.sting.utils.variant.GATKVCFUtils;
import org.broadinstitute.variant.variantcontext.Genotype;
Expand Down
Expand Up @@ -27,7 +27,6 @@

import net.sf.samtools.SAMFileReader;
import net.sf.samtools.SAMRecord;
import org.apache.commons.collections.IteratorUtils;
import org.broadinstitute.sting.BaseTest;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
Expand Down

0 comments on commit 42d771f

Please sign in to comment.