Analysis { public List<AnalysisStep> getAnalysisSteps() { return analysisSteps; } private  Analysis(Builder builder); Path getVcfPath(); GenomeAssembly getGenomeAssembly(); Pedigree getPedigree(); String getProbandSampleName(); InheritanceModeOptions getInheritanceModeOptions(); List<String> getHpoIds(); AnalysisMode getAnalysisMode(); Set<FrequencySource> getFrequencySources(); Set<PathogenicitySource> getPathogenicitySources(); List<AnalysisStep> getAnalysisSteps(); @JsonIgnore PriorityType getMainPrioritiserType(); @JsonIgnore List<List<AnalysisStep>> getAnalysisStepsGroupedByFunction(); @JsonCreator static Builder builder(); Builder copy(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testGetAnalysisStepsReturnsEmptyListWhenNoStepsHaveBeenAdded() { List<AnalysisStep> steps = Collections.emptyList(); assertThat(DEFAULT_ANALYSIS.getAnalysisSteps(), equalTo(steps)); }
@Test public void testCanAddVariantFilterAsAnAnalysisStep() { VariantFilter variantFilter = new PassAllVariantEffectsFilter(); Analysis instance = newBuilder() .addStep(variantFilter) .build(); assertThat(instance.getAnalysisSteps(), hasItem(variantFilter)); }
@Test public void testCanAddGeneFilterAsAnAnalysisStep() { GeneFilter geneFilter = new InheritanceFilter(ModeOfInheritance.ANY); Analysis instance = newBuilder() .addStep(geneFilter) .build(); assertThat(instance.getAnalysisSteps(), hasItem(geneFilter)); }
@Test public void testCanAddPrioritiserAsAnAnalysisStep() { Prioritiser prioritiser = new NoneTypePrioritiser(); Analysis instance = newBuilder() .addStep(prioritiser) .build(); assertThat(instance.getAnalysisSteps(), hasItem(prioritiser)); }
@Test public void testGetAnalysisStepsReturnsListOfStepsAdded() { List<AnalysisStep> steps = getAnalysisSteps(); Analysis.Builder builder = newBuilder(); steps.forEach(builder::addStep); Analysis instance = builder.build(); assertThat(instance.getAnalysisSteps(), equalTo(steps)); }
@Test public void testBuilderCanSetAllSteps() { List<AnalysisStep> steps = getAnalysisSteps(); Analysis instance = newBuilder() .steps(steps) .build(); assertThat(instance.getAnalysisSteps(), equalTo(steps)); }