Package org.snpeff.geneSets.algorithm
Class EnrichmentAlgorithmGreedy
- java.lang.Object
-
- org.snpeff.geneSets.algorithm.EnrichmentAlgorithm
-
- org.snpeff.geneSets.algorithm.EnrichmentAlgorithmGreedy
-
- Direct Known Subclasses:
EnrichmentAlgorithmGreedyVariableSize
public abstract class EnrichmentAlgorithmGreedy extends EnrichmentAlgorithm
A generic greedy enrichment algorithm for selecting gene-sets- Author:
- pcingola
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.snpeff.geneSets.algorithm.EnrichmentAlgorithm
EnrichmentAlgorithm.EnrichmentAlgorithmType
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanadjustedPvaluestatic doubleDEFAULT_MAX_PVALUEprotected doublemaxPvalueprotected doublemaxPvalueAjusted-
Fields inherited from class org.snpeff.geneSets.algorithm.EnrichmentAlgorithm
HTML_BG_COLOR, HTML_BG_COLOR_TITLE, HTML_TD_GENES_MAX_LEN, PRINT_SOMETHING_TIME
-
-
Constructor Summary
Constructors Constructor Description EnrichmentAlgorithmGreedy(GeneSets geneSets, int numberToSelect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResultgreedyPvalue(Result prevResult)Calculate best list of terms by adding a new term to a list that minimize p-value (rank sum)protected ResultgreedyPvalue(Result prevResult, int minGeneSetSize, int maxGeneSetSize)Calculate best list of terms by adding a new term to a list that minimize p-value (rank sum) Only look for genesets within [minGeneSetSize, maxGeneSetSize] size rangeResultselect()Select the 'best' gene setsvoidsetAdjustedPvalue(boolean adjustedPvalue)voidsetMaxGeneSetSize(int maxGeneSetSize)voidsetMaxPvalue(double maxPvalue)voidsetMaxPvalueAjusted(double maxPvalueAjusted)voidsetMinGeneSetSize(int minGeneSetSize)voidsetVerbose(boolean verbose)protected booleanstopCriteria(Result result)Stop criteria-
Methods inherited from class org.snpeff.geneSets.algorithm.EnrichmentAlgorithm
getMaxPvalueAdjusted, getOutput, isShow, print, setDebug, setFilterOutputGeneSets, setHtmlTable, setMaxPValue, setMaxPvalueAdjusted
-
-
-
-
Field Detail
-
DEFAULT_MAX_PVALUE
public static final double DEFAULT_MAX_PVALUE
- See Also:
- Constant Field Values
-
adjustedPvalue
protected boolean adjustedPvalue
-
maxPvalue
protected double maxPvalue
-
maxPvalueAjusted
protected double maxPvalueAjusted
-
-
Constructor Detail
-
EnrichmentAlgorithmGreedy
public EnrichmentAlgorithmGreedy(GeneSets geneSets, int numberToSelect)
-
-
Method Detail
-
greedyPvalue
protected Result greedyPvalue(Result prevResult)
Calculate best list of terms by adding a new term to a list that minimize p-value (rank sum)- Returns:
-
greedyPvalue
protected Result greedyPvalue(Result prevResult, int minGeneSetSize, int maxGeneSetSize)
Calculate best list of terms by adding a new term to a list that minimize p-value (rank sum) Only look for genesets within [minGeneSetSize, maxGeneSetSize] size range- Returns:
-
select
public Result select()
Select the 'best' gene sets- Overrides:
selectin classEnrichmentAlgorithm- Returns:
-
setAdjustedPvalue
public void setAdjustedPvalue(boolean adjustedPvalue)
-
setMaxGeneSetSize
public void setMaxGeneSetSize(int maxGeneSetSize)
- Overrides:
setMaxGeneSetSizein classEnrichmentAlgorithm
-
setMaxPvalue
public void setMaxPvalue(double maxPvalue)
-
setMaxPvalueAjusted
public void setMaxPvalueAjusted(double maxPvalueAjusted)
-
setMinGeneSetSize
public void setMinGeneSetSize(int minGeneSetSize)
- Overrides:
setMinGeneSetSizein classEnrichmentAlgorithm
-
setVerbose
public void setVerbose(boolean verbose)
- Overrides:
setVerbosein classEnrichmentAlgorithm
-
stopCriteria
protected boolean stopCriteria(Result result)
Stop criteria- Parameters:
result-- Returns:
- true if stop criteria has been met and algorithm should stop iterating.
-
-