PLEASE READ ME! In order to prepare for the upcoming changes to VCF4, we felt it was best to split up the vcf3 and vcf4 codecs (vcf4 is not backwards compatible to vcf3 and certain changes are too complex to handle in both codecs). Using the 'VCF' rod type in the GATK will now throw a UserException for vcf3.2 or vcf3.3 files telling you to use the 'VCF3' type instead (and vice versa). Integration/unit tests have been updated. For programmers: note that there is currently a lot of code duplication in the two codecs (although I pulled out the easy stuff to a VCFCodecUtils class); however WE ARE FREEZING THE VCF3 CODEC AND WILL NO LONGER MAKE CHANGES TO IT. All updates/improvements will be targetted to the vcf4 codec only as vcf3 is there only to be able to read legacy files. People should really be using vcf4 files only.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5787 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2011-05-11 12:07:44 +00:00
parent 852e555c00
commit dfdef2d29b
17 changed files with 80 additions and 77 deletions

View File

@ -33,7 +33,7 @@ import org.broad.tribble.util.popgen.HardyWeinbergCalculation;
import org.broad.tribble.util.variantcontext.*;
import org.broadinstitute.sting.gatk.walkers.phasing.ReadBackedPhasingWalker;
import org.broadinstitute.sting.utils.*;
import org.broad.tribble.vcf.VCFCodec;
import org.broad.tribble.vcf.VCFCodecUtils;
import org.broad.tribble.vcf.VCFConstants;
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
import org.broadinstitute.sting.utils.exceptions.UserException;
@ -566,7 +566,7 @@ public class VariantContextUtils {
VariantContext merged = new VariantContext(name, loc.getContig(), loc.getStart(), loc.getStop(), alleles, genotypes, negLog10PError, filters, (mergeInfoWithMaxAC ? maxACAttributes : attributes) );
// Trim the padded bases of all alleles if necessary
merged = VCFCodec.createVariantContextWithTrimmedAlleles(merged);
merged = VCFCodecUtils.createVariantContextWithTrimmedAlleles(merged);
if ( printMessages && remapped ) System.out.printf("Remapped => %s%n", merged);
return merged;

View File

@ -28,6 +28,7 @@ package org.broadinstitute.sting.gatk.walkers.recalibration;
import org.broad.tribble.bed.BEDCodec;
import org.broad.tribble.dbsnp.DbSNPCodec;
import org.broad.tribble.util.variantcontext.VariantContext;
import org.broad.tribble.vcf.VCF3Codec;
import org.broad.tribble.vcf.VCFCodec;
import org.broadinstitute.sting.commandline.Gather;
import org.broadinstitute.sting.commandline.Output;
@ -192,6 +193,7 @@ public class CountCovariatesWalker extends LocusWalker<CountCovariatesWalker.Cou
if( rod != null ) {
if( rod.getType().equals(DbSNPCodec.class) ||
rod.getType().equals(VCFCodec.class) ||
rod.getType().equals(VCF3Codec.class) ||
rod.getType().equals(BEDCodec.class) ) {
foundDBSNP = true;
break;

View File

@ -15,7 +15,7 @@ public class VariantContextIntegrationTest extends WalkerTest {
private static String root = cmdRoot +
" -D /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
" -B:vcf,VCF " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf";
" -B:vcf,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf";
static HashMap<String, String> expectations = new HashMap<String, String>();
static {
@ -47,7 +47,7 @@ public class VariantContextIntegrationTest extends WalkerTest {
public void testToVCF() {
// this really just tests that we are seeing the same number of objects over all of chr1
WalkerTestSpec spec = new WalkerTestSpec( cmdRoot + " -NO_HEADER -B:vcf,VCF " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.vcf -L 1:1-1000000 -o %s --outputVCF %s",
WalkerTestSpec spec = new WalkerTestSpec( cmdRoot + " -NO_HEADER -B:vcf,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.vcf -L 1:1-1000000 -o %s --outputVCF %s",
2, // just one output file
Arrays.asList("e3c35d0c4b5d4935c84a270f9df0951f", "e6673737acbb6bfabfcd92c4b2268241"));
executeTest("testToVCF", spec);

View File

@ -28,6 +28,7 @@ import net.sf.picard.reference.IndexedFastaSequenceFile;
import net.sf.samtools.SAMSequenceDictionary;
import org.broad.tribble.Tribble;
import org.broad.tribble.index.Index;
import org.broad.tribble.vcf.VCF3Codec;
import org.broad.tribble.vcf.VCFCodec;
import org.broadinstitute.sting.gatk.arguments.ValidationExclusion;
import org.broadinstitute.sting.utils.exceptions.UserException;
@ -82,7 +83,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest {
public void testBuilderIndexUnwriteable() {
File vcfFile = new File(validationDataLocation + "/ROD_validation/read_only/relic.vcf");
try {
builder.loadIndex(vcfFile, new VCFCodec());
builder.loadIndex(vcfFile, new VCF3Codec());
} catch (IOException e) {
e.printStackTrace();
Assert.fail("IO exception unexpected" + e.getMessage());
@ -118,7 +119,7 @@ public class RMDTrackBuilderUnitTest extends BaseTest {
Index ind = null;
try {
ind = builder.loadIndex(vcfFile, new VCFCodec());
ind = builder.loadIndex(vcfFile, new VCF3Codec());
} catch (IOException e) {
e.printStackTrace();
Assert.fail("IO exception unexpected" + e.getMessage());

View File

@ -14,7 +14,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
Arrays.asList("4cc077eb3d343e6b7ba12bff86ebe347"));
executeTest("test file has annotations, not asking for annotations, #1", spec);
}
@ -22,7 +22,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testHasAnnotsNotAsking2() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -B:variant,VCF " + validationDataLocation + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
baseTestString() + " -B:variant,VCF3 " + validationDataLocation + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
Arrays.asList("1de8e943fbf55246ebd19efa32f22a58"));
executeTest("test file has annotations, not asking for annotations, #2", spec);
}
@ -30,7 +30,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
Arrays.asList("11fab4bbd26e0428e6d7b53284a34388"));
executeTest("test file has annotations, asking for annotations, #1", spec);
}
@ -38,7 +38,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testHasAnnotsAsking2() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
baseTestString() + " -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample3.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
Arrays.asList("4fb98442f2c09247fab296872abb5655"));
executeTest("test file has annotations, asking for annotations, #2", spec);
}
@ -46,7 +46,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -B:variant,VCF3 " + validationDataLocation + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
Arrays.asList("4b48e7d095ef73e3151542ea976ecd89"));
executeTest("test file doesn't have annotations, not asking for annotations, #1", spec);
}
@ -54,7 +54,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testNoAnnotsNotAsking2() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -B:variant,VCF " + validationDataLocation + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
baseTestString() + " -B:variant,VCF3 " + validationDataLocation + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
Arrays.asList("28dfbfd178aca071b948cd3dc2365357"));
executeTest("test file doesn't have annotations, not asking for annotations, #2", spec);
}
@ -62,7 +62,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample2empty.vcf -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -L 1:10,020,000-10,021,000", 1,
Arrays.asList("4bcc71f014def02d0fe9237176cc99af"));
executeTest("test file doesn't have annotations, asking for annotations, #1", spec);
}
@ -70,7 +70,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testNoAnnotsAsking2() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
baseTestString() + " -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample3empty.vcf -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
Arrays.asList("c92e614ec796a5b39c5fdcc426410a9b"));
executeTest("test file doesn't have annotations, asking for annotations, #2", spec);
}
@ -86,7 +86,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testNoReads() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
baseTestString() + " -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
Arrays.asList("019d6b1bb7b367759fc42fbdb14b8bf7"));
executeTest("not passing it any reads", spec);
}
@ -94,7 +94,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testDBTagWithDbsnp() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -D " + GATKDataLocation + "dbsnp_129_b36.rod -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
baseTestString() + " -D " + GATKDataLocation + "dbsnp_129_b36.rod -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
Arrays.asList("92a29447f222eadb549dc05ddd11b45e"));
executeTest("getting DB tag with dbSNP", spec);
}
@ -102,7 +102,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testDBTagWithHapMap() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -B:compH3,VCF " + validationDataLocation + "fakeHM3.vcf -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
baseTestString() + " -B:compH3,VCF " + validationDataLocation + "fakeHM3.vcf -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample3empty.vcf -BTI variant", 1,
Arrays.asList("067dde55de98a631225e0e084f0fcc1a"));
executeTest("getting DB tag with HM3", spec);
}
@ -110,7 +110,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
@Test
public void testUsingExpression() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -B:foo,VCF " + validationDataLocation + "targetAnnotations.vcf -G \"Standard\" -B:variant,VCF " + validationDataLocation + "vcfexample3empty.vcf -E foo.AF -BTI variant", 1,
baseTestString() + " -B:foo,VCF " + validationDataLocation + "targetAnnotations.vcf -G \"Standard\" -B:variant,VCF3 " + validationDataLocation + "vcfexample3empty.vcf -E foo.AF -BTI variant", 1,
Arrays.asList("e55b457426d6ba7f8ccea085c23c1350"));
executeTest("using expression", spec);
}

View File

@ -32,7 +32,7 @@ public class GenomicAnnotatorIntegrationTest extends WalkerTest {
String[] md5WithDashSArg = {"3d3b61a83c1189108eabb2df04218099"};
WalkerTestSpec specWithSArg = new WalkerTestSpec(
"-T GenomicAnnotator -R " + b36KGReference +
" -B:variant,vcf /humgen/gsa-hpprojects/GATK/data/Annotations/examples/CEU_hapmap_nogt_23_subset.vcf" +
" -B:variant,vcf3 /humgen/gsa-hpprojects/GATK/data/Annotations/examples/CEU_hapmap_nogt_23_subset.vcf" +
" -B:dbsnp,AnnotatorInputTable /humgen/gsa-hpprojects/GATK/data/Annotations/dbsnp/b130/snp130-b36-only-the-SNPs.txt" +
" -m" + //generate many records from one input record if necessary
" -o %s" +

View File

@ -37,7 +37,7 @@ public class BeagleIntegrationTest extends WalkerTest {
public void testBeagleOutput() {
WalkerTestSpec spec = new WalkerTestSpec(
"-T BeagleOutputToVCF -R " + hg19Reference + " " +
"-B:variant,VCF " + beagleValidationDataLocation + "inttestbgl.input.vcf " +
"-B:variant,VCF3 " + beagleValidationDataLocation + "inttestbgl.input.vcf " +
"-B:beagleR2,BEAGLE " + beagleValidationDataLocation + "inttestbgl.r2 " +
"-B:beagleProbs,BEAGLE " + beagleValidationDataLocation + "inttestbgl.gprobs " +
"-B:beaglePhased,BEAGLE " + beagleValidationDataLocation + "inttestbgl.phased " +
@ -49,7 +49,7 @@ public class BeagleIntegrationTest extends WalkerTest {
public void testBeagleInput() {
WalkerTestSpec spec = new WalkerTestSpec(
"-T ProduceBeagleInput -R " + hg19Reference + " " +
"-B:variant,VCF " + beagleValidationDataLocation + "inttestbgl.input.vcf " +
"-B:variant,VCF3 " + beagleValidationDataLocation + "inttestbgl.input.vcf " +
"-o %s", 1, Arrays.asList("a01c704246f3dd1b9c65774007e51e69"));
executeTest("test BeagleInput", spec);
}

View File

@ -15,7 +15,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
public void testNoAction() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -B:variant,VCF " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
baseTestString() + " -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("4cc077eb3d343e6b7ba12bff86ebe347"));
executeTest("test no action", spec);
}
@ -23,7 +23,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -window 10 -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("ada5540bb3d9b6eb8f1337ba01e90a94"));
executeTest("test clustered SNPs", spec);
}
@ -31,7 +31,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -mask foo -B:mask,VCF3 " + validationDataLocation + "vcfexample2.vcf -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("b0fcac4af3526e3b2a37602ab4c0e6ae"));
executeTest("test mask", spec);
}
@ -39,7 +39,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -filter 'DoC < 20 || FisherStrand > 20.0' -filterName foo -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("7a40795147cbfa92941489d7239aad92"));
executeTest("test filter #1", spec);
}
@ -47,7 +47,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -filter 'AlleleBalance < 70.0 && FisherStrand == 1.4' -filterName bar -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("e9dd4991b1e325847c77d053dfe8ee54"));
executeTest("test filter #2", spec);
}
@ -55,7 +55,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
public void testFilterWithSeparateNames() {
WalkerTestSpec spec = new WalkerTestSpec(
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,
baseTestString() + " --filterName ABF -filter 'AlleleBalance < 0.7' --filterName FSF -filter 'FisherStrand == 1.4' -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("9ded2cce63b8d97550079047051d80a3"));
executeTest("test filter with separate names #2", spec);
}
@ -63,7 +63,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -G_filter 'GQ == 0.60' -G_filterName foo -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("6696e3f65a62ce912230d47cdb0c129b"));
executeTest("test genotype filter #1", spec);
}
@ -71,7 +71,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
@Test
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,
baseTestString() + " -G_filter 'AF == 0.04 && isHomVar == 1' -G_filterName foo -B:variant,VCF3 " + validationDataLocation + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
Arrays.asList("26e5b4ee954c9e0b5eb044afd4b88ee9"));
executeTest("test genotype filter #2", spec);
}

View File

@ -204,7 +204,7 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R " + b36KGReference +
" -B:dbsnp,VCF " + validationDataLocation + "vcfexample3.vcf" +
" -B:dbsnp,VCF3 " + validationDataLocation + "vcfexample3.vcf" +
" -T CountCovariates" +
" -I " + bam +
" -L 1:10,000,000-10,200,000" +
@ -228,7 +228,7 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R " + b36KGReference +
" -B:anyNameABCD,VCF " + validationDataLocation + "vcfexample3.vcf" +
" -B:anyNameABCD,VCF3 " + validationDataLocation + "vcfexample3.vcf" +
" -T CountCovariates" +
" -I " + bam +
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +

View File

@ -18,13 +18,13 @@ public class VariantEvalIntegrationTest extends WalkerTest {
private static String root = cmdRoot +
" -D " + GATKDataLocation + "dbsnp_129_b36.rod" +
" -B:eval,VCF " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf" +
" -B:comp_genotypes,VCF " + validationDataLocation + "yri.trio.gatk.ug.head.vcf";
" -B:eval,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf" +
" -B:comp_genotypes,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.head.vcf";
private static String rootGZ = cmdRoot +
" -D " + GATKDataLocation + "dbsnp_129_b36.rod" +
" -B:eval,VCF " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf.gz" +
" -B:comp_genotypes,VCF " + validationDataLocation + "yri.trio.gatk.ug.head.vcf.gz";
" -B:eval,VCF3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf.gz" +
" -B:comp_genotypes,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.head.vcf.gz";
// TODO -- I can't seem to reindex this VCF using Tabix without it causing failures. Looking into it. [EB]
// private static String[] testsEnumerations = {root, rootGZ};
@ -355,7 +355,7 @@ public class VariantEvalIntegrationTest extends WalkerTest {
public void testVEGenotypeConcordance() {
String vcfFiles[] = {"GenotypeConcordanceEval.vcf", "GenotypeConcordanceEval.vcf.gz"};
for (String vcfFile : vcfFiles) {
WalkerTestSpec spec = new WalkerTestSpec(cmdRoot + " -ST CpG -B:eval,VCF " + validationDataLocation + vcfFile + " -B:comp,VCF " + validationDataLocation + "GenotypeConcordanceComp.vcf -noEV -EV GenotypeConcordance -o %s",
WalkerTestSpec spec = new WalkerTestSpec(cmdRoot + " -ST CpG -B:eval,VCF3 " + validationDataLocation + vcfFile + " -B:comp,VCF3 " + validationDataLocation + "GenotypeConcordanceComp.vcf -noEV -EV GenotypeConcordance -o %s",
1,
Arrays.asList("732d32997b19d9c4f0291287858c56d2"));
executeTestParallel("testVEGenotypeConcordance" + vcfFile, spec);
@ -388,7 +388,7 @@ public class VariantEvalIntegrationTest extends WalkerTest {
HashMap<String, String> expectations = new HashMap<String, String>();
String extraArgs1 = "-L " + validationDataLocation + "chr1_b36_pilot3.interval_list -family NA19238+NA19239=NA19240 -mvq 30 -EV MendelianViolationEvaluator -ST CpG" +
" -B:dbsnp_130,dbSNP " + GATKDataLocation + "dbsnp_130_b36.rod" +
" -B:comp_hapmap,VCF " + validationDataLocation + "CEU_hapmap_nogt_23.vcf";
" -B:comp_hapmap,VCF3 " + validationDataLocation + "CEU_hapmap_nogt_23.vcf";
expectations.put("", "700eba07bac9fba4ed963bbbdcab0e29");
@ -410,7 +410,7 @@ public class VariantEvalIntegrationTest extends WalkerTest {
@Test
public void testCompVsEvalAC() {
String extraArgs = "-T VariantEval -R "+b36KGReference+" -o %s -ST CpG -EV GenotypeConcordance -B:evalYRI,VCF /humgen/gsa-hpprojects/GATK/data/Validation_Data/yri.trio.gatk.ug.very.few.lines.vcf -B:compYRI,VCF /humgen/gsa-hpprojects/GATK/data/Validation_Data/yri.trio.gatk.fake.genotypes.ac.test.vcf";
String extraArgs = "-T VariantEval -R "+b36KGReference+" -o %s -ST CpG -EV GenotypeConcordance -B:evalYRI,VCF3 " + validationDataLocation + "yri.trio.gatk.ug.very.few.lines.vcf -B:compYRI,VCF3 " + validationDataLocation + "yri.trio.gatk.fake.genotypes.ac.test.vcf";
WalkerTestSpec spec = new WalkerTestSpec(extraArgs,1,Arrays.asList("e68272d2f3b7a6439c4949cf0e34beeb"));
executeTestParallel("testCompVsEvalAC",spec);
//executeTest("testCompVsEvalAC",spec);

View File

@ -39,42 +39,42 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
return "-T CombineVariants -NO_HEADER -L 1:1-50,000,000 -o %s -R " + b36KGReference + args;
}
public void test1InOut(String file, String md5) {
test1InOut(file, md5, "");
public void test1InOut(String file, String md5, boolean vcf3) {
test1InOut(file, md5, "", vcf3);
}
public void test1InOut(String file, String md5, String args) {
public void test1InOut(String file, String md5, String args, boolean vcf3) {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString(" -priority v1 -B:v1,VCF " + validationDataLocation + file + args),
baseTestString(" -priority v1 -B:v1,VCF" + (vcf3 ? "3 " : " ") + validationDataLocation + file + args),
1,
Arrays.asList(md5));
executeTest("testInOut1--" + file, spec);
}
public void combine2(String file1, String file2, String args, String md5) {
public void combine2(String file1, String file2, String args, String md5, boolean vcf3) {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString(" -priority v1,v2 -B:v1,VCF " + validationDataLocation + file1 + " -B:v2,VCF " + validationDataLocation + file2 + args),
baseTestString(" -priority v1,v2 -B:v1,VCF" + (vcf3 ? "3 " : " ") + validationDataLocation + file1 + " -B:v2,VCF" + (vcf3 ? "3 " : " ") + validationDataLocation + file2 + args),
1,
Arrays.asList(md5));
executeTest("combine2 1:" + new File(file1).getName() + " 2:" + new File(file2).getName(), spec);
}
@Test public void test1SNP() { test1InOut("pilot2.snps.vcf4.genotypes.vcf", "2117fff6e0d182cd20be508e9661829c"); }
@Test public void test2SNP() { test1InOut("pilot2.snps.vcf4.genotypes.vcf", "2cfaf7af3dd119df08b8a9c1f72e2f93", " -setKey foo"); }
@Test public void test3SNP() { test1InOut("pilot2.snps.vcf4.genotypes.vcf", "1474ac0fde2ce42a3c24f1c97eab333e", " -setKey null"); }
@Test public void testOfficialCEUPilotCalls() { test1InOut("CEU.trio.2010_03.genotypes.vcf.gz", "7fc66df048a0ab08cf507906e1d4a308"); } // official project VCF files in tabix format
@Test public void test1SNP() { test1InOut("pilot2.snps.vcf4.genotypes.vcf", "2117fff6e0d182cd20be508e9661829c", true); }
@Test public void test2SNP() { test1InOut("pilot2.snps.vcf4.genotypes.vcf", "2cfaf7af3dd119df08b8a9c1f72e2f93", " -setKey foo", true); }
@Test public void test3SNP() { test1InOut("pilot2.snps.vcf4.genotypes.vcf", "1474ac0fde2ce42a3c24f1c97eab333e", " -setKey null", true); }
@Test public void testOfficialCEUPilotCalls() { test1InOut("CEU.trio.2010_03.genotypes.vcf.gz", "7fc66df048a0ab08cf507906e1d4a308", false); } // official project VCF files in tabix format
@Test public void test1Indel1() { test1InOut("CEU.dindel.vcf4.trio.2010_06.indel.genotypes.vcf", "ec9715f53dbf4531570557c212822f12"); }
@Test public void test1Indel2() { test1InOut("CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "f1072be5f5c6ee810276d9ca6537224d"); }
@Test public void test1Indel1() { test1InOut("CEU.dindel.vcf4.trio.2010_06.indel.genotypes.vcf", "ec9715f53dbf4531570557c212822f12", false); }
@Test public void test1Indel2() { test1InOut("CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "f1072be5f5c6ee810276d9ca6537224d", false); }
@Test public void combineTrioCalls() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "YRI.trio.2010_03.genotypes.vcf.gz", "", "b77a1eec725201d9d8e74ee0c45638d3"); } // official project VCF files in tabix format
@Test public void combineTrioCallsMin() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "YRI.trio.2010_03.genotypes.vcf.gz", " -minimalVCF", "802977fdfd2f4905b501bb06800f60af"); } // official project VCF files in tabix format
@Test public void combine2Indels() { combine2("CEU.dindel.vcf4.trio.2010_06.indel.genotypes.vcf", "CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "", "a67157287dd2b24b5cdf7ebf8fcbbe9a"); }
@Test public void combineTrioCalls() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "YRI.trio.2010_03.genotypes.vcf.gz", "", "b77a1eec725201d9d8e74ee0c45638d3", false); } // official project VCF files in tabix format
@Test public void combineTrioCallsMin() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "YRI.trio.2010_03.genotypes.vcf.gz", " -minimalVCF", "802977fdfd2f4905b501bb06800f60af", false); } // official project VCF files in tabix format
@Test public void combine2Indels() { combine2("CEU.dindel.vcf4.trio.2010_06.indel.genotypes.vcf", "CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "", "a67157287dd2b24b5cdf7ebf8fcbbe9a", false); }
@Test public void combineSNPsAndIndels() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "", "e1f4718a179f1196538a33863da04f53"); }
@Test public void combineSNPsAndIndels() { combine2("CEU.trio.2010_03.genotypes.vcf.gz", "CEU.dindel.vcf4.low_coverage.2010_06.indel.genotypes.vcf", "", "e1f4718a179f1196538a33863da04f53", false); }
@Test public void uniqueSNPs() { combine2("pilot2.snps.vcf4.genotypes.vcf", "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "", "b3783384b7c8e877b971033e90beba48"); }
@Test public void uniqueSNPs() { combine2("pilot2.snps.vcf4.genotypes.vcf", "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "", "b3783384b7c8e877b971033e90beba48", true); }
@Test public void threeWayWithRefs() {
WalkerTestSpec spec = new WalkerTestSpec(

View File

@ -38,7 +38,7 @@ public class LiftoverVariantsIntegrationTest extends WalkerTest {
@Test
public void testb36Tohg19() {
WalkerTestSpec spec = new WalkerTestSpec(
"-T LiftoverVariants -o %s -R " + b36KGReference + " -B:variant,vcf " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.noheader.vcf -chain " + validationDataLocation + "b36ToHg19.broad.over.chain -dict /seq/references/Homo_sapiens_assembly19/v0/Homo_sapiens_assembly19.dict",
"-T LiftoverVariants -o %s -R " + b36KGReference + " -B:variant,vcf3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.noheader.vcf -chain " + validationDataLocation + "b36ToHg19.broad.over.chain -dict /seq/references/Homo_sapiens_assembly19/v0/Homo_sapiens_assembly19.dict",
1,
Arrays.asList("37e23efd7d6471fc0f807b31ccafe0eb"));
executeTest("test b36 to hg19", spec);
@ -47,7 +47,7 @@ public class LiftoverVariantsIntegrationTest extends WalkerTest {
@Test
public void testb36Tohg19UnsortedSamples() {
WalkerTestSpec spec = new WalkerTestSpec(
"-T LiftoverVariants -o %s -R " + b36KGReference + " -B:variant,vcf " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.noheader.unsortedSamples.vcf -chain " + validationDataLocation + "b36ToHg19.broad.over.chain -dict /seq/references/Homo_sapiens_assembly19/v0/Homo_sapiens_assembly19.dict",
"-T LiftoverVariants -o %s -R " + b36KGReference + " -B:variant,vcf3 " + validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.500.noheader.unsortedSamples.vcf -chain " + validationDataLocation + "b36ToHg19.broad.over.chain -dict /seq/references/Homo_sapiens_assembly19/v0/Homo_sapiens_assembly19.dict",
1,
Arrays.asList("b6ef4a2f026fd3843aeb9ed764a66921"));
executeTest("test b36 to hg19, unsorted samples", spec);

View File

@ -16,7 +16,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
String samplesFile = validationDataLocation + "SelectVariants.samples.txt";
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString(" -sn A -sn '[CDH]' -sn " + samplesFile + " -env -ef -select 'DP < 250' -B:variant,VCF " + testfile + " -NO_HEADER"),
baseTestString(" -sn A -sn '[CDH]' -sn " + samplesFile + " -env -ef -select 'DP < 250' -B:variant,VCF3 " + testfile + " -NO_HEADER"),
1,
Arrays.asList("1df84e2b755cce19f1876710ec38dd2c")
);
@ -29,7 +29,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
String testfile = validationDataLocation + "test.dup.vcf";
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString(" -sn A -sn B -sn C -B:variant,VCF " + testfile + " -NO_HEADER"),
baseTestString(" -sn A -sn B -sn C -B:variant,VCF3 " + testfile + " -NO_HEADER"),
1,
Arrays.asList("fe6963e5fea1d3854634dcf3defd7b92")
);

View File

@ -56,7 +56,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest {
WalkerTestSpec spec = new WalkerTestSpec(
"-T SelectVariants" +
" -R " + b36KGReference +
" -B:variant,vcf,storage=STREAM " + tmpFifo.getAbsolutePath() +
" -B:variant,vcf3,storage=STREAM " + tmpFifo.getAbsolutePath() +
" --NO_HEADER" +
" -o %s",
1,
@ -80,7 +80,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest {
WalkerTestSpec selectTestSpec = new WalkerTestSpec(
"-T SelectVariants" +
" -R " + b36KGReference +
" -B:variant,vcf,storage=STREAM " + testFile +
" -B:variant,vcf3,storage=STREAM " + testFile +
" --NO_HEADER" +
" -select 'QD > 2.0'" +
" -o " + tmpFifo.getAbsolutePath(),
@ -93,7 +93,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest {
selectTestSpec = new WalkerTestSpec(
"-T VariantEval" +
" -R " + b36KGReference +
" -B:eval,vcf " + testFile +
" -B:eval,vcf3 " + testFile +
" -B:comp,vcf,storage=STREAM " + tmpFifo.getAbsolutePath() +
" -EV CompOverlap -noEV -noST" +
" -o %s",

View File

@ -42,7 +42,7 @@ public class ValidateVariantsIntegrationTest extends WalkerTest {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString("validationExampleGood.vcf", "ALL"),
0,
Arrays.asList("")
Arrays.asList("d41d8cd98f00b204e9800998ecf8427e")
);
executeTest("test good file", spec);

View File

@ -21,7 +21,7 @@ public class ValidateRODForReadsIntegrationTest extends WalkerTest {
@Test
public void testSimpleVCFPileup() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -B:vcf,vcf " + vcfFile, 1,
baseTestString() + " -B:vcf,vcf3 " + vcfFile, 1,
Arrays.asList("f7919e9dc156fb5d3ad0541666864ea5"));
executeTest("testSimpleVCFPileup", spec);
}

View File

@ -29,8 +29,8 @@ public class RodSystemValidationIntegrationTest extends WalkerTest {
@Test
public void testSimpleVCFPileup() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString1KG() + " -B:eval,VCF " + validationDataLocation + "MultiSample.vcf", 1,
Arrays.asList("5d84c75746738833b6c9441d9d614553"));
baseTestString1KG() + " -B:eval,VCF3 " + validationDataLocation + "MultiSample.vcf", 1,
Arrays.asList("7dc521914d1fd39cc0cab0220b6187f4"));
executeTest("testSimpleVCFPileup", spec);
}
@ -40,8 +40,8 @@ public class RodSystemValidationIntegrationTest extends WalkerTest {
if (vcf.exists()) vcf.delete();
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString1KG() + " -B:eval,VCF " + validationDataLocation + "justHeader.vcf", 1,
Arrays.asList("b3e80d77f8c05edf2a385b0a87708670"));
baseTestString1KG() + " -B:eval,VCF3 " + validationDataLocation + "justHeader.vcf", 1,
Arrays.asList("fa30619829498040414b45ec78151079"));
executeTest("testEmptyVCF", spec);
}
@ -49,32 +49,32 @@ public class RodSystemValidationIntegrationTest extends WalkerTest {
@Test
public void testComplexVCFPileup() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString1KG() + " -B:eval,VCF " + validationDataLocation + "MultiSample.vcf" +
baseTestString1KG() + " -B:eval,VCF3 " + validationDataLocation + "MultiSample.vcf" +
" -B:eval2,VCF " + validationDataLocation + "NA12878.chr1_10mb_11mb.slx.indels.vcf4"
, 1,
Arrays.asList("8d97cbc29f73a0027267858f961e6fe5"));
Arrays.asList("ad9d697a015860089774452886cc1028"));
executeTest("testComplexVCFPileup", spec);
}
@Test
public void testBTIWithROD() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString1KG() + " -B:eval,VCF " + validationDataLocation + "MultiSample.vcf" +
baseTestString1KG() + " -B:eval,VCF3 " + validationDataLocation + "MultiSample.vcf" +
" -B:eval2,VCF " + validationDataLocation + "NA12878.chr1_10mb_11mb.slx.indels.vcf4" + " -BTI eval"
, 1,
Arrays.asList("ccfc0389a3c614f7892dbe972543f0ec"));
Arrays.asList("92adff4129bc4c6abb96fb67b8bf61b6"));
executeTest("testBTIWithROD", spec);
}
@Test
public void testLargeComplexVCFPileup() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString1KG() + " -B:eval,VCF " + validationDataLocation + "MultiSample.vcf" +
" -B:eval2,VCF " + validationDataLocation + "CEU_hapmap_nogt_23.vcf" +
" -B:eval3,VCF " + validationDataLocation + "CEU_hapmap_nogt_23.vcf" +
baseTestString1KG() + " -B:eval,VCF3 " + validationDataLocation + "MultiSample.vcf" +
" -B:eval2,VCF3 " + validationDataLocation + "CEU_hapmap_nogt_23.vcf" +
" -B:eval3,VCF3 " + validationDataLocation + "CEU_hapmap_nogt_23.vcf" +
" -L 1 -L 2 -L 20"
, 1,
Arrays.asList("8805912af2c38ec8d1cbc8d82532725e"));
Arrays.asList("2069cc9155af2ec10028acc8df4523b3"));
executeTest("testLargeComplexVCFPileup", spec);
}
@ -83,7 +83,7 @@ public class RodSystemValidationIntegrationTest extends WalkerTest {
final String vcfName = validationDataLocation + "bgzipped_vcfs/vcfexample.vcf";
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString1KG() + " -B:eval,VCF " + vcfName +
" -B:eval2,VCF " + vcfName + ".gz" +
" -B:eval2,VCF3 " + vcfName + ".gz" +
" --PerLocusEqual"
, 1,
Arrays.asList("ab3da32eae65e8c15a9f4a787a190a37"));