Search in sources :

Example 1 with PatientResult

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

the class CoverageCheckerTest method worksForSomaticRun.

@Test
public void worksForSomaticRun() {
    WGSMetrics metrics = ImmutableWGSMetrics.builder().ref10xCoveragePercentage(REF_COVERAGE_10X).ref20xCoveragePercentage(REF_COVERAGE_20X).refMeanCoverage(0D).tumor30xCoveragePercentage(TUMOR_COVERAGE_30X).tumor60xCoveragePercentage(TUMOR_COVERAGE_60X).build();
    PatientResult result = (PatientResult) CoverageChecker.toCheckResult(metrics, REF_SAMPLE, TUMOR_SAMPLE);
    List<HealthCheck> refResult = result.refSampleChecks();
    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);
    List<HealthCheck> tumorResult = result.tumorSampleChecks();
    assertEquals(TUMOR_NUMBER_OF_CHECKS, tumorResult.size());
    assertCheck(tumorResult, TUMOR_SAMPLE, CoverageCheck.COVERAGE_30X, TUMOR_COVERAGE_30X);
    assertCheck(tumorResult, TUMOR_SAMPLE, CoverageCheck.COVERAGE_60X, TUMOR_COVERAGE_60X);
}
Also used : WGSMetrics(com.hartwig.hmftools.common.metrics.WGSMetrics) ImmutableWGSMetrics(com.hartwig.hmftools.common.metrics.ImmutableWGSMetrics) PatientResult(com.hartwig.hmftools.healthchecker.result.PatientResult) Test(org.junit.Test)

Aggregations

ImmutableWGSMetrics (com.hartwig.hmftools.common.metrics.ImmutableWGSMetrics)1 WGSMetrics (com.hartwig.hmftools.common.metrics.WGSMetrics)1 PatientResult (com.hartwig.hmftools.healthchecker.result.PatientResult)1 Test (org.junit.Test)1