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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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
-
add
-
add
Add a gene and aliases -
add
-
addInteresting
Add a symbol as 'interesting' gene (to every corresponding GeneSet in this collection) -
checkInterestingGenes
-
copy
-
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
-
geneSetsSortedSize
-
getGeneCount
public int getGeneCount()How many genes do we have?- Returns:
-
getGenes
-
getGeneSet
-
getGeneSetCount
public int getGeneSetCount()Get number of gene sets- Returns:
-
getGeneSetsByGene
-
getGeneSetsByName
-
getInterestingGenes
-
getInterestingGenesCount
public int getInterestingGenesCount() -
getLabel
-
getValue
-
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
-
iteratorSorted
-
keySet
-
listTopTerms
-
loadExperimentalValues
-
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
-