-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a7b0b7
commit 9195390
Showing
10 changed files
with
277 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
282 changes: 161 additions & 121 deletions
282
src/main/java/org/broadinstitute/hellbender/tools/walkers/vqsr/FilterVariantTranches.java
Large diffs are not rendered by default.
Oops, something went wrong.
124 changes: 0 additions & 124 deletions
124
src/main/resources/org/broadinstitute/hellbender/tools/walkers/vqsr/tranches.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
...rg/broadinstitute/hellbender/tools/walkers/vqsr/FilterVariantTranchesIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package org.broadinstitute.hellbender.tools.walkers.vqsr; | ||
|
||
import org.broadinstitute.hellbender.CommandLineProgramTest; | ||
import org.broadinstitute.hellbender.utils.test.ArgumentsBuilder; | ||
import org.broadinstitute.hellbender.utils.test.IntegrationTestSpec; | ||
import org.broadinstitute.hellbender.cmdline.StandardArgumentDefinitions; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
import java.util.Arrays; | ||
import java.io.IOException; | ||
|
||
public class FilterVariantTranchesIntegrationTest extends CommandLineProgramTest { | ||
|
||
|
||
/** | ||
* Run the tool on a small test VCF. | ||
*/ | ||
@Test | ||
public void testTrancheFiltering() throws IOException { | ||
final String trancheVCF = largeFileTestDir + "VQSR/g94982_20_1m_10m_python_2dcnn.vcf.gz"; | ||
final String indelTruthVCF = largeFileTestDir + "VQSR/ALL.wgs.indels_mills_devine_hg19_leftAligned_collapsed_double_hit.sites.20.1M-10M.vcf"; | ||
final String snpTruthVCF = largeFileTestDir + "VQSR/Omni25_sites_1525_samples.b37.20.1M-10M.vcf"; | ||
final ArgumentsBuilder argsBuilder = new ArgumentsBuilder(); | ||
argsBuilder.addArgument(StandardArgumentDefinitions.VARIANT_LONG_NAME, trancheVCF) | ||
.addArgument(StandardArgumentDefinitions.OUTPUT_LONG_NAME, "%s") | ||
.addArgument("resource", snpTruthVCF) | ||
.addArgument("resource", indelTruthVCF) | ||
.addArgument("tranche", "99.0") | ||
.addArgument("info-key", "MIX_SMALL_2D_W_DROPOUT") | ||
.addArgument(StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "false"); | ||
|
||
final IntegrationTestSpec spec = new IntegrationTestSpec(argsBuilder.toString(), | ||
Arrays.asList(largeFileTestDir + "VQSR/expected/g94982_20_1m_10m_tranched_99.vcf")); | ||
spec.executeTest("testTrancheFiltering", this); | ||
} | ||
|
||
@Test | ||
public void testTrancheFilteringDuplicate() throws IOException { | ||
final String trancheVCF = largeFileTestDir + "VQSR/g94982_20_1m_10m_python_2dcnn.vcf.gz"; | ||
final String indelTruthVCF = largeFileTestDir + "VQSR/ALL.wgs.indels_mills_devine_hg19_leftAligned_collapsed_double_hit.sites.20.1M-10M.vcf"; | ||
final String snpTruthVCF = largeFileTestDir + "VQSR/Omni25_sites_1525_samples.b37.20.1M-10M.vcf"; | ||
final ArgumentsBuilder argsBuilder = new ArgumentsBuilder(); | ||
argsBuilder.addArgument(StandardArgumentDefinitions.VARIANT_LONG_NAME, trancheVCF) | ||
.addArgument(StandardArgumentDefinitions.OUTPUT_LONG_NAME, "%s") | ||
.addArgument("resource", snpTruthVCF) | ||
.addArgument("resource", indelTruthVCF) | ||
.addArgument("tranche", "99.0") | ||
.addArgument("tranche", "99.0") | ||
.addArgument("info-key", "MIX_SMALL_2D_W_DROPOUT") | ||
.addArgument(StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "false"); | ||
|
||
final IntegrationTestSpec spec = new IntegrationTestSpec(argsBuilder.toString(), | ||
Arrays.asList(largeFileTestDir + "VQSR/expected/g94982_20_1m_10m_tranched_99.vcf")); | ||
spec.executeTest("testTrancheFilteringDuplicate", this); | ||
} | ||
|
||
@Test | ||
public void testTrancheFilteringTranches() throws IOException { | ||
final String trancheVCF = largeFileTestDir + "VQSR/g94982_20_1m_10m_python_2dcnn.vcf.gz"; | ||
final String indelTruthVCF = largeFileTestDir + "VQSR/ALL.wgs.indels_mills_devine_hg19_leftAligned_collapsed_double_hit.sites.20.1M-10M.vcf"; | ||
final String snpTruthVCF = largeFileTestDir + "VQSR/Omni25_sites_1525_samples.b37.20.1M-10M.vcf"; | ||
final ArgumentsBuilder argsBuilder = new ArgumentsBuilder(); | ||
argsBuilder.addArgument(StandardArgumentDefinitions.VARIANT_LONG_NAME, trancheVCF) | ||
.addArgument(StandardArgumentDefinitions.OUTPUT_LONG_NAME, "%s") | ||
.addArgument("resource", snpTruthVCF) | ||
.addArgument("resource", indelTruthVCF) | ||
.addArgument("tranche", "95.0") | ||
.addArgument("tranche", "99.0") | ||
.addArgument("tranche", "99.9") | ||
.addArgument("info-key", "MIX_SMALL_2D_W_DROPOUT") | ||
.addArgument(StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "false"); | ||
|
||
final IntegrationTestSpec spec = new IntegrationTestSpec(argsBuilder.toString(), | ||
Arrays.asList(largeFileTestDir + "VQSR/expected/g94982_20_1m_10m_tranched_95_99_99.9.vcf")); | ||
spec.executeTest("testTrancheFilteringTranches", this); | ||
} | ||
|
||
@Test | ||
public void testTrancheFilteringTranchesOrder() throws IOException { | ||
final String trancheVCF = largeFileTestDir + "VQSR/g94982_20_1m_10m_python_2dcnn.vcf.gz"; | ||
final String indelTruthVCF = largeFileTestDir + "VQSR/ALL.wgs.indels_mills_devine_hg19_leftAligned_collapsed_double_hit.sites.20.1M-10M.vcf"; | ||
final String snpTruthVCF = largeFileTestDir + "VQSR/Omni25_sites_1525_samples.b37.20.1M-10M.vcf"; | ||
final ArgumentsBuilder argsBuilder = new ArgumentsBuilder(); | ||
argsBuilder.addArgument(StandardArgumentDefinitions.VARIANT_LONG_NAME, trancheVCF) | ||
.addArgument(StandardArgumentDefinitions.OUTPUT_LONG_NAME, "%s") | ||
.addArgument("resource", snpTruthVCF) | ||
.addArgument("resource", indelTruthVCF) | ||
.addArgument("tranche", "99.9") | ||
.addArgument("tranche", "95.0") | ||
.addArgument("tranche", "99.0") | ||
.addArgument("info-key", "MIX_SMALL_2D_W_DROPOUT") | ||
.addArgument(StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "false"); | ||
|
||
final IntegrationTestSpec spec = new IntegrationTestSpec(argsBuilder.toString(), | ||
Arrays.asList(largeFileTestDir + "VQSR/expected/g94982_20_1m_10m_tranched_95_99_99.9.vcf")); | ||
spec.executeTest("testTrancheFilteringTranchesOrder", this); | ||
} | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
src/test/resources/large/VQSR/expected/g94982_20_1m_10m_tranched_95_99_99.9.vcf
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
src/test/resources/large/VQSR/expected/g94982_20_1m_10m_tranched_99.vcf
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
src/test/resources/large/VQSR/g94982_20_1m_10m_python_2dcnn.vcf.gz
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
src/test/resources/large/VQSR/g94982_20_1m_10m_python_2dcnn.vcf.gz.tbi
Git LFS file not shown