use of com.hartwig.hmftools.common.amber.qc.AmberQC 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);
}