Package org.snpeff.geneSets
Class GeneSets
java.lang.Object
org.snpeff.geneSets.GeneSets
- All Implemented Interfaces:
Serializable,Iterable<GeneSet>
- Direct Known Subclasses:
GeneSetsRanked
A collection of GeneSets
Genes have associated "experimental values"
- Author:
- Pablo Cingolani
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic doublestatic long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a gene and aliasesbooleanAdd a gene and it's corresponding gene setvoidAdd a gene setbooleanaddInteresting(String gene) Add a symbol as 'interesting' gene (to every corresponding GeneSet in this collection)voidcheckInterestingGenes(Set<String> intGenes) Checks that every symboolID is in the set (as 'interesting' genes)protected voidCopy all data from geneSetsdisjointSet(List<GeneSet> geneSetList, int activeSets) Produce a GeneSet based on a list of GeneSets and a 'mask'static GeneSetsCreate gene sets form GoTermsIterate through each GeneSet in this GeneSetsgeneSetsSortedSize(boolean reverse) Gene sets sorted by size (if same size, sort by name).intHow many genes do we have?getGenes()Get all genes in this setgetGeneSet(String geneSetName) Get a gene set named 'geneSetName'intGet number of gene setsgetGeneSetsByGene(String gene) All gene sets that this gene belongs tointgetLabel()doubleGet experimental valuebooleanbooleanbooleanisInteresting(String geneName) booleanisRanked()protected booleanprotected booleanIs this gene set used? I.e.iterator()Iterate through each GeneSet in this GeneSetsIterate through each GeneSet in this GeneSetskeySet()listTopTerms(int numberToSelect) Select a number of GeneSetsloadExperimentalValues(String fileName, boolean maskException) Reads a file with a list of genes and experimental values.booleanloadMSigDb(String gmtFile, boolean maskException) Read an MSigDBfile and add every Gene set (do not add relationships between nodes in DAG)voidvoidremoveGeneSet(String geneSetName) Remove a GeneSetvoidRemove unused gene setsvoidreset()Reset every 'interesting' gene or ranked gene (on every single GeneSet in this GeneSets)voidsaveGseaGeneSets(String fileName) Save gene sets file for GSEA analysis Format specification: http://www.broad.mit.edu/cancer/software/gsea/wiki/index.php/Data_formats#GMT:_Gene_Matrix_Transposed_file_format_.28.2A.gmt.29voidsetDoNotAddIfNotInGeneSet(boolean doNotAddIfNotInGeneSet) voidsetGeneSetByName(HashMap<String, GeneSet> geneSets) voidsetInterestingGenes(HashSet<String> interestingGenesIdSet) voidSet experimental value for this genevoidsetVerbose(boolean verbose) toString()values()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 -
LOG2
public static double LOG2 -
PRINT_SOMETHING_TIME
public static long PRINT_SOMETHING_TIME
-
-
Constructor Details
-
GeneSets
public GeneSets()Default constructor -
GeneSets
-
GeneSets
-
-
Method Details
-
factory
Create gene sets form GoTerms- Parameters:
goTerms- : GoTerms to use
-
add
Add a gene set- Parameters:
geneSetName-geneSet-
-
add
Add a gene and aliases -
add
Add a gene and it's corresponding gene set- Parameters:
gene-geneSet-- Returns:
-
addInteresting
Add a symbol as 'interesting' gene (to every corresponding GeneSet in this collection) -
checkInterestingGenes
Checks that every symboolID is in the set (as 'interesting' genes)- Parameters:
intGenes- : A set of interesting genes Throws an exception on error
-
copy
Copy all data from geneSets- Parameters:
geneSets-
-
disjointSet
Produce a GeneSet based on a list of GeneSets and a 'mask'- Parameters:
geneSetList- : A list of GeneSetsactiveSets- : An integer (binary mask) that specifies weather a set in the list should be taken into account or not. The operation performed is: Intersection{ GeneSets where mask_bit == 1 } - Union{ GeneSets where mask_bit == 0 } ) where the minus sign '-' is actually a 'set minus' operation. This operation is done for both sets in GeneSet (i.e. genes and interestingGenes)- Returns:
- A GeneSet
-
geneSetsSorted
Iterate through each GeneSet in this GeneSets -
geneSetsSortedSize
Gene sets sorted by size (if same size, sort by name).- Parameters:
reverse- : Reverse size sorting (does not affect name sorting)- Returns:
-
getGeneCount
public int getGeneCount()How many genes do we have?- Returns:
-
getGenes
Get all genes in this set- Returns:
-
getGeneSet
Get a gene set named 'geneSetName'- Parameters:
geneSetName-- Returns:
-
getGeneSetCount
public int getGeneSetCount()Get number of gene sets- Returns:
-
getGeneSetsByGene
All gene sets that this gene belongs to- Parameters:
gene-- Returns:
-
getGeneSetsByName
-
getInterestingGenes
-
getInterestingGenesCount
public int getInterestingGenesCount() -
getLabel
-
getValue
Get experimental value- Parameters:
gene-- Returns:
-
getValueByGene
-
hasGene
-
hasValue
-
isInteresting
-
isRanked
public boolean isRanked() -
isUsed
Is this gene set used? I.e. is there at least one gene 'used'? (e.g. interesting or ranked)- Parameters:
gs-- Returns:
-
isUsed
-
iterator
Iterate through each GeneSet in this GeneSets -
iteratorSorted
Iterate through each GeneSet in this GeneSets -
keySet
-
listTopTerms
Select a number of GeneSets- Parameters:
numberToSelect-- Returns:
-
loadExperimentalValues
Reads a file with a list of genes and experimental values. Format: "gene \t value \n"- Parameters:
fileName-- Returns:
- A list of genes not found
-
loadMSigDb
Read an MSigDBfile and add every Gene set (do not add relationships between nodes in DAG)- Parameters:
gmtFile-geneSetType-
-
remove
-
removeGeneSet
Remove a GeneSet -
removeUnusedSets
public void removeUnusedSets()Remove unused gene sets -
reset
public void reset()Reset every 'interesting' gene or ranked gene (on every single GeneSet in this GeneSets) -
saveGseaGeneSets
Save gene sets file for GSEA analysis Format specification: http://www.broad.mit.edu/cancer/software/gsea/wiki/index.php/Data_formats#GMT:_Gene_Matrix_Transposed_file_format_.28.2A.gmt.29- Parameters:
fileName-
-
setDoNotAddIfNotInGeneSet
public void setDoNotAddIfNotInGeneSet(boolean doNotAddIfNotInGeneSet) -
setGeneSetByName
-
setInterestingGenes
-
setValue
Set experimental value for this gene- Parameters:
geneId-value-
-
setVerbose
public void setVerbose(boolean verbose) -
toString
-
values
-