Search in sources :

Example 1 with MultiValueResult

use of com.hartwig.hmftools.healthchecker.result.MultiValueResult 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 2 with MultiValueResult

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

the class StrelkaCheckerTest method canAnalyseMinimalVCF.

@Test
public void canAnalyseMinimalVCF() throws IOException {
    final RunContext runContext = TestRunContextFactory.forSomaticTest(MINIMAL_RUN_DIRECTORY, MINIMAL_REF_SAMPLE, MINIMAL_TUMOR_SAMPLE);
    final MultiValueResult result = (MultiValueResult) checker.run(runContext);
    assertEquals(EXPECTED_NUM_CHECKS, result.checks().size());
}
Also used : MultiValueResult(com.hartwig.hmftools.healthchecker.result.MultiValueResult) RunContext(com.hartwig.hmftools.common.context.RunContext) Test(org.junit.Test)

Example 3 with MultiValueResult

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

the class CoverageCheckerTest method worksForSingleSampleRun.

@Test
public void worksForSingleSampleRun() {
    WGSMetrics metrics = ImmutableWGSMetrics.builder().ref10xCoveragePercentage(REF_COVERAGE_10X).ref20xCoveragePercentage(REF_COVERAGE_20X).refMeanCoverage(0D).build();
    MultiValueResult result = (MultiValueResult) CoverageChecker.toCheckResult(metrics, REF_SAMPLE, null);
    List<HealthCheck> refResult = result.checks();
    assertEquals(REF_NUMBER_OF_CHECKS, refResult.size());
    assertCheck(refResult, REF_SAMPLE, CoverageCheck.COVERAGE_10X, REF_COVERAGE_10X);
    assertCheck(refResult, REF_SAMPLE, CoverageCheck.COVERAGE_20X, REF_COVERAGE_20X);
}
Also used : WGSMetrics(com.hartwig.hmftools.common.metrics.WGSMetrics) ImmutableWGSMetrics(com.hartwig.hmftools.common.metrics.ImmutableWGSMetrics) MultiValueResult(com.hartwig.hmftools.healthchecker.result.MultiValueResult) Test(org.junit.Test)

Example 4 with MultiValueResult

use of com.hartwig.hmftools.healthchecker.result.MultiValueResult 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)

Aggregations

MultiValueResult (com.hartwig.hmftools.healthchecker.result.MultiValueResult)4 Test (org.junit.Test)4 RunContext (com.hartwig.hmftools.common.context.RunContext)3 BaseResult (com.hartwig.hmftools.healthchecker.result.BaseResult)2 ImmutableWGSMetrics (com.hartwig.hmftools.common.metrics.ImmutableWGSMetrics)1 WGSMetrics (com.hartwig.hmftools.common.metrics.WGSMetrics)1