# Class EnrichmentAlgorithm

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

Direct Known Subclasses:
  `EnrichmentAlgorithmGreedy, FisherPValueAlgorithm, NoneAlgorithm, RankSumPValueAlgorithm`

public abstract class EnrichmentAlgorithm extends Object
A generic enrichment algorithm for selecting gene-sets from a collection of gene-sets

Author:
  pcingola

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`EnrichmentAlgorithm.EnrichmentAlgorithmType`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String[]`
`HTML_BG_COLOR`
`static final String`
`HTML_BG_COLOR_TITLE`
`static final int`
`HTML_TD_GENES_MAX_LEN`
`static long`
`PRINT_SOMETHING_TIME`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`double`
`getMaxPvalueAdjusted()`
`StringBuilder`
`getOutput()`
`protected boolean`
`isShow(Result result)`
Showld we show this result or should the output be filtered?
`protected void`
`print(String str)`
`Result`
`select()`
Select the 'best' gene sets
`void`
`setDebug(boolean debug)`
`void`
`setFilterOutputGeneSets(Set<String> filterOutputGeneSets)`
`void`
`setHtmlTable(boolean htmlTable)`
`void`
`setMaxGeneSetSize(int maxGeneSetSize)`
`void`
`setMaxPValue(double maxPValue)`
`void`
`setMaxPvalueAdjusted(double maxPvalueAdjusted)`
`void`
`setMinGeneSetSize(int minGeneSetSize)`
`void`
`setVerbose(boolean verbose)`

### Methods inherited from class Object

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

## Field Details

### HTML_TD_GENES_MAX_LEN

public static final int HTML_TD_GENES_MAX_LEN

See Also:
  - Constant Field Values

### HTML_BG_COLOR

public static final String[] HTML_BG_COLOR

### HTML_BG_COLOR_TITLE

public static final String HTML_BG_COLOR_TITLE

See Also:
  - Constant Field Values

### PRINT_SOMETHING_TIME

public static long PRINT_SOMETHING_TIME

## Constructor Details

### EnrichmentAlgorithm

public EnrichmentAlgorithm(GeneSets geneSets, int numberToSelect)

## Method Details

### getMaxPvalueAdjusted

public double getMaxPvalueAdjusted()

### getOutput

public StringBuilder getOutput()

### isShow

protected boolean isShow(Result result)
Showld we show this result or should the output be filtered?

Parameters:
  `result` -
Returns:

### print

protected void print(String str)

### select

public Result select()
Select the 'best' gene sets

Returns:

### setDebug

public void setDebug(boolean debug)

### setFilterOutputGeneSets

public void setFilterOutputGeneSets(Set<String> filterOutputGeneSets)

### setHtmlTable

public void setHtmlTable(boolean htmlTable)

### setMaxGeneSetSize

public void setMaxGeneSetSize(int maxGeneSetSize)

### setMaxPValue

public void setMaxPValue(double maxPValue)

### setMaxPvalueAdjusted

public void setMaxPvalueAdjusted(double maxPvalueAdjusted)

### setMinGeneSetSize

public void setMinGeneSetSize(int minGeneSetSize)

### setVerbose

public void setVerbose(boolean verbose)