use of com.hartwig.hmftools.bachelor.EligibilityReport.ReportType.GERMLINE_DELETION in project hmftools by hartwigmedical.
the class BachelorEligibility method processCopyNumbers.
@NotNull
Collection<EligibilityReport> processCopyNumbers(final String patient, final List<GeneCopyNumber> copyNumbers) {
final List<EligibilityReport> results = Lists.newArrayList();
for (final GeneCopyNumber copyNumber : copyNumbers) {
// TODO: verify the germline check
final boolean isGermline = copyNumber.germlineHet2HomRegions() + copyNumber.germlineHomRegions() > 0;
final List<String> matchingPrograms = programs.stream().filter(program -> program.copyNumberProcessor().test(copyNumber)).map(BachelorProgram::name).collect(Collectors.toList());
final List<EligibilityReport> interimResults = matchingPrograms.stream().map(p -> ImmutableEligibilityReport.builder().patient(patient).source(isGermline ? GERMLINE_DELETION : SOMATIC_DELETION).program(p).id("").genes(copyNumber.gene()).chrom(copyNumber.chromosome()).pos(copyNumber.start()).ref("").alts("").effects("").build()).collect(Collectors.toList());
results.addAll(interimResults);
}
return results;
}
Aggregations