Renamed NO_HEADER to the more accurate no_cmdline_in_header
-- Also no_cmdline_in_header permits us to write contigs into the header, so that the shadow BCF system can work as well
This commit is contained in:
parent
4bde24f020
commit
f77d2e6965
|
|
@ -331,9 +331,9 @@ public class GATKArgumentCollection {
|
|||
//
|
||||
// --------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@Argument(fullName="also_generate_bcf",doc="If provided, whenever we create a VCFWriter we will also write out a BCF file alongside it, for testing purposes",required=false)
|
||||
@Argument(fullName="generateShadowBCF",doc="If provided, whenever we create a VCFWriter we will also write out a BCF file alongside it, for testing purposes",required=false)
|
||||
@Hidden
|
||||
public boolean alsoGenerateBCF = false;
|
||||
// TODO -- remove all code tagged with TODO -- remove me when argument alsoGenerateBCF is removed
|
||||
public boolean generateShadowBCF = false;
|
||||
// TODO -- remove all code tagged with TODO -- remove me when argument generateShadowBCF is removed
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class VariantContextWriterStorage implements Storage<VariantContextWriter
|
|||
VariantContextWriter writer = VariantContextWriterFactory.create(file, this.stream, stub.getMasterSequenceDictionary(), options);
|
||||
|
||||
// if the stub says to test BCF, create a secondary writer to BCF and an 2 way out writer to send to both
|
||||
// TODO -- remove me when argument alsoGenerateBCF is removed
|
||||
// TODO -- remove me when argument generateShadowBCF is removed
|
||||
if ( stub.alsoWriteBCFForTest() && ! VariantContextWriterFactory.isBCFOutput(file, options)) {
|
||||
final File bcfFile = new File(file.getAbsolutePath() + ".bcf");
|
||||
VariantContextWriter bcfWriter = VariantContextWriterFactory.create(bcfFile, stub.getMasterSequenceDictionary(), options);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import java.util.List;
|
|||
* @version 0.1
|
||||
*/
|
||||
public class VCFWriterArgumentTypeDescriptor extends ArgumentTypeDescriptor {
|
||||
public static final String NO_HEADER_ARG_NAME = "NO_HEADER";
|
||||
public static final String NO_HEADER_ARG_NAME = "no_cmdline_in_header";
|
||||
public static final String SITES_ONLY_ARG_NAME = "sites_only";
|
||||
public static final HashSet<String> SUPPORTED_ZIPPED_SUFFIXES = new HashSet<String>();
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ public class VCFWriterArgumentTypeDescriptor extends ArgumentTypeDescriptor {
|
|||
|
||||
@Override
|
||||
public List<ArgumentDefinition> createArgumentDefinitions( ArgumentSource source ) {
|
||||
return Arrays.asList( createDefaultArgumentDefinition(source),createNoHeaderArgumentDefinition(),createSitesOnlyArgumentDefinition());
|
||||
return Arrays.asList( createDefaultArgumentDefinition(source), createNoCommandLineHeaderArgumentDefinition(),createSitesOnlyArgumentDefinition());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -144,12 +144,12 @@ public class VCFWriterArgumentTypeDescriptor extends ArgumentTypeDescriptor {
|
|||
// Should we compress the output stream?
|
||||
boolean compress = isCompressed(writerFileName);
|
||||
|
||||
boolean skipWritingHeader = argumentIsPresent(createNoHeaderArgumentDefinition(),matches);
|
||||
boolean skipWritingCmdLineHeader = argumentIsPresent(createNoCommandLineHeaderArgumentDefinition(),matches);
|
||||
boolean doNotWriteGenotypes = argumentIsPresent(createSitesOnlyArgumentDefinition(),matches);
|
||||
|
||||
// Create a stub for the given object.
|
||||
VariantContextWriterStub stub = (writerFile != null) ? new VariantContextWriterStub(engine, writerFile, compress, argumentSources, skipWritingHeader, doNotWriteGenotypes)
|
||||
: new VariantContextWriterStub(engine, defaultOutputStream, compress, argumentSources, skipWritingHeader, doNotWriteGenotypes);
|
||||
VariantContextWriterStub stub = (writerFile != null) ? new VariantContextWriterStub(engine, writerFile, compress, argumentSources, skipWritingCmdLineHeader, doNotWriteGenotypes)
|
||||
: new VariantContextWriterStub(engine, defaultOutputStream, compress, argumentSources, skipWritingCmdLineHeader, doNotWriteGenotypes);
|
||||
|
||||
// WARNING: Side effects required by engine!
|
||||
parsingEngine.addTags(stub,getArgumentTags(matches));
|
||||
|
|
@ -162,7 +162,7 @@ public class VCFWriterArgumentTypeDescriptor extends ArgumentTypeDescriptor {
|
|||
* Creates the optional compression level argument for the BAM file.
|
||||
* @return Argument definition for the BAM file itself. Will not be null.
|
||||
*/
|
||||
private ArgumentDefinition createNoHeaderArgumentDefinition() {
|
||||
private ArgumentDefinition createNoCommandLineHeaderArgumentDefinition() {
|
||||
return new ArgumentDefinition( ArgumentIOType.ARGUMENT,
|
||||
boolean.class,
|
||||
NO_HEADER_ARG_NAME,
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class VariantContextWriterStub implements Stub<VariantContextWriter>, Var
|
|||
/**
|
||||
* Should the header be written out? A hidden argument.
|
||||
*/
|
||||
private final boolean skipWritingHeader;
|
||||
private final boolean skipWritingCommandLineHeader;
|
||||
|
||||
/**
|
||||
* Should we not write genotypes even when provided?
|
||||
|
|
@ -107,16 +107,16 @@ public class VariantContextWriterStub implements Stub<VariantContextWriter>, Var
|
|||
* @param genotypeFile file to (ultimately) create.
|
||||
* @param isCompressed should we compress the output stream?
|
||||
* @param argumentSources sources.
|
||||
* @param skipWritingHeader skip writing header.
|
||||
* @param skipWritingCommandLineHeader skip writing header.
|
||||
* @param doNotWriteGenotypes do not write genotypes.
|
||||
*/
|
||||
public VariantContextWriterStub(GenomeAnalysisEngine engine, File genotypeFile, boolean isCompressed, Collection<Object> argumentSources, boolean skipWritingHeader, boolean doNotWriteGenotypes) {
|
||||
public VariantContextWriterStub(GenomeAnalysisEngine engine, File genotypeFile, boolean isCompressed, Collection<Object> argumentSources, boolean skipWritingCommandLineHeader, boolean doNotWriteGenotypes) {
|
||||
this.engine = engine;
|
||||
this.genotypeFile = genotypeFile;
|
||||
this.genotypeStream = null;
|
||||
this.isCompressed = isCompressed;
|
||||
this.argumentSources = argumentSources;
|
||||
this.skipWritingHeader = skipWritingHeader;
|
||||
this.skipWritingCommandLineHeader = skipWritingCommandLineHeader;
|
||||
this.doNotWriteGenotypes = doNotWriteGenotypes;
|
||||
}
|
||||
|
||||
|
|
@ -127,16 +127,16 @@ public class VariantContextWriterStub implements Stub<VariantContextWriter>, Var
|
|||
* @param genotypeStream stream to (ultimately) write.
|
||||
* @param isCompressed should we compress the output stream?
|
||||
* @param argumentSources sources.
|
||||
* @param skipWritingHeader skip writing header.
|
||||
* @param skipWritingCommandLineHeader skip writing header.
|
||||
* @param doNotWriteGenotypes do not write genotypes.
|
||||
*/
|
||||
public VariantContextWriterStub(GenomeAnalysisEngine engine, OutputStream genotypeStream, boolean isCompressed, Collection<Object> argumentSources, boolean skipWritingHeader, boolean doNotWriteGenotypes) {
|
||||
public VariantContextWriterStub(GenomeAnalysisEngine engine, OutputStream genotypeStream, boolean isCompressed, Collection<Object> argumentSources, boolean skipWritingCommandLineHeader, boolean doNotWriteGenotypes) {
|
||||
this.engine = engine;
|
||||
this.genotypeFile = null;
|
||||
this.genotypeStream = new PrintStream(genotypeStream);
|
||||
this.isCompressed = isCompressed;
|
||||
this.argumentSources = argumentSources;
|
||||
this.skipWritingHeader = skipWritingHeader;
|
||||
this.skipWritingCommandLineHeader = skipWritingCommandLineHeader;
|
||||
this.doNotWriteGenotypes = doNotWriteGenotypes;
|
||||
}
|
||||
|
||||
|
|
@ -205,17 +205,13 @@ public class VariantContextWriterStub implements Stub<VariantContextWriter>, Var
|
|||
public void writeHeader(VCFHeader header) {
|
||||
vcfHeader = header;
|
||||
|
||||
// Check for the command-line argument header line. If not present, add it in.
|
||||
if (!skipWritingHeader && header.isWriteEngineHeaders()) {
|
||||
|
||||
if (header.isWriteCommandLine()) {
|
||||
VCFHeaderLine commandLineArgHeaderLine = getCommandLineArgumentHeaderLine();
|
||||
boolean foundCommandLineHeaderLine = false;
|
||||
for (VCFHeaderLine line: vcfHeader.getMetaData()) {
|
||||
if ( line.getKey().equals(commandLineArgHeaderLine.getKey()) )
|
||||
foundCommandLineHeaderLine = true;
|
||||
}
|
||||
if ( !foundCommandLineHeaderLine )
|
||||
if ( header.isWriteEngineHeaders() ) {
|
||||
// skip writing the command line header if requested
|
||||
if ( ! skipWritingCommandLineHeader && header.isWriteCommandLine() ) {
|
||||
// Check for the command-line argument header line. If not present, add it in.
|
||||
final VCFHeaderLine commandLineArgHeaderLine = getCommandLineArgumentHeaderLine();
|
||||
final boolean foundCommandLineHeaderLine = vcfHeader.getMetaDataLine(commandLineArgHeaderLine.getKey()) != null;
|
||||
if ( ! foundCommandLineHeaderLine )
|
||||
vcfHeader.addMetaDataLine(commandLineArgHeaderLine);
|
||||
}
|
||||
|
||||
|
|
@ -251,12 +247,12 @@ public class VariantContextWriterStub implements Stub<VariantContextWriter>, Var
|
|||
/**
|
||||
* Should we also write a BCF file alongside our VCF file for testing
|
||||
*
|
||||
* TODO -- remove me when argument alsoGenerateBCF is removed
|
||||
* TODO -- remove me when argument generateShadowBCF is removed
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean alsoWriteBCFForTest() {
|
||||
return ! isCompressed() && getFile() != null && engine.getArguments().alsoGenerateBCF;
|
||||
return ! isCompressed() && getFile() != null && engine.getArguments().generateShadowBCF;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -198,6 +198,20 @@ public class VCFHeader {
|
|||
return Collections.unmodifiableSet(lines);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the VCFHeaderLine whose key equals key. Returns null if no such line exists
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public VCFHeaderLine getMetaDataLine(final String key) {
|
||||
for (final VCFHeaderLine line: getMetaData()) {
|
||||
if ( line.getKey().equals(key) )
|
||||
return line;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the genotyping sample names
|
||||
*
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class SymbolicAllelesIntegrationTest extends WalkerTest {
|
|||
" -genotypeMergeOptions REQUIRE_UNIQUE" +
|
||||
" -setKey null" +
|
||||
" -o %s" +
|
||||
" -NO_HEADER";
|
||||
" --no_cmdline_in_header";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import java.util.Arrays;
|
|||
public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
||||
|
||||
public static String baseTestString() {
|
||||
return "-T VariantAnnotator -R " + b36KGReference + " -NO_HEADER -o %s";
|
||||
return "-T VariantAnnotator -R " + b36KGReference + " --no_cmdline_in_header -o %s";
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -155,7 +155,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
final String MD5 = "bb9a148716fc69d706c5be146c1afa00";
|
||||
for ( String file : Arrays.asList("CEU.exon.2010_03.sites.vcf", "CEU.exon.2010_03.sites.vcf.gz")) {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
baseTestString() + " -A HomopolymerRun --variant:vcf " + validationDataLocation + file + " -L " + validationDataLocation + "CEU.exon.2010_03.sites.vcf -NO_HEADER", 1,
|
||||
baseTestString() + " -A HomopolymerRun --variant:vcf " + validationDataLocation + file + " -L " + validationDataLocation + "CEU.exon.2010_03.sites.vcf --no_cmdline_in_header", 1,
|
||||
Arrays.asList(MD5));
|
||||
executeTest("Testing lookup vcf tabix vs. vcf tribble", spec);
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testSnpEffAnnotations() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T VariantAnnotator -R " + hg19Reference + " -NO_HEADER -o %s -A SnpEff --variant " +
|
||||
"-T VariantAnnotator -R " + hg19Reference + " --no_cmdline_in_header -o %s -A SnpEff --variant " +
|
||||
validationDataLocation + "1kg_exomes_unfiltered.AFR.unfiltered.vcf --snpEffFile " + validationDataLocation +
|
||||
"snpEff2.0.5.AFR.unfiltered.vcf -L 1:1-1,500,000 -L 2:232,325,429",
|
||||
1,
|
||||
|
|
@ -176,7 +176,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testSnpEffAnnotationsUnsupportedVersion() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T VariantAnnotator -R " + hg19Reference + " -NO_HEADER -o %s -A SnpEff --variant " +
|
||||
"-T VariantAnnotator -R " + hg19Reference + " --no_cmdline_in_header -o %s -A SnpEff --variant " +
|
||||
validationDataLocation + "1kg_exomes_unfiltered.AFR.unfiltered.vcf --snpEffFile " + validationDataLocation +
|
||||
"snpEff.AFR.unfiltered.unsupported.version.vcf -L 1:1-1,500,000",
|
||||
1,
|
||||
|
|
@ -190,7 +190,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
final String MD5 = "a78c1e950740d3c13c0258960c5fa8e1";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T VariantAnnotator -R " + b37KGReference + " -A TransmissionDisequilibriumTest --variant:vcf " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf" +
|
||||
" -L " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf -NO_HEADER -ped " + validationDataLocation + "ug.random50000.family.ped -o %s", 1,
|
||||
" -L " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf --no_cmdline_in_header -ped " + validationDataLocation + "ug.random50000.family.ped -o %s", 1,
|
||||
Arrays.asList(MD5));
|
||||
executeTest("Testing TDT annotation ", spec);
|
||||
}
|
||||
|
|
@ -201,7 +201,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
final String MD5 = "32df3ceb63c277df442ed55fb8684933";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T VariantAnnotator -R " + b37KGReference + " -A ChromosomeCounts --variant:vcf " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf" +
|
||||
" -L " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf -NO_HEADER -ped " + validationDataLocation + "ug.random50000.family.ped -o %s", 1,
|
||||
" -L " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf --no_cmdline_in_header -ped " + validationDataLocation + "ug.random50000.family.ped -o %s", 1,
|
||||
Arrays.asList(MD5));
|
||||
executeTest("Testing ChromosomeCounts annotation with PED file", spec);
|
||||
}
|
||||
|
|
@ -211,7 +211,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
|||
final String MD5 = "7f1314fada5cb1f35ba1996f8a7a686b";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T VariantAnnotator -R " + b37KGReference + " -A InbreedingCoeff --variant:vcf " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf" +
|
||||
" -L " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf -NO_HEADER -ped " + validationDataLocation + "ug.random50000.family.ped -o %s", 1,
|
||||
" -L " + validationDataLocation + "ug.random50000.subset300bp.chr1.family.vcf --no_cmdline_in_header -ped " + validationDataLocation + "ug.random50000.family.ped -o %s", 1,
|
||||
Arrays.asList(MD5));
|
||||
executeTest("Testing InbreedingCoeff annotation with PED file", spec);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class BeagleIntegrationTest extends WalkerTest {
|
|||
"--beagleR2:BEAGLE " + beagleValidationDataLocation + "inttestbgl.r2 " +
|
||||
"--beagleProbs:BEAGLE " + beagleValidationDataLocation + "inttestbgl.gprobs " +
|
||||
"--beaglePhased:BEAGLE " + beagleValidationDataLocation + "inttestbgl.phased " +
|
||||
"-o %s -NO_HEADER", 1, Arrays.asList("6d0f213918e3b9ea33bc2f8a51a462f1"));
|
||||
"-o %s --no_cmdline_in_header", 1, Arrays.asList("6d0f213918e3b9ea33bc2f8a51a462f1"));
|
||||
executeTest("test BeagleOutputToVCF", spec);
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ public class BeagleIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T ProduceBeagleInput --variant:VCF /humgen/gsa-hpprojects/GATK/data/Validation_Data/NA12878_HSQ_chr22_14-16m.vcf "+
|
||||
"--validation:VCF /humgen/gsa-hpprojects/GATK/data/Validation_Data/NA12878_OMNI_chr22_14-16m.vcf "+
|
||||
"-L 22:14000000-16000000 -o %s -bvcf %s -bs 0.8 -valp 0.98 -R /humgen/1kg/reference/human_g1k_v37.fasta -NO_HEADER ",2,
|
||||
"-L 22:14000000-16000000 -o %s -bvcf %s -bs 0.8 -valp 0.98 -R /humgen/1kg/reference/human_g1k_v37.fasta --no_cmdline_in_header ",2,
|
||||
Arrays.asList("660986891b30cdc937e0f2a3a5743faa","e96ddd51da9f4a797b2aa8c20e404166"));
|
||||
executeTest("test BeagleInputWithBootstrap",spec);
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ public class BeagleIntegrationTest extends WalkerTest {
|
|||
"--beagleR2:beagle /humgen/gsa-hpprojects/GATK/data/Validation_Data/EUR_beagle_in_test.r2 "+
|
||||
"--beagleProbs:beagle /humgen/gsa-hpprojects/GATK/data/Validation_Data/EUR_beagle_in_test.gprobs.bgl "+
|
||||
"--beaglePhased:beagle /humgen/gsa-hpprojects/GATK/data/Validation_Data/EUR_beagle_in_test.phased.bgl "+
|
||||
"-L 20:1-70000 -o %s -NO_HEADER ",1,Arrays.asList("ddbf490f1d9f37cc79fe414c8d40886f"));
|
||||
"-L 20:1-70000 -o %s --no_cmdline_in_header ",1,Arrays.asList("ddbf490f1d9f37cc79fe414c8d40886f"));
|
||||
|
||||
executeTest("testBeagleChangesSitesToRef",spec);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import java.util.Arrays;
|
|||
public class VariantFiltrationIntegrationTest extends WalkerTest {
|
||||
|
||||
public static String baseTestString() {
|
||||
return "-T VariantFiltration -o %s -NO_HEADER -R " + b36KGReference;
|
||||
return "-T VariantFiltration -o %s --no_cmdline_in_header -R " + b36KGReference;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ import java.util.Map;
|
|||
|
||||
public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
||||
|
||||
private final static String baseCommand = "-T UnifiedGenotyper -R " + b36KGReference + " -nosl -NO_HEADER -glm BOTH -minIndelFrac 0.0 --dbsnp " + b36dbSNP129;
|
||||
private final static String baseCommandIndels = "-T UnifiedGenotyper -R " + b36KGReference + " -nosl -NO_HEADER -glm INDEL -mbq 20 -minIndelFrac 0.0 --dbsnp " + b36dbSNP129;
|
||||
private final static String baseCommandIndelsb37 = "-T UnifiedGenotyper -R " + b37KGReference + " -nosl -NO_HEADER -glm INDEL -mbq 20 --dbsnp " + b37dbSNP132;
|
||||
private final static String baseCommand = "-T UnifiedGenotyper -R " + b36KGReference + " -nosl --no_cmdline_in_header -glm BOTH -minIndelFrac 0.0 --dbsnp " + b36dbSNP129;
|
||||
private final static String baseCommandIndels = "-T UnifiedGenotyper -R " + b36KGReference + " -nosl --no_cmdline_in_header -glm INDEL -mbq 20 -minIndelFrac 0.0 --dbsnp " + b36dbSNP129;
|
||||
private final static String baseCommandIndelsb37 = "-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm INDEL -mbq 20 --dbsnp " + b37dbSNP132;
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
|
|
@ -61,7 +61,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testMultipleSNPAlleles() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl -NO_HEADER -glm BOTH --dbsnp " + b37dbSNP129 + " -I " + validationDataLocation + "multiallelic.snps.bam -o %s -L " + validationDataLocation + "multiallelic.snps.intervals", 1,
|
||||
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm BOTH --dbsnp " + b37dbSNP129 + " -I " + validationDataLocation + "multiallelic.snps.bam -o %s -L " + validationDataLocation + "multiallelic.snps.intervals", 1,
|
||||
Arrays.asList("ec907c65da5ed9b6046404b0f81422d4"));
|
||||
executeTest("test Multiple SNP alleles", spec);
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testBadRead() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl -NO_HEADER -glm BOTH -I " + validationDataLocation + "badRead.test.bam -o %s -L 1:22753424-22753464", 1,
|
||||
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm BOTH -I " + validationDataLocation + "badRead.test.bam -o %s -L 1:22753424-22753464", 1,
|
||||
Arrays.asList("7678827a2ee21870a41c09d28d26b996"));
|
||||
executeTest("test bad read", spec);
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testReverseTrim() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl -NO_HEADER -glm INDEL -I " + validationDataLocation + "CEUTrio.HiSeq.b37.chr20.10_11mb.bam -o %s -L 20:10289124 -L 20:10090289", 1,
|
||||
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -glm INDEL -I " + validationDataLocation + "CEUTrio.HiSeq.b37.chr20.10_11mb.bam -o %s -L 20:10289124 -L 20:10090289", 1,
|
||||
Arrays.asList("a70593bbb5042e2d0e46e3c932cae170"));
|
||||
executeTest("test reverse trim", spec);
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testSLOD() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper -R " + b36KGReference + " -NO_HEADER -glm BOTH --dbsnp " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
"-T UnifiedGenotyper -R " + b36KGReference + " --no_cmdline_in_header -glm BOTH --dbsnp " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
Arrays.asList("e9d23a08472e4e27b4f25e844f5bad57"));
|
||||
executeTest("test SLOD", spec);
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testCompTrack() {
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-T UnifiedGenotyper -R " + b36KGReference + " -NO_HEADER -glm BOTH -comp:FOO " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
"-T UnifiedGenotyper -R " + b36KGReference + " --no_cmdline_in_header -glm BOTH -comp:FOO " + b36dbSNP129 + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1,
|
||||
Arrays.asList("71251d8893649ea9abd5d9aa65739ba1"));
|
||||
executeTest("test using comp track", spec);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + TNTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
@ -39,7 +39,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + TPTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
@ -58,7 +58,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + FPTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
@ -77,7 +77,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + SpecialTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
@ -98,7 +98,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + FPTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
@ -120,7 +120,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + FPTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
@ -139,7 +139,7 @@ public class PhaseByTransmissionIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
buildCommandLine(
|
||||
"-T PhaseByTransmission",
|
||||
"-NO_HEADER",
|
||||
"--no_cmdline_in_header",
|
||||
"-R " + b37KGReference,
|
||||
"--variant " + TPTest,
|
||||
"-ped "+ goodFamilyFile,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class ReadBackedPhasingIntegrationTest extends WalkerTest {
|
|||
" --maxPhaseSites " + maxPhaseSites +
|
||||
" --phaseQualityThresh " + phaseQualityThresh +
|
||||
" -o %s" +
|
||||
" -NO_HEADER";
|
||||
" --no_cmdline_in_header";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class ValidationSiteSelectorIntegrationTest extends WalkerTest {
|
||||
public static String baseTestString(String args) {
|
||||
return "-T ValidationSiteSelector -R " + b36KGReference + " -L 1 -o %s -NO_HEADER -numSites 100 " + args;
|
||||
return "-T ValidationSiteSelector -R " + b36KGReference + " -L 1 -o %s --no_cmdline_in_header -numSites 100 " + args;
|
||||
}
|
||||
|
||||
private static String testfile = validationDataLocation + "test.filtered.maf_annotated.vcf";
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
|||
"-R " + b37KGReference +
|
||||
" -T ApplyRecalibration" +
|
||||
" -L 20:12,000,000-30,000,000" +
|
||||
" -NO_HEADER" +
|
||||
" --no_cmdline_in_header" +
|
||||
" -input " + params.inVCF +
|
||||
" -o %s" +
|
||||
" -tranchesFile " + MD5DB.getMD5FilePath(params.tranchesMD5, null) +
|
||||
|
|
@ -110,7 +110,7 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
|||
" -T ApplyRecalibration" +
|
||||
" -L 20:12,000,000-30,000,000" +
|
||||
" -mode INDEL" +
|
||||
" -NO_HEADER" +
|
||||
" --no_cmdline_in_header" +
|
||||
" -input " + params.inVCF +
|
||||
" -o %s" +
|
||||
" -tranchesFile " + MD5DB.getMD5FilePath(params.tranchesMD5, null) +
|
||||
|
|
@ -126,7 +126,7 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
|||
" -T ApplyRecalibration" +
|
||||
" -L 20:1000100-1000500" +
|
||||
" -mode BOTH" +
|
||||
" -NO_HEADER" +
|
||||
" --no_cmdline_in_header" +
|
||||
" -input " + validationDataLocation + "VQSR.mixedTest.input" +
|
||||
" -o %s" +
|
||||
" -tranchesFile " + validationDataLocation + "VQSR.mixedTest.tranches" +
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class CombineVariantsIntegrationTest extends WalkerTest {
|
||||
public static String baseTestString(String args) {
|
||||
return "-T CombineVariants -NO_HEADER -L 1:1-50,000,000 -o %s -R " + b36KGReference + args;
|
||||
return "-T CombineVariants --no_cmdline_in_header -L 1:1-50,000,000 -o %s -R " + b36KGReference + args;
|
||||
}
|
||||
|
||||
public void test1InOut(String file, String md5) {
|
||||
|
|
@ -62,7 +62,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
|
|||
String file1 = "1000G_omni2.5.b37.sites.vcf";
|
||||
String file2 = "hapmap_3.3.b37.sites.vcf";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T CombineVariants -NO_HEADER -o %s -R " + b37KGReference
|
||||
"-T CombineVariants --no_cmdline_in_header -o %s -R " + b37KGReference
|
||||
+ " -L 1:1-10,000,000 -V:omni " + validationDataLocation + file1
|
||||
+ " -V:hm3 " + validationDataLocation + file2 + args,
|
||||
1,
|
||||
|
|
@ -72,7 +72,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
|
|||
|
||||
public void combinePLs(String file1, String file2, String md5) {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T CombineVariants -NO_HEADER -o %s -R " + b36KGReference + " -priority v1,v2 -V:v1 " + validationDataLocation + file1 + " -V:v2 " + validationDataLocation + file2,
|
||||
"-T CombineVariants --no_cmdline_in_header -o %s -R " + b36KGReference + " -priority v1,v2 -V:v1 " + validationDataLocation + file1 + " -V:v2 " + validationDataLocation + file2,
|
||||
1,
|
||||
Arrays.asList(md5));
|
||||
executeTest("combine PLs 1:" + new File(file1).getName() + " 2:" + new File(file2).getName(), spec);
|
||||
|
|
@ -119,7 +119,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
|
|||
String file1 = "combine.1.vcf";
|
||||
String file2 = "combine.2.vcf";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T CombineVariants -NO_HEADER -o %s -R " + b37KGReference
|
||||
"-T CombineVariants --no_cmdline_in_header -o %s -R " + b37KGReference
|
||||
+ " -V:one " + validationDataLocation + file1
|
||||
+ " -V:two " + validationDataLocation + file2 + args,
|
||||
1,
|
||||
|
|
@ -135,7 +135,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void combineDBSNPDuplicateSites() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T CombineVariants -NO_HEADER -L 1:902000-903000 -o %s -R " + b37KGReference + " -V:v1 " + b37dbSNP132,
|
||||
"-T CombineVariants --no_cmdline_in_header -L 1:902000-903000 -o %s -R " + b37KGReference + " -V:v1 " + b37dbSNP132,
|
||||
1,
|
||||
Arrays.asList("a838dc241cf357466cd4331fd298c73a"));
|
||||
executeTest("combineDBSNPDuplicateSites:", spec);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class LeftAlignVariantsIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testLeftAlignment() {
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T LeftAlignVariants -o %s -R " + b37KGReference + " --variant:vcf " + validationDataLocation + "forLeftAlignVariantsTest.vcf -NO_HEADER",
|
||||
"-T LeftAlignVariants -o %s -R " + b37KGReference + " --variant:vcf " + validationDataLocation + "forLeftAlignVariantsTest.vcf --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("8e0991576518823b339a4e2f83299d4f"));
|
||||
executeTest("test left alignment", spec);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import java.util.Arrays;
|
|||
|
||||
public class SelectVariantsIntegrationTest extends WalkerTest {
|
||||
public static String baseTestString(String args) {
|
||||
return "-T SelectVariants -R " + b36KGReference + " -L 1 -o %s -NO_HEADER" + args;
|
||||
return "-T SelectVariants -R " + b36KGReference + " -L 1 -o %s --no_cmdline_in_header" + args;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -30,7 +30,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String samplesFile = validationDataLocation + "SelectVariants.samples.txt";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b36KGReference + " -L 1:1-1000000 -o %s -NO_HEADER -xl_sn A -xl_sf " + samplesFile + " --variant " + testfile,
|
||||
"-T SelectVariants -R " + b36KGReference + " -L 1:1-1000000 -o %s --no_cmdline_in_header -xl_sn A -xl_sf " + samplesFile + " --variant " + testfile,
|
||||
1,
|
||||
Arrays.asList("730f021fd6ecf1d195dabbee2e233bfd")
|
||||
);
|
||||
|
|
@ -56,7 +56,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "NA12878.hg19.example1.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + hg19Reference + " -sn NA12878 -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + hg19Reference + " -sn NA12878 -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("929bbb96381541c162dc7e5462e26ea2")
|
||||
);
|
||||
|
|
@ -69,7 +69,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "NA12878.hg19.example1.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + hg19Reference + " -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + hg19Reference + " -L 20:1012700-1020000 --variant " + b37hapmapGenotypes + " -disc " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("5d7d899c0c4954ec59104aebfe4addd5")
|
||||
);
|
||||
|
|
@ -82,7 +82,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "NA12878.hg19.example1.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + hg19Reference + " -sn NA12878 -L 20:1012700-1020000 -conc " + b37hapmapGenotypes + " --variant " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + hg19Reference + " -sn NA12878 -L 20:1012700-1020000 -conc " + b37hapmapGenotypes + " --variant " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("d2ba3ea30a810f6f0fbfb1b643292b6a")
|
||||
);
|
||||
|
|
@ -95,7 +95,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "complexExample1.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b36KGReference + " -restrictAllelesTo MULTIALLELIC -selectType MIXED --variant " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + b36KGReference + " -restrictAllelesTo MULTIALLELIC -selectType MIXED --variant " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("e0b12c0b47a8a7a988b3587b47bfa8cf")
|
||||
);
|
||||
|
|
@ -108,7 +108,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "combine.3.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b36KGReference + " -sn NA12892 --variant:dbsnp " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + b36KGReference + " -sn NA12892 --variant:dbsnp " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("167a1265df820978a74c267df44d5c43")
|
||||
);
|
||||
|
|
@ -121,7 +121,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "combine.3.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b36KGReference + " -regenotype -sn NA12892 --variant " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + b36KGReference + " -regenotype -sn NA12892 --variant " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("0fd8e52bdcd1f4b921d8fb5c689f196a")
|
||||
);
|
||||
|
|
@ -134,7 +134,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "selectVariants.onePosition.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b36KGReference + " -select 'KG_FREQ < 0.5' --variant " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + b36KGReference + " -select 'KG_FREQ < 0.5' --variant " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("ffa2524380d84a870d2e4a33d9f3d31a")
|
||||
);
|
||||
|
|
@ -147,7 +147,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testFile = validationDataLocation + "vcf4.1.example.vcf";
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b37KGReference + " --variant " + testFile + " -o %s -NO_HEADER",
|
||||
"-T SelectVariants -R " + b37KGReference + " --variant " + testFile + " -o %s --no_cmdline_in_header",
|
||||
1,
|
||||
Arrays.asList("f17885e5cbd5387edb99112047ea43c1")
|
||||
);
|
||||
|
|
@ -182,7 +182,7 @@ public class SelectVariantsIntegrationTest extends WalkerTest {
|
|||
String testfile = validationDataLocation + "multi-allelic.bi-allelicInGIH.vcf";
|
||||
String samplesFile = validationDataLocation + "GIH.samples.list";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(
|
||||
"-T SelectVariants -R " + b37KGReference + " -o %s -NO_HEADER -sf " + samplesFile + " --excludeNonVariants --variant " + testfile,
|
||||
"-T SelectVariants -R " + b37KGReference + " -o %s --no_cmdline_in_header -sf " + samplesFile + " --excludeNonVariants --variant " + testfile,
|
||||
1,
|
||||
Arrays.asList("3fb50cc1c955491048108956d7087c35")
|
||||
);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest {
|
|||
"-T SelectVariants" +
|
||||
" -R " + b36KGReference +
|
||||
" --variant:vcf3,storage=STREAM " + tmpFifo.getAbsolutePath() +
|
||||
" --NO_HEADER" +
|
||||
" ---no_cmdline_in_header" +
|
||||
" -o %s",
|
||||
1,
|
||||
Arrays.asList("658f580f7a294fd334bd897102616fed")
|
||||
|
|
@ -81,7 +81,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest {
|
|||
"-T SelectVariants" +
|
||||
" -R " + b36KGReference +
|
||||
" --variant:vcf3,storage=STREAM " + testFile +
|
||||
" --NO_HEADER" +
|
||||
" ---no_cmdline_in_header" +
|
||||
" -select 'QD > 2.0'" +
|
||||
" -o " + tmpFifo.getAbsolutePath(),
|
||||
0,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest {
|
|||
" -T VariantsToVCF" +
|
||||
" -L 1:1-30,000,000" +
|
||||
" -o %s" +
|
||||
" -NO_HEADER",
|
||||
" --no_cmdline_in_header",
|
||||
1, // just one output file
|
||||
md5);
|
||||
executeTest("testVariantsToVCFUsingDbsnpInput", spec).getFirst();
|
||||
|
|
@ -45,7 +45,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest {
|
|||
" -L 1:10,000,000-11,000,000" +
|
||||
" -sample NA123AB" +
|
||||
" -o %s" +
|
||||
" -NO_HEADER",
|
||||
" --no_cmdline_in_header",
|
||||
1, // just one output file
|
||||
md5);
|
||||
executeTest("testVariantsToVCFUsingGeliInput - calls", spec).getFirst();
|
||||
|
|
@ -63,7 +63,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest {
|
|||
" -L 1:10,100,000-10,200,000" +
|
||||
" -sample NA123AB" +
|
||||
" -o %s" +
|
||||
" -NO_HEADER",
|
||||
" --no_cmdline_in_header",
|
||||
1, // just one output file
|
||||
md5);
|
||||
executeTest("testVariantsToVCFUsingGeliInput - genotypes", spec).getFirst();
|
||||
|
|
@ -80,7 +80,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest {
|
|||
" -T VariantsToVCF" +
|
||||
" -L 1:1-1,000,000" +
|
||||
" -o %s" +
|
||||
" -NO_HEADER",
|
||||
" --no_cmdline_in_header",
|
||||
1, // just one output file
|
||||
md5);
|
||||
executeTest("testVariantsToVCFUsingHapMapInput", spec).getFirst();
|
||||
|
|
@ -96,7 +96,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest {
|
|||
" --variant:VCF " + validationDataLocation + "complexExample.vcf4" +
|
||||
" -T VariantsToVCF" +
|
||||
" -o %s" +
|
||||
" -NO_HEADER",
|
||||
" --no_cmdline_in_header",
|
||||
1, // just one output file
|
||||
md5);
|
||||
executeTest("testVariantsToVCFUsingVCFInput", spec).getFirst();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class VCFIntegrationTest extends WalkerTest {
|
|||
String md5ofInputVCF = "a990ba187a69ca44cb9bc2bb44d00447";
|
||||
String testVCF = validationDataLocation + "vcf4.1.example.vcf";
|
||||
|
||||
String baseCommand = "-R " + b37KGReference + " -NO_HEADER -o %s ";
|
||||
String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s ";
|
||||
|
||||
String test1 = baseCommand + "-T VariantAnnotator --variant " + testVCF + " -L " + testVCF;
|
||||
WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList(md5ofInputVCF));
|
||||
|
|
@ -32,7 +32,7 @@ public class VCFIntegrationTest extends WalkerTest {
|
|||
String testVCF = testDir + "breakpoint-example.vcf";
|
||||
//String testVCF = validationDataLocation + "multiallelic.vcf";
|
||||
|
||||
String baseCommand = "-R " + b37KGReference + " -NO_HEADER -o %s ";
|
||||
String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s ";
|
||||
|
||||
String test1 = baseCommand + "-T SelectVariants -V " + testVCF;
|
||||
WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("acee3b6bdb4b759992f54065c675a249"));
|
||||
|
|
@ -43,7 +43,7 @@ public class VCFIntegrationTest extends WalkerTest {
|
|||
public void testReadingAndWritingSamtools() {
|
||||
String testVCF = validationDataLocation + "samtools.vcf";
|
||||
|
||||
String baseCommand = "-R " + b37KGReference + " -NO_HEADER -o %s ";
|
||||
String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s ";
|
||||
|
||||
String test1 = baseCommand + "-T SelectVariants -V " + testVCF;
|
||||
WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("87d5b180ef5f9dc5aaee4b02601b43a2"));
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import org.broad.tribble.FeatureCodec;
|
|||
import org.broad.tribble.FeatureCodecHeader;
|
||||
import org.broad.tribble.readers.PositionalBufferedStream;
|
||||
import org.broadinstitute.sting.BaseTest;
|
||||
import org.broadinstitute.sting.utils.codecs.bcf2.BCF2Codec;
|
||||
import org.broadinstitute.sting.utils.codecs.vcf.*;
|
||||
import org.broadinstitute.sting.utils.collections.Pair;
|
||||
import org.broadinstitute.sting.utils.variantcontext.writer.Options;
|
||||
|
|
@ -399,12 +400,18 @@ public class VariantContextTestProvider {
|
|||
writer.close();
|
||||
|
||||
final List<VariantContext> actual = readAllVCs(tmpFile, tester.makeCodec()).getSecond();
|
||||
Assert.assertEquals(actual.size(), expected.size());
|
||||
assertEquals(actual, expected);
|
||||
|
||||
for ( int i = 0; i < expected.size(); i++ )
|
||||
VariantContextTestProvider.assertEquals(actual.get(i), expected.get(i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility class to read all of the VC records from a file
|
||||
*
|
||||
* @param source
|
||||
* @param codec
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private final static Pair<VCFHeader, List<VariantContext>> readAllVCs( final File source, final FeatureCodec<VariantContext> codec ) throws IOException {
|
||||
// read in the features
|
||||
PositionalBufferedStream pbs = new PositionalBufferedStream(new FileInputStream(source));
|
||||
|
|
@ -423,6 +430,25 @@ public class VariantContextTestProvider {
|
|||
return new Pair<VCFHeader, List<VariantContext>>((VCFHeader)header.getHeaderValue(), read);
|
||||
}
|
||||
|
||||
public static void assertVCFandBCFFilesAreTheSame(final File vcfFile, final File bcfFile) throws IOException {
|
||||
final Pair<VCFHeader, List<VariantContext>> vcfData = readAllVCs(vcfFile, new VCFCodec());
|
||||
final Pair<VCFHeader, List<VariantContext>> bcfData = readAllVCs(bcfFile, new BCF2Codec());
|
||||
assertEquals(bcfData.getFirst(), vcfData.getFirst());
|
||||
assertEquals(bcfData.getSecond(), vcfData.getSecond());
|
||||
}
|
||||
|
||||
public static void assertEquals(final List<VariantContext> actual, final List<VariantContext> expected) {
|
||||
Assert.assertEquals(actual.size(), expected.size());
|
||||
|
||||
for ( int i = 0; i < expected.size(); i++ )
|
||||
assertEquals(actual.get(i), expected.get(i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that two variant contexts are actually equal
|
||||
* @param actual
|
||||
* @param expected
|
||||
*/
|
||||
public static void assertEquals( final VariantContext actual, final VariantContext expected ) {
|
||||
Assert.assertNotNull(actual);
|
||||
Assert.assertEquals(actual.getChr(), expected.getChr());
|
||||
|
|
@ -430,4 +456,9 @@ public class VariantContextTestProvider {
|
|||
Assert.assertEquals(actual.getEnd(), expected.getEnd());
|
||||
// TODO -- expand me
|
||||
}
|
||||
|
||||
public static void assertEquals(final VCFHeader actual, final VCFHeader expected) {
|
||||
Assert.assertEquals(actual.getMetaData().size(), expected.getMetaData().size());
|
||||
Assert.assertEquals(actual.getMetaData(), expected.getMetaData());
|
||||
}
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ class VcfGatherFunction extends CombineVariants with GatherFunction {
|
|||
// are added by the GATKExtensionsGenerator to the subclass of CommandLineGATK
|
||||
|
||||
val noHeader = QFunction.findField(originalFunction.getClass, VCFWriterArgumentTypeDescriptor.NO_HEADER_ARG_NAME)
|
||||
this.NO_HEADER = originalGATK.getFieldValue(noHeader).asInstanceOf[Boolean]
|
||||
this.no_cmdline_in_header = originalGATK.getFieldValue(noHeader).asInstanceOf[Boolean]
|
||||
|
||||
val sitesOnly = QFunction.findField(originalFunction.getClass, VCFWriterArgumentTypeDescriptor.SITES_ONLY_ARG_NAME)
|
||||
this.sites_only = originalGATK.getFieldValue(sitesOnly).asInstanceOf[Boolean]
|
||||
|
|
|
|||
Loading…
Reference in New Issue