CopyNumberEvidenceAnalyzer { @NotNull public List<EvidenceItem> evidenceForCopyNumber(@NotNull ReportableGainLoss reportableGainLoss, @Nullable String primaryTumorLocation, @NotNull CancerTypeAnalyzer cancerTypeAnalyzer) { List<EvidenceItem> evidenceItems = Lists.newArrayList(); for (ActionableCopyNumber actionableCopyNumber : actionableCopyNumbers) { if (typeMatches(reportableGainLoss, actionableCopyNumber) && actionableCopyNumber.gene().equals(reportableGainLoss.gene())) { ImmutableEvidenceItem.Builder evidenceBuilder = fromActionableCopyNumber(actionableCopyNumber); evidenceBuilder.event(reportableGainLoss.gene() + " " + actionableCopyNumber.type().readableString()); evidenceBuilder.isOnLabel(cancerTypeAnalyzer.isCancerTypeMatch(actionableCopyNumber.cancerType(), primaryTumorLocation)); evidenceItems.add(evidenceBuilder.build()); } } return evidenceItems; } CopyNumberEvidenceAnalyzer(@NotNull List<ActionableCopyNumber> actionableCopyNumbers); @NotNull Set<String> actionableGenes(); @NotNull List<ActionableCopyNumber> actionableCopyNumbers(); @NotNull List<EvidenceItem> evidenceForCopyNumber(@NotNull ReportableGainLoss reportableGainLoss, @Nullable String primaryTumorLocation,
            @NotNull CancerTypeAnalyzer cancerTypeAnalyzer);  }
@Test public void actionabilityWorksForCNVs() { ActionableCopyNumber actionabilityCNV = ImmutableActionableCopyNumber.builder() .gene("ERBB2") .type(CopyNumberType.AMPLIFICATION) .source("oncoKb") .reference("ERBB2:amp") .drug("Trastuzumab") .drugsType("EGFR inhibitor") .cancerType("Breast Cancer") .source("civic") .level("A") .response("Responsive") .build(); CopyNumberEvidenceAnalyzer cnvAnalyzer = new CopyNumberEvidenceAnalyzer(Lists.newArrayList(actionabilityCNV)); CancerTypeAnalyzer cancerTypeAnalyzer = CancerTypeAnalyzerTestFactory.buildWithOneCancerTypeMapping("Skin Melanoma", "4159"); assertEquals(1, cnvAnalyzer.evidenceForCopyNumber(createTestReportableGainsAndLosses("ERBB2"), "Breast", cancerTypeAnalyzer).size()); }