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