use of com.hartwig.hmftools.common.context.RunContext in project hmftools by hartwigmedical.
the class HealthChecksApplication method main.
public static void main(final String... args) throws ParseException, IOException {
final Options options = createOptions();
final CommandLine cmd = createCommandLine(options, args);
String runDirectory = cmd.getOptionValue(RUN_DIRECTORY);
final String reportFilePath = cmd.getOptionValue(REPORT_FILE_PATH);
if (runDirectory == null || reportFilePath == null) {
final HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("Health-Checks", options);
System.exit(1);
}
runDirectory = FolderChecker.build().checkFolder(runDirectory);
RunContext runContext = ProductionRunContextFactory.fromRunDirectory(runDirectory);
new HealthChecksApplication(runContext, reportFilePath).run();
}
use of com.hartwig.hmftools.common.context.RunContext in project hmftools by hartwigmedical.
the class AmberCheckerTest method testMissing.
@Test(expected = IOException.class)
public void testMissing() throws IOException {
final RunContext runContext = TestRunContextFactory.forSomaticTest(BASE_DIRECTORY, REF_SAMPLE, "missing");
checker.run(runContext);
}
use of com.hartwig.hmftools.common.context.RunContext in project hmftools by hartwigmedical.
the class PurpleCheckerTest method testMissing.
@Test(expected = IOException.class)
public void testMissing() throws IOException {
final RunContext runContext = TestRunContextFactory.forSomaticTest(BASE_DIRECTORY, REF_SAMPLE, "missing");
checker.run(runContext);
}
use of com.hartwig.hmftools.common.context.RunContext in project hmftools by hartwigmedical.
the class PurpleCheckerTest method extractDataFromPurpleWorksForSomatic.
@Test
public void extractDataFromPurpleWorksForSomatic() throws IOException {
final RunContext runContext = TestRunContextFactory.forSomaticTest(BASE_DIRECTORY, REF_SAMPLE, TUMOR_SAMPLE);
final BaseResult result = checker.run(runContext);
Assert.assertEquals(CheckType.PURPLE, result.checkType());
final List<HealthCheck> checks = ((MultiValueResult) result).checks();
assertCheck(checks, PurpleCheck.AMBER_GENDER.toString(), "MALE");
assertCheck(checks, PurpleCheck.COBALT_GENDER.toString(), "FEMALE");
assertCheck(checks, PurpleCheck.PURPLE_SEGMENT_SCORE.toString(), "199");
}
use of com.hartwig.hmftools.common.context.RunContext in project hmftools by hartwigmedical.
the class StrelkaCheckerTest method runsCorrectlyForSingleSample.
@Test
public void runsCorrectlyForSingleSample() throws IOException {
final RunContext runContext = TestRunContextFactory.forSingleSampleTest(RUN_DIRECTORY, REF_SAMPLE);
final BaseResult result = checker.run(runContext);
assertTrue(result instanceof NoResult);
}
Aggregations