diff --git a/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java b/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java index 522366289..98df3e159 100755 --- a/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java +++ b/java/src/org/broadinstitute/sting/gatk/contexts/variantcontext/VariantContextUtils.java @@ -687,30 +687,10 @@ public class VariantContextUtils { return uniqify ? sampleName + "." + trackName : sampleName; } - public static VariantContext modifyGenotypes(VariantContext vc, Map genotypes) { - return new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd(), vc.getAlleles(), genotypes, vc.getNegLog10PError(), vc.filtersWereApplied() ? vc.getFilters() : null, vc.getAttributes()); - } - public static VariantContext modifyLocation(VariantContext vc, GenomeLoc loc) { return new VariantContext(vc.getName(), loc.getContig(), loc.getStart(), loc.getStop(), vc.getAlleles(), vc.getGenotypes(), vc.getNegLog10PError(), vc.filtersWereApplied() ? vc.getFilters() : null, vc.getAttributes()); } - public static VariantContext modifyFilters(VariantContext vc, Set filters) { - return new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd() , vc.getAlleles(), vc.getGenotypes(), vc.getNegLog10PError(), filters, vc.getAttributes()); - } - - public static VariantContext modifyAttributes(VariantContext vc, Map attributes) { - return new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd(), vc.getAlleles(), vc.getGenotypes(), vc.getNegLog10PError(), vc.filtersWereApplied() ? vc.getFilters() : null, attributes); - } - - public static Genotype modifyName(Genotype g, String name) { - return new Genotype(name, g.getAlleles(), g.getNegLog10PError(), g.filtersWereApplied() ? g.getFilters() : null, g.getAttributes(), g.genotypesArePhased()); - } - - public static Genotype modifyAttributes(Genotype g, Map attributes) { - return new Genotype(g.getSampleName(), g.getAlleles(), g.getNegLog10PError(), g.filtersWereApplied() ? g.getFilters() : null, attributes, g.genotypesArePhased()); - } - public static VariantContext purgeUnallowedGenotypeAttributes(VariantContext vc, Set allowedAttributes) { if ( allowedAttributes == null ) return vc; @@ -722,10 +702,10 @@ public class VariantContextUtils { if ( allowedAttributes.contains(attr.getKey()) ) attrs.put(attr.getKey(), attr.getValue()); } - newGenotypes.put(genotype.getKey(), VariantContextUtils.modifyAttributes(genotype.getValue(), attrs)); + newGenotypes.put(genotype.getKey(), Genotype.modifyAttributes(genotype.getValue(), attrs)); } - return VariantContextUtils.modifyGenotypes(vc, newGenotypes); + return VariantContext.modifyGenotypes(vc, newGenotypes); } public static BaseUtils.BaseSubstitutionType getSNPSubstitutionType(VariantContext context) { diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/VariantsToVCF.java b/java/src/org/broadinstitute/sting/gatk/walkers/VariantsToVCF.java index 6f6b2f898..860994697 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/VariantsToVCF.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/VariantsToVCF.java @@ -77,14 +77,14 @@ public class VariantsToVCF extends RodWalker { Map attrs = new HashMap(vc.getAttributes()); if ( dbsnp != null ) attrs.put(VariantContext.ID_KEY, dbsnp.getRsID()); - vc = VariantContextUtils.modifyAttributes(vc, attrs); + vc = VariantContext.modifyAttributes(vc, attrs); // set the appropriate sample name if necessary if ( sampleName != null && vc.hasGenotypes() && vc.hasGenotype(INPUT_ROD_NAME) ) { - Genotype g = VariantContextUtils.modifyName(vc.getGenotype(INPUT_ROD_NAME), sampleName); + Genotype g = Genotype.modifyName(vc.getGenotype(INPUT_ROD_NAME), sampleName); Map genotypes = new HashMap(); genotypes.put(sampleName, g); - vc = VariantContextUtils.modifyGenotypes(vc, genotypes); + vc = VariantContext.modifyGenotypes(vc, genotypes); } writeRecord(vc, tracker, ref.getBase()); @@ -110,7 +110,7 @@ public class VariantsToVCF extends RodWalker { } } - Set samples = new TreeSet(); + Set samples = new LinkedHashSet(); if ( sampleName != null ) { samples.add(sampleName); } else { diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java index 0356a0cd2..ac58a6665 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java @@ -119,7 +119,7 @@ public class VariantAnnotator extends RodWalker { // get the list of all sample names from the variant VCF input rod, if applicable Set rodName = new HashSet(); rodName.add("variant"); - TreeSet samples = new TreeSet(SampleUtils.getUniqueSamplesFromRods(getToolkit(), rodName)); + Set samples = SampleUtils.getUniqueSamplesFromRods(getToolkit(), rodName); // add the non-VCF sample from the command-line, if applicable if ( sampleName != null ) { diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/genomicannotator/GenomicAnnotator.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/genomicannotator/GenomicAnnotator.java index 008e2ce74..94e0e4f8b 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/genomicannotator/GenomicAnnotator.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/genomicannotator/GenomicAnnotator.java @@ -212,7 +212,7 @@ public class GenomicAnnotator extends RodWalker implements Tre Set rodName = new HashSet(); rodName.add("variant"); - TreeSet samples = new TreeSet(SampleUtils.getUniqueSamplesFromRods(getToolkit(), rodName)); + Set samples = SampleUtils.getUniqueSamplesFromRods(getToolkit(), rodName); VCFHeader vcfHeader = new VCFHeader(hInfo, samples); vcfWriter.writeHeader(vcfHeader); } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCFWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCFWalker.java index 9d530e218..94d0438ac 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCFWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCFWalker.java @@ -32,7 +32,6 @@ import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.commandline.Output; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; -import org.broadinstitute.sting.gatk.contexts.variantcontext.*; import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrderedDataSource; import org.broadinstitute.sting.gatk.refdata.features.beagle.BeagleFeature; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; @@ -326,7 +325,7 @@ public class BeagleOutputToVCFWalker extends RodWalker { - vcfWriter.add(VariantContextUtils.modifyAttributes(filteredVC, attributes), ref.getBase()); + vcfWriter.add(VariantContext.modifyAttributes(filteredVC, attributes), ref.getBase()); return 1; diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java index e3b59e87e..499da88da 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java @@ -117,7 +117,7 @@ public class VariantFiltrationWalker extends RodWalker { hInfo.add(new VCFHeaderLine("VariantFiltration", "\"" + CommandLineUtils.createApproximateCommandLineArgumentString(getToolkit(), this) + "\"")); } - writer.writeHeader(new VCFHeader(hInfo, new TreeSet(vc.getSampleNames()))); + writer.writeHeader(new VCFHeader(hInfo, vc.getSampleNames())); } public void initialize() { @@ -178,7 +178,7 @@ public class VariantFiltrationWalker extends RodWalker { // make new Genotypes based on filters Map genotypes; if ( genotypeFilterExps.size() == 0 ) { - genotypes = vc.getGenotypes(); + genotypes = null; } else { genotypes = new HashMap(vc.getGenotypes().size()); @@ -186,14 +186,18 @@ public class VariantFiltrationWalker extends RodWalker { for ( Map.Entry genotype : vc.getGenotypes().entrySet() ) { Genotype g = genotype.getValue(); - Set filters = new LinkedHashSet(g.getFilters()); - for ( VariantContextUtils.JexlVCMatchExp exp : genotypeFilterExps ) { - if ( VariantContextUtils.match(vc, g, exp) ) - filters.add(exp.name); + if ( g.isCalled() ) { + Set filters = new LinkedHashSet(g.getFilters()); + + for ( VariantContextUtils.JexlVCMatchExp exp : genotypeFilterExps ) { + if ( VariantContextUtils.match(vc, g, exp) ) + filters.add(exp.name); + } + genotypes.put(genotype.getKey(), new Genotype(genotype.getKey(), g.getAlleles(), g.getNegLog10PError(), filters, g.getAttributes(), g.genotypesArePhased())); + } else { + genotypes.put(genotype.getKey(), g); } - - genotypes.put(genotype.getKey(), new Genotype(genotype.getKey(), g.getAlleles(), g.getNegLog10PError(), filters, g.getAttributes(), g.genotypesArePhased())); } } @@ -214,7 +218,11 @@ public class VariantFiltrationWalker extends RodWalker { filters.add(exp.name); } - VariantContext filteredVC = new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd(), vc.getAlleles(), genotypes, vc.getNegLog10PError(), filters, vc.getAttributes()); + VariantContext filteredVC; + if ( genotypes == null ) + filteredVC = VariantContext.modifyFilters(vc, filters); + else + filteredVC = new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd(), vc.getAlleles(), genotypes, vc.getNegLog10PError(), filters, vc.getAttributes()); writeVCF(filteredVC, context.getReferenceContext().getBase()); } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java index fa702a5c9..06e2b6068 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java @@ -33,7 +33,6 @@ import org.broadinstitute.sting.gatk.filters.BadMateFilter; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.contexts.StratifiedAlignmentContext; -import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContextUtils; import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrderedDataSource; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; import org.broadinstitute.sting.gatk.refdata.utils.helpers.DbSNPHelper; @@ -192,7 +191,7 @@ public class UnifiedGenotyperEngine { Collection variantContexts = annotationEngine.annotateContext(tracker, refContext, stratifiedContexts, call.vc); call.vc = variantContexts.iterator().next(); //We know the collection will always have exactly 1 element. - } + } } if ( call != null && call.vc != null ) { @@ -202,7 +201,7 @@ public class UnifiedGenotyperEngine { if ( rawContext.hasPileupBeenDownsampled() ) { Map attrs = new HashMap(call.vc.getAttributes()); attrs.put(VCFConstants.DOWNSAMPLED_KEY, true); - call.vc = VariantContextUtils.modifyAttributes(call.vc, attrs); + call.vc = VariantContext.modifyAttributes(call.vc, attrs); } } return call; diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/sequenom/SequenomValidationConverter.java b/java/src/org/broadinstitute/sting/gatk/walkers/sequenom/SequenomValidationConverter.java index f7c7997fa..1db28b37d 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/sequenom/SequenomValidationConverter.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/sequenom/SequenomValidationConverter.java @@ -190,7 +190,7 @@ public class SequenomValidationConverter extends RodWalker(vContext, ref.getBase()); } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyVariantCuts.java b/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyVariantCuts.java index 9bc4b06fe..bb47e8f3e 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyVariantCuts.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyVariantCuts.java @@ -220,7 +220,7 @@ public class ApplyVariantCuts extends RodWalker { if ( !filterString.equals(VCFConstants.PASSES_FILTERS_v4) ) { Set filters = new HashSet(); filters.add(filterString); - vc = new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd(), vc.getAlleles(), vc.getGenotypes(), vc.getNegLog10PError(), filters, vc.getAttributes()); + vc = VariantContext.modifyFilters(vc, filters); } } vcfWriter.add( vc, ref.getBase() ); diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java b/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java index c784f4ecb..dde3c4cb4 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java @@ -251,9 +251,7 @@ public class VariantRecalibrator extends RodWalker attrs = new HashMap(vc.getAttributes()); attrs.put("OQ", String.format("%.2f", ((Double)vc.getPhredScaledQual()))); attrs.put("LOD", String.format("%.4f", lod)); - Set filters = new HashSet(); - filters.add(VCFConstants.PASSES_FILTERS_v4); - VariantContext newVC = new VariantContext(vc.getName(), vc.getChr(), vc.getStart(), vc.getEnd(), vc.getAlleles(), vc.getGenotypes(), variantDatum.qual / 10.0, filters, attrs); + VariantContext newVC = VariantContext.modifyPErrorFiltersAndAttributes(vc, variantDatum.qual / 10.0, new HashSet(), attrs); vcfWriter.add( newVC, ref.getBase() ); diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java b/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java index 942d81bf4..9de8769f3 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java @@ -270,7 +270,7 @@ public class SelectVariants extends RodWalker { } attributes.put("DP", depth); - sub = VariantContextUtils.modifyAttributes(sub, attributes); + sub = VariantContext.modifyAttributes(sub, attributes); return sub; } diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelAnnotator.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelAnnotator.java index 454014991..4e682956e 100644 --- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelAnnotator.java +++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelAnnotator.java @@ -7,7 +7,6 @@ import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.commandline.Output; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; -import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContextUtils; import org.broadinstitute.sting.gatk.refdata.*; import org.broadinstitute.sting.gatk.refdata.features.refseq.RefSeqCodec; import org.broadinstitute.sting.gatk.refdata.features.refseq.RefSeqFeature; @@ -187,7 +186,7 @@ public class IndelAnnotator extends RodWalker { Map attrs = new HashMap(vc.getAttributes()); attrs.putAll(annotationMap); - vc = VariantContextUtils.modifyAttributes(vc, attrs); + vc = VariantContext.modifyAttributes(vc, attrs); vcfWriter.add(vc, ref.getBase()); return 1; diff --git a/java/src/org/broadinstitute/sting/utils/SampleUtils.java b/java/src/org/broadinstitute/sting/utils/SampleUtils.java index 74e453d95..f008a9e5f 100755 --- a/java/src/org/broadinstitute/sting/utils/SampleUtils.java +++ b/java/src/org/broadinstitute/sting/utils/SampleUtils.java @@ -84,7 +84,7 @@ public class SampleUtils { * @return the set of unique samples */ public static Set getUniqueSamplesFromRods(GenomeAnalysisEngine toolkit, Collection rodNames) { - Set samples = new TreeSet(); + Set samples = new LinkedHashSet(); for ( VCFHeader header : VCFUtils.getVCFHeadersFromRods(toolkit, rodNames).values() ) samples.addAll(header.getGenotypeSamples()); diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java index ab0b6c019..a46ed91c3 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorIntegrationTest.java @@ -15,7 +15,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testHasAnnotsNotAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("89b846266a0c565b9d2a7dbe793546aa")); + Arrays.asList("30ca0a572407f8f8d69ce83800db35ea")); executeTest("test file has annotations, not asking for annotations, #1", spec); } @@ -31,7 +31,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testHasAnnotsAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("b48199f9dc6f91c61418536151afa8fd")); + Arrays.asList("bcd5c80e54d90f1ddf65e0c47b0710a5")); executeTest("test file has annotations, asking for annotations, #1", spec); } @@ -47,7 +47,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoAnnotsNotAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -B:variant,VCF " + validationDataLocation + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("34d2831e7d843093a2cf47c1f4e5f0f0")); + Arrays.asList("63fcabe0198b88a87ea645ffbf25165f")); executeTest("test file doesn't have annotations, not asking for annotations, #1", spec); } @@ -63,7 +63,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest { public void testNoAnnotsAsking1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1, - Arrays.asList("133275d150a8100ba4dc756d17b23ef1")); + Arrays.asList("10ceed55fd51f104d4b57aa555770253")); executeTest("test file doesn't have annotations, asking for annotations, #1", spec); } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java index dfa4299d7..8478fdf11 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationIntegrationTest.java @@ -16,7 +16,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testNoAction() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("89b846266a0c565b9d2a7dbe793546aa")); + Arrays.asList("a08a88866aac0ec4a844386bea5c585f")); executeTest("test no action", spec); } @@ -24,7 +24,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testClusteredSnps() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -window 10 -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("46877eb3ec258e6b70d8fcacca1acb25")); + Arrays.asList("59f0f365550cc01e0fdef65e98963826")); executeTest("test clustered SNPs", spec); } @@ -32,7 +32,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testMask() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -mask foo -B:mask,VCF " + validationDataLocation + "vcfexample2.vcf -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("650504a58af863d9cef699087a7961aa")); + Arrays.asList("cb67d20027e4e0cb45544a69ff49476e")); executeTest("test mask", spec); } @@ -40,7 +40,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testFilter1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -filter 'DoC < 20 || FisherStrand > 20.0' -filterName foo -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("b0b9110aeff967dd87cd0ec273d20791")); + Arrays.asList("1fdccdb8ca837d5fc7a619d285e2308a")); executeTest("test filter #1", spec); } @@ -48,15 +48,15 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testFilter2() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -filter 'AlleleBalance < 70.0 && FisherStrand == 1.4' -filterName bar -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("8405a7ef69792c239d903d13832a1ea7")); + Arrays.asList("40fdd0321091402a669d7e2eaadf072a")); executeTest("test filter #2", spec); } @Test public void testFilterWithSeparateNames() { WalkerTestSpec spec = new WalkerTestSpec( - baseTestString() + " --filterName ABF -filter 'AlleleBalance < 70.0' --filterName FSF -filter 'FisherStrand == 1.4' -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("8266b9eb2ba35d77ab1cecb395322f31")); + baseTestString() + " --filterName ABF -filter 'AlleleBalance < 0.7' --filterName FSF -filter 'FisherStrand == 1.4' -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, + Arrays.asList("a017fbbb6d610481b174c53d29b1ae5a")); executeTest("test filter with separate names #2", spec); } @@ -64,7 +64,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testGenotypeFilter1() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G_filter 'GQ == 0.60' -G_filterName foo -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("99d8a47623cba215ee7d803c514ef116")); + Arrays.asList("1a200b0e47cac16d1dfd8ce44484c667")); executeTest("test genotype filter #1", spec); } @@ -72,7 +72,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest { public void testGenotypeFilter2() { WalkerTestSpec spec = new WalkerTestSpec( baseTestString() + " -G_filter 'AF == 0.04 && isHomVar == 1' -G_filterName foo -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1, - Arrays.asList("c58ea74c32290c9b4e8ae3dd1d0250e1")); + Arrays.asList("78315a09eb3ac8cc47010bb92fad342f")); executeTest("test genotype filter #2", spec); } } \ No newline at end of file