gatk-3.8/java/test/org/broadinstitute/sting/gatk/walkers/VariantsToVCFIntegrationTes...

85 lines
3.2 KiB
Java
Raw Normal View History

package org.broadinstitute.sting.gatk.walkers;
import org.broadinstitute.sting.WalkerTest;
import org.junit.Test;
import java.util.List;
import java.util.ArrayList;
/**
* @author aaron
* <p/>
* Class VariantsToVCFIntegrationTest
* <p/>
* test(s) for the VariantsToVCF walker.
*/
public class VariantsToVCFIntegrationTest extends WalkerTest {
@Test
public void testVariantsToVCFUsingGeliInput() {
List<String> md5 = new ArrayList<String>();
md5.add("b4f98bee580508637c88c421064936fc");
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R " + oneKGLocation + "reference/human_b36_both.fasta" +
" -B variant,GeliText," + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.variants.geli.calls" +
" -T VariantsToVCF" +
" -L 1:10,000,000-11,000,000" +
" -sample NA123AB" +
" -o %s",
1, // just one output file
md5);
executeTest("testVariantsToVCFUsingGeliInput #1", spec).getFirst();
}
@Test
public void testGenotypesToVCFUsingGeliInput() {
List<String> md5 = new ArrayList<String>();
md5.add("0f310612c8609cba3dcf9cc97b2c1195");
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R " + oneKGLocation + "reference/human_b36_both.fasta" +
" -B variant,GeliText," + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.lod5.genotypes.geli.calls" +
" -T VariantsToVCF" +
" -L 1:10,000,000-11,000,000" +
" -sample NA123AB" +
" -o %s",
1, // just one output file
md5);
executeTest("testVariantsToVCFUsingGeliInput #2", spec).getFirst();
}
@Test
public void testGenotypesToVCFUsingHapMapInput() {
List<String> md5 = new ArrayList<String>();
md5.add("28728ad3a6af20a1e1aaaf185ffbff2b");
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R " + oneKGLocation + "reference/human_b36_both.fasta" +
" -B variant,HapMap," + validationDataLocation + "rawHapMap.yri.chr1.txt" +
" -T VariantsToVCF" +
" -L 1:1-1,000,000" +
" -o %s",
1, // just one output file
md5);
executeTest("testVariantsToVCFUsingHapMapInput", spec).getFirst();
}
@Test
public void testGenotypesToVCFUsingVCFInput() {
List<String> md5 = new ArrayList<String>();
md5.add("19371e6cfea5f29fb75d5a2be7fccd34");
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-R " + oneKGLocation + "reference/human_b36_both.fasta" +
First step in major cleanup/redo of VCF functionality. Specifically, now: a) VCF track name can work again with 3.3 or 4.0 VCF's when specifying -B name,VCF,file. Code will read header and parse automatically the version. b) Old VCF codec is deprecated. Reader goes now direct from parsing VCF lines into producing VariantContext objects, with no intermediate VCF records. If anyone can't resist the urge to still input files using the old method, a new VCF3Codec is in place with the old code, but it will be eventually deleted. c) VCF headers and VCF info fields no longer keep track of the version. They are parsed into an internal representation and will be output only in VCF4.0 format. d) As a consequence, the existing GATK bug where files are produced with VCF4 body but VCF3.3 headers is solved. e) Several VCF 4.0 writer bugs are now solved. f) Integration test MD5's are changed, mostly because of corrected VCF4.0 headers and because validation data mostly uses now VCF4.0. g) Several VCF files in the ValidationData/ directory have been converted to VCF 4.0 format. I kept the old versions, and the new versions have a .vcf4 extension. Pending issues: a) We are still not dealing with indels consistently or correctly when representing them. This will be a second part of the changes. b) The VCF writer doesn't use VCFRecord but it does still use a lot of leftovers like VCFGenotypeEncoding, VCFGenotypeRecord, etc. This needs to be simplified and cleaned. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3813 348d0f76-0448-11de-a6fe-93d51630548a
2010-07-17 06:49:16 +08:00
" -B variant,VCF," + validationDataLocation + "complexExample.vcf4" +
" -T VariantsToVCF" +
" -o %s",
1, // just one output file
md5);
executeTest("testVariantsToVCFUsingVCFInput", spec).getFirst();
}
}