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 TypeMethodDescriptionvoid
Add one gene to genesSetint
Comparable interface (to order terms)int
compareToNumbers
(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 nameint
countOverlap
(GeneSet gs) COunt how many genes are in both GeneSetsReturn a sorted list of genesint
Number of symbols in this node (total = interesting + not-interesting)getGenes()
Get 'interesting' genesint
Number of 'interesting' symbolsint
getName()
int
long
boolean
void
intersection
(GeneSet geneSet) Intersects this term with 'geneSet' (intersects 'geneSet' and 'interestingGeneSet').iterator()
long
rankSum()
Calculate rankSum, rankedSymbols and maxRankvoid
setDescription
(String description) void
setGeneSets
(GeneSets geneSets) void
setMaxRank
(int maxRank) void
Perform a 'set minus' between this term and 'geneSet' (set minus for 'geneSet' and 'interestingGeneSet').void
int
size()
int
Number of genes that have a valuetoString()
void
Union 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, wait
Methods 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:
compareTo
in 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
-