Search in sources :

Example 1 with NoResult

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

the class AmberChecker method run.

@NotNull
public BaseResult run(@NotNull final RunContext runContext) throws IOException {
    if (!runContext.isSomaticRun()) {
        return new NoResult(CheckType.AMBER);
    }
    final String amberDirectory = runContext.runDirectory() + File.separator + "amber";
    final AmberQC qcCheck = AmberQCFile.read(AmberQCFile.generateFilename(amberDirectory, runContext.tumorSample()));
    final String meanBaf = String.valueOf(qcCheck.meanBAF());
    final HealthCheck healthCheck = new HealthCheck(runContext.tumorSample(), AmberCheck.MEAN_BAF.toString(), meanBaf);
    return toSingleValueResult(healthCheck);
}
Also used : NoResult(com.hartwig.hmftools.healthchecker.result.NoResult) AmberQC(com.hartwig.hmftools.common.amber.qc.AmberQC) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with NoResult

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

the class PurpleChecker method run.

@NotNull
public BaseResult run(@NotNull final RunContext runContext) throws IOException {
    if (!runContext.isSomaticRun()) {
        return new NoResult(CheckType.PURPLE);
    }
    final String purpleDirectory = runContext.runDirectory() + File.separator + "purple";
    final PurpleQC qcCheck = PurpleQCFile.read(PurpleQCFile.generateFilename(purpleDirectory, runContext.tumorSample()));
    final List<HealthCheck> checks = Lists.newArrayList();
    final String segmentScore = String.valueOf(qcCheck.segmentScore());
    checks.add(new HealthCheck(runContext.tumorSample(), PurpleCheck.PURPLE_SEGMENT_SCORE.toString(), segmentScore));
    checks.add(new HealthCheck(runContext.tumorSample(), PurpleCheck.AMBER_GENDER.toString(), qcCheck.amberGender().toString()));
    checks.add(new HealthCheck(runContext.tumorSample(), PurpleCheck.COBALT_GENDER.toString(), qcCheck.cobaltGender().toString()));
    return toMultiValueResult(checks);
}
Also used : PurpleQC(com.hartwig.hmftools.common.purple.qc.PurpleQC) NoResult(com.hartwig.hmftools.healthchecker.result.NoResult) NotNull(org.jetbrains.annotations.NotNull)

Example 3 with NoResult

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

NoResult (com.hartwig.hmftools.healthchecker.result.NoResult)3 NotNull (org.jetbrains.annotations.NotNull)2 AmberQC (com.hartwig.hmftools.common.amber.qc.AmberQC)1 RunContext (com.hartwig.hmftools.common.context.RunContext)1 PurpleQC (com.hartwig.hmftools.common.purple.qc.PurpleQC)1 BaseResult (com.hartwig.hmftools.healthchecker.result.BaseResult)1 Test (org.junit.Test)1