# Class EnrichmentAlgorithmGreedyVariableSize

java.lang.Object
org.snpeff.geneSets.algorithm.EnrichmentAlgorithm
org.snpeff.geneSets.algorithm.EnrichmentAlgorithmGreedy
org.snpeff.geneSets.algorithm.EnrichmentAlgorithmGreedyVariableSize

Direct Known Subclasses:
  `FisherPValueGreedyAlgorithm, RankSumPValueGreedyAlgorithm`

public abstract class EnrichmentAlgorithmGreedyVariableSize extends EnrichmentAlgorithmGreedy
A greedy enrichment algorithm for selecting gene-sets using a variable geneSet-size strategy: i) Select only from geneSets in low-sizes e.g. geneSet.size() in [1-10] ii) If p-value goes up, use a larger geneSize range, e.g. geneSet.size() in [11-20]

Author:
  pcingola

## Nested Class Summary

### Nested classes/interfaces inherited from class EnrichmentAlgorithm

`EnrichmentAlgorithm.EnrichmentAlgorithmType`

## Field Summary

### Fields inherited from class EnrichmentAlgorithmGreedy

`adjustedPvalue, DEFAULT_MAX_PVALUE, maxPvalue, maxPvalueAjusted`

### Fields inherited from class EnrichmentAlgorithm

`HTML_BG_COLOR, HTML_BG_COLOR_TITLE, HTML_TD_GENES_MAX_LEN, PRINT_SOMETHING_TIME`

## Constructor Summary

Constructors
Constructor
Description
`EnrichmentAlgorithmGreedyVariableSize(GeneSets geneSets, int numberToSelect)`

## Method Summary

Modifier and Type
Method
Description
`protected Result`
`greedyPvalue(Result prevResult)`
Find best p-value using a greedy algorithm (smaller gene sets first)
`void`
`setInitialSize(int initialSize)`
`void`
`setSizeGrowthFactor(int sizeGrowthFactor)`

### Methods inherited from class EnrichmentAlgorithmGreedy

`greedyPvalue, select, setAdjustedPvalue, setMaxGeneSetSize, setMaxPvalue, setMaxPvalueAjusted, setMinGeneSetSize, setVerbose, stopCriteria`

### Methods inherited from class EnrichmentAlgorithm

`getMaxPvalueAdjusted, getOutput, isShow, print, setDebug, setFilterOutputGeneSets, setHtmlTable, setMaxPValue, setMaxPvalueAdjusted`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EnrichmentAlgorithmGreedyVariableSize

public EnrichmentAlgorithmGreedyVariableSize(GeneSets geneSets, int numberToSelect)

## Method Details

### greedyPvalue

protected Result greedyPvalue(Result prevResult)
Find best p-value using a greedy algorithm (smaller gene sets first)

Overrides:
  `greedyPvalue` in class `EnrichmentAlgorithmGreedy`
Returns:

### setInitialSize

public void setInitialSize(int initialSize)

### setSizeGrowthFactor

public void setSizeGrowthFactor(int sizeGrowthFactor)