FusionEvidenceAnalyzer { @NotNull public List<EvidenceItem> evidenceForFusion(@NotNull LinxFusion geneFusion, @Nullable String primaryTumorLocation, @NotNull CancerTypeAnalyzer cancerTypeAnalyzer) { List<EvidenceItem> evidenceItems = Lists.newArrayList(); for (ActionableFusion actionableFusion : fusionPairs) { if (actionableFusion.fiveGene().equals(geneFusion.geneStart()) && actionableFusion.threeGene().equals(geneFusion.geneEnd())) { ImmutableEvidenceItem.Builder evidenceBuilder = fromActionableFusionPairs(actionableFusion); evidenceBuilder.event(actionableFusion.fiveGene() + " - " + actionableFusion.threeGene() + " fusion"); evidenceBuilder.isOnLabel(cancerTypeAnalyzer.isCancerTypeMatch(actionableFusion.cancerType(), primaryTumorLocation)); evidenceItems.add(evidenceBuilder.build()); } } for (ActionablePromiscuous actionablePromiscuousFive : promiscuousFive) { if (actionablePromiscuousFive.gene().equals(geneFusion.geneStart())) { ImmutableEvidenceItem.Builder evidenceBuilder = fromActionableFusionsPromiscuous(actionablePromiscuousFive); evidenceBuilder.event(actionablePromiscuousFive.gene() + " - " + geneFusion.geneEnd() + " fusion"); evidenceBuilder.isOnLabel(cancerTypeAnalyzer.isCancerTypeMatch(actionablePromiscuousFive.cancerType(), primaryTumorLocation)); evidenceItems.add(evidenceBuilder.build()); } } for (ActionablePromiscuous actionablePromiscuousThree : promiscuousThree) { if (actionablePromiscuousThree.gene().equals(geneFusion.geneEnd())) { ImmutableEvidenceItem.Builder evidenceBuilder = fromActionableFusionsPromiscuous(actionablePromiscuousThree); evidenceBuilder.event(geneFusion.geneStart() + " - " + actionablePromiscuousThree.gene() + " fusion"); evidenceBuilder.isOnLabel(cancerTypeAnalyzer.isCancerTypeMatch(actionablePromiscuousThree.cancerType(), primaryTumorLocation)); evidenceItems.add(evidenceBuilder.build()); } } return evidenceItems; } FusionEvidenceAnalyzer(@NotNull final List<ActionableFusion> fusionPairs, @NotNull final List<ActionablePromiscuous> promiscuousFive,
            @NotNull final List<ActionablePromiscuous> promiscuousThree); @NotNull Set<String> actionableGenes(); @NotNull List<EvidenceItem> evidenceForFusion(@NotNull LinxFusion geneFusion, @Nullable String primaryTumorLocation,
            @NotNull CancerTypeAnalyzer cancerTypeAnalyzer);  }
@Test public void actionabilityWorksFusions() { ActionableFusion fusion = ImmutableActionableFusion.builder() .fiveGene("BCR") .threeGene("ABL1") .cancerType("Acute lymphoblastic leukemia") .drug("Dasatinib") .drugsType("BCR-ABL inhibitor") .level("A") .reference("BCR__ABL1") .response("Responsive") .source("CGI") .build(); ActionablePromiscuous five = ImmutableActionablePromiscuous.builder() .cancerType("Acute lymphoblastic leukemia") .drug("FORT-1") .drugsType("Trial") .gene("FGFR1") .level("B") .reference("EXT8753 (NL62741.031.17)") .response("Responsive") .source("iclusion") .build(); ActionablePromiscuous three = ImmutableActionablePromiscuous.builder() .cancerType("Acute lymphoblastic leukemia") .drug("AZD5363") .drugsType("AKT inhibitor") .gene("AKT3__.") .level("D") .reference("AKT3__.") .response("Responsive") .source("cgi") .build(); FusionEvidenceAnalyzer analyzer = new FusionEvidenceAnalyzer((Lists.newArrayList(fusion)), Lists.newArrayList(five), Lists.newArrayList(three)); CancerTypeAnalyzer cancerTypeAnalyzer = CancerTypeAnalyzerTestFactory.buildWithOneCancerTypeMapping("Skin", "4159"); LinxFusion reportableFusion = createTestFusionBuilder().geneStart("TMPRSS2").geneEnd("PNPLA7").build(); assertTrue(analyzer.evidenceForFusion(reportableFusion, "Skin", cancerTypeAnalyzer).isEmpty()); }