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);
}
Aggregations