AnalysisBuilder { public AnalysisBuilder addExomeWalkerPrioritiser(List<Integer> seedGenes) { if (seedGenes == null || seedGenes.isEmpty()) { throw new IllegalArgumentException("seedGenes not defined. Define some ENTREZ gene identifiers before adding ExomeWalker prioritier"); } analysisSteps.add(priorityFactory.makeExomeWalkerPrioritiser(seedGenes)); return this; } AnalysisBuilder(GenomeAnalysisServiceProvider genomeAnalysisServiceProvider, PriorityFactory priorityFactory, OntologyService ontologyService); Analysis build(); AnalysisBuilder vcfPath(Path vcfPath); AnalysisBuilder genomeAssembly(GenomeAssembly genomeAssembly); AnalysisBuilder pedigree(Pedigree pedigree); AnalysisBuilder probandSampleName(String sampleName); AnalysisBuilder hpoIds(List<String> hpoIds); AnalysisBuilder inheritanceModes(InheritanceModeOptions inheritanceModeOptions); AnalysisBuilder analysisMode(AnalysisMode analysisMode); AnalysisBuilder frequencySources(Set<FrequencySource> frequencySources); AnalysisBuilder pathogenicitySources(Set<PathogenicitySource> pathogenicitySources); AnalysisBuilder addFailedVariantFilter(); AnalysisBuilder addIntervalFilter(GeneticInterval interval); AnalysisBuilder addIntervalFilter(Collection<ChromosomalRegion> chromosomalRegions); AnalysisBuilder addGeneIdFilter(Set<String> entrezIds); AnalysisBuilder addVariantEffectFilter(Set<VariantEffect> variantEffects); AnalysisBuilder addQualityFilter(double cutoff); AnalysisBuilder addKnownVariantFilter(); AnalysisBuilder addFrequencyFilter(float cutOff); AnalysisBuilder addFrequencyFilter(); AnalysisBuilder addPathogenicityFilter(boolean keepNonPathogenic); AnalysisBuilder addPriorityScoreFilter(PriorityType priorityType, float minPriorityScore); AnalysisBuilder addRegulatoryFeatureFilter(); AnalysisBuilder addInheritanceFilter(); AnalysisBuilder addOmimPrioritiser(); AnalysisBuilder addPhivePrioritiser(); AnalysisBuilder addHiPhivePrioritiser(); AnalysisBuilder addHiPhivePrioritiser(HiPhiveOptions hiPhiveOptions); AnalysisBuilder addPhenixPrioritiser(); AnalysisBuilder addExomeWalkerPrioritiser(List<Integer> seedGenes); AnalysisBuilder addAnalysisStep(AnalysisStep analysisStep);  }
@Test public void testExomeWalkerPrioritiserThrowsExceptionWithEmptyList() { assertThrows(IllegalArgumentException.class, () -> analysisBuilder.addExomeWalkerPrioritiser(Collections.emptyList())); }
@Test public void testExomeWalkerPrioritiserThrowsExceptionWithNullList() { assertThrows(IllegalArgumentException.class, () -> analysisBuilder.addExomeWalkerPrioritiser(null)); }
@Test public void testCanSpecifyExomeWalkerPrioritiser() { List<Integer> seedGenes = new ArrayList<>(Arrays.asList(1, 2, 3, 4)); Prioritiser prioritiser = priorityFactory.makeExomeWalkerPrioritiser(seedGenes); analysisBuilder.addExomeWalkerPrioritiser(seedGenes); assertThat(analysisSteps(), equalTo(singletonList(prioritiser))); }