Search in sources :

Example 1 with BaseResult

use of com.hartwig.hmftools.healthchecker.result.BaseResult in project hmftools by hartwigmedical.

the class AmberCheckerTest method extractDataFromAmberWorksForSomatic.

@Test
public void extractDataFromAmberWorksForSomatic() throws IOException {
    final RunContext runContext = TestRunContextFactory.forSomaticTest(BASE_DIRECTORY, REF_SAMPLE, TUMOR_SAMPLE);
    final BaseResult result = checker.run(runContext);
    assertEquals(CheckType.AMBER, result.checkType());
    final HealthCheck check = ((SingleValueResult) result).check();
    assertCheck(check, "0.4951");
}
Also used : BaseResult(com.hartwig.hmftools.healthchecker.result.BaseResult) SingleValueResult(com.hartwig.hmftools.healthchecker.result.SingleValueResult) RunContext(com.hartwig.hmftools.common.context.RunContext) Test(org.junit.Test)

Example 2 with BaseResult

use of com.hartwig.hmftools.healthchecker.result.BaseResult in project hmftools by hartwigmedical.

the class StrelkaCheckerTest method canAnalyseTypicalSomaticVariantVCF.

@Test
public void canAnalyseTypicalSomaticVariantVCF() throws IOException {
    final RunContext runContext = TestRunContextFactory.forSomaticTest(RUN_DIRECTORY, REF_SAMPLE, TUMOR_SAMPLE);
    final BaseResult result = checker.run(runContext);
    final List<HealthCheck> checks = ((MultiValueResult) result).checks();
    Assert.assertEquals(CheckType.STRELKA, result.checkType());
    assertEquals(EXPECTED_NUM_CHECKS, checks.size());
    assertCheck(checks, StrelkaCheck.SOMATIC_SNP_COUNT.toString(), 990);
    assertCheck(checks, StrelkaCheck.SOMATIC_SNP_DBSNP_COUNT.toString(), 820);
    assertCheck(checks, StrelkaCheck.SOMATIC_INDEL_COUNT.toString(), 67);
    assertCheck(checks, StrelkaCheck.SOMATIC_INDEL_DBSNP_COUNT.toString(), 42);
    assertCheck(checks, StrelkaCheck.SOMATIC_MNP_COUNT.toString(), 1);
    assertCheck(checks, StrelkaCheck.SOMATIC_MNP_DBSNP_COUNT.toString(), 0);
}
Also used : BaseResult(com.hartwig.hmftools.healthchecker.result.BaseResult) MultiValueResult(com.hartwig.hmftools.healthchecker.result.MultiValueResult) RunContext(com.hartwig.hmftools.common.context.RunContext) Test(org.junit.Test)

Example 3 with BaseResult

use of com.hartwig.hmftools.healthchecker.result.BaseResult 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");
}
Also used : BaseResult(com.hartwig.hmftools.healthchecker.result.BaseResult) MultiValueResult(com.hartwig.hmftools.healthchecker.result.MultiValueResult) RunContext(com.hartwig.hmftools.common.context.RunContext) Test(org.junit.Test)

Example 4 with BaseResult

use of com.hartwig.hmftools.healthchecker.result.BaseResult 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);
}
Also used : BaseResult(com.hartwig.hmftools.healthchecker.result.BaseResult) RunContext(com.hartwig.hmftools.common.context.RunContext) NoResult(com.hartwig.hmftools.healthchecker.result.NoResult) Test(org.junit.Test)

Aggregations

RunContext (com.hartwig.hmftools.common.context.RunContext)4 BaseResult (com.hartwig.hmftools.healthchecker.result.BaseResult)4 Test (org.junit.Test)4 MultiValueResult (com.hartwig.hmftools.healthchecker.result.MultiValueResult)2 NoResult (com.hartwig.hmftools.healthchecker.result.NoResult)1 SingleValueResult (com.hartwig.hmftools.healthchecker.result.SingleValueResult)1