Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mode should be a required arg to GatherTranches #6273

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class GatherTranches extends CommandLineProgram {
/**
* Use either SNP for recalibrating only SNPs (emitting indels untouched in the output VCF) or INDEL for indels (emitting SNPs untouched in the output VCF). There is also a BOTH option for recalibrating both SNPs and indels simultaneously, but this is meant for testing purposes only and should not be used in actual analyses.
*/
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ", optional = false)
public VariantRecalibratorArgumentCollection.Mode MODE = VariantRecalibratorArgumentCollection.Mode.SNP;
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ")
public VariantRecalibratorArgumentCollection.Mode MODE;

@Argument(fullName = StandardArgumentDefinitions.OUTPUT_LONG_NAME,
shortName = StandardArgumentDefinitions.OUTPUT_SHORT_NAME, doc="File to output the gathered tranches file to")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public void testCombine2Shards() throws Exception {
args.add(recal1.getAbsolutePath());
args.add("--input");
args.add(recal2.getAbsolutePath());
args.addArgument("mode", "SNP");

final File outFile = GATKBaseTest.createTempFile("gatheredTranches", ".txt");
args.addOutput(outFile);
Expand All @@ -36,5 +37,24 @@ public void testCombine2Shards() throws Exception {
IntegrationTestSpec.assertEqualTextFiles(outFile, recal_original);
}

@Test
public void testCombine2IndelTranches() throws Exception {
final File tranches1 = new File(testDir + "indels.0.tranches");
final File tranches2 = new File(testDir + "indels.1.tranches");

final File recal_original = new File(testDir + "expected/indels.gathered.tranches");

final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--input");
args.add(tranches1.getAbsolutePath());
args.add("--input");
args.add(tranches2.getAbsolutePath());
args.addArgument("mode", "INDEL");

final File outFile = GATKBaseTest.createTempFile("gatheredTranches", ".txt");
args.addOutput(outFile);
final Object res = this.runCommandLine(args.getArgsArray());
Assert.assertEquals(res, 0);
IntegrationTestSpec.assertEqualTextFiles(outFile, recal_original);
}
}
Git LFS file not shown
3 changes: 3 additions & 0 deletions src/test/resources/large/VQSR/indels.0.tranches
Git LFS file not shown
3 changes: 3 additions & 0 deletions src/test/resources/large/VQSR/indels.1.tranches
Git LFS file not shown