Package org.snpeff.geneSets
Class GeneSet
java.lang.Object
org.snpeff.geneSets.GeneSet
- All Implemented Interfaces:
Serializable,Comparable<GeneSet>,Iterable<String>
An set of genes (that belongs to a collection of gene-sets)
- Author:
- Pablo Cingolani
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd one gene to genesSetintComparable interface (to order terms)intcompareToNumbers(double n1, double n2, String name1, String name2, boolean descending) Compare 2 numbers and 2 'names' (if both numbers are equal) - NaN sorted in a way that they remain at the end of a sorted list - When two numbers are equal, the sort is done alphabetically by nameintcountOverlap(GeneSet gs) COunt how many genes are in both GeneSetsReturn a sorted list of genesintNumber of symbols in this node (total = interesting + not-interesting)getGenes()Get 'interesting' genesintNumber of 'interesting' symbolsintgetName()intlongbooleanvoidintersection(GeneSet geneSet) Intersects this term with 'geneSet' (intersects 'geneSet' and 'interestingGeneSet').iterator()longrankSum()Calculate rankSum, rankedSymbols and maxRankvoidsetDescription(String description) voidsetGeneSets(GeneSets geneSets) voidsetMaxRank(int maxRank) voidPerform a 'set minus' between this term and 'geneSet' (set minus for 'geneSet' and 'interestingGeneSet').voidintsize()intNumber of genes that have a valuetoString()voidUnion this term with 'geneSet' (union for 'geneSet' and 'interestingGeneSet').Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
debug
public static boolean debug
-
-
Constructor Details
-
GeneSet
Create a new GeneSet by joining all GeneSets in the list- Parameters:
geneSetList-
-
GeneSet
Create an empty gene set (that belongs to a collection of gene sets 'geneSets')- Parameters:
name-geneSets-
-
-
Method Details
-
addGene
Add one gene to genesSet- Parameters:
gene-
-
compareTo
Comparable interface (to order terms)- Specified by:
compareToin interfaceComparable<GeneSet>
-
compareToNumbers
Compare 2 numbers and 2 'names' (if both numbers are equal) - NaN sorted in a way that they remain at the end of a sorted list - When two numbers are equal, the sort is done alphabetically by name- Parameters:
n1-n2-name1-name2-- Returns:
-
countOverlap
COunt how many genes are in both GeneSets- Parameters:
gs-- Returns:
-
genesSorted
Return a sorted list of genes- Returns:
-
getDescription
-
getGeneCount
public int getGeneCount()Number of symbols in this node (total = interesting + not-interesting)- Returns:
-
getGenes
-
getGeneSets
-
getInterestingGenes
Get 'interesting' genes- Returns:
-
getInterestingGenesCount
public int getInterestingGenesCount()Number of 'interesting' symbols- Returns:
-
getMaxRank
public int getMaxRank() -
getName
-
getRankedGenesCount
public int getRankedGenesCount() -
getRankSum
public long getRankSum() -
hasGene
-
intersection
Intersects this term with 'geneSet' (intersects 'geneSet' and 'interestingGeneSet').- Parameters:
geneSet- : GeneSet to intercept
-
iterator
-
rankSum
public long rankSum()Calculate rankSum, rankedSymbols and maxRank- Returns:
- rankSum
-
setDescription
-
setGeneSets
-
setMaxRank
public void setMaxRank(int maxRank) -
setMinus
Perform a 'set minus' between this term and 'geneSet' (set minus for 'geneSet' and 'interestingGeneSet').- Parameters:
geneSet- : GeneSet to use for 'set minus' operation
-
setName
-
size
public int size() -
sizeEffective
public int sizeEffective()Number of genes that have a value- Returns:
-
toString
-
toStringAll
-
union
Union this term with 'geneSet' (union for 'geneSet' and 'interestingGeneSet').- Parameters:
geneSet- : GeneSet to use for union
-