# Class GeneSetsRanked

java.lang.Object
org.snpeff.geneSets.GeneSets
org.snpeff.geneSets.GeneSetsRanked

All Implemented Interfaces:
  `Serializable, Iterable<GeneSet>`

public class GeneSetsRanked extends GeneSets
A collection of GeneSets Genes are ranked (usually by 'value')

Author:
  Pablo Cingolani
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class GeneSets

`debug, LOG2, PRINT_SOMETHING_TIME`

## Constructor Summary

Constructors
Constructor
Description
`GeneSetsRanked()`
Default constructor
`GeneSetsRanked(String msigDb)`
`GeneSetsRanked(GeneSets geneSets)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`add(String gene, int rank)`
Add a 'ranked' gene (to every corresponding GeneSet in this collection)
`void`
`checkInterestingGenes(Set<String> intGenes)`
Checks that every symboolID is in the set (as 'interesting' genes)
`int`
`getMaxRank()`
Get maximum rank
`int`
`getRank(String gene)`
Get gene's rank
`HashMap<String,Integer>`
`getRankByGene()`
Get geneId invalid input: '<'-> Rank mapping
`int`
`getRankedSetsCount()`
How many gene sets have ranked genes (i.e.
`boolean`
`isRanked()`
`boolean`
`isRanked(String geneName)`
`protected boolean`
`isUsed(String geneName)`
`protected boolean`
`isUsed(GeneSet gs)`
Is this gene set used? I.e.
`List<String>`
`loadExperimentalValues(String fileName, boolean maskException)`
Reads a file with a list of genes and experimental values.
`int`
`rankByValue(boolean orderAscending)`
Rank genes by value
`void`
`reset()`
Reset every 'interesting' gene or ranked gene (on every single GeneSet in this GeneSets)

### Methods inherited from class GeneSets

`add, add, add, addInteresting, copy, disjointSet, factory, geneSetsSorted, geneSetsSortedSize, getGeneCount, getGenes, getGeneSet, getGeneSetCount, getGeneSetsByGene, getGeneSetsByName, getInterestingGenes, getInterestingGenesCount, getLabel, getValue, getValueByGene, hasGene, hasValue, isInteresting, iterator, iteratorSorted, keySet, listTopTerms, loadMSigDb, remove, removeGeneSet, removeUnusedSets, saveGseaGeneSets, setDoNotAddIfNotInGeneSet, setGeneSetByName, setInterestingGenes, setValue, setVerbose, toString, values`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface Iterable

`forEach, spliterator`

## Constructor Details

### GeneSetsRanked

public GeneSetsRanked()
Default constructor

### GeneSetsRanked

public GeneSetsRanked(GeneSets geneSets)

### GeneSetsRanked

public GeneSetsRanked(String msigDb)

## Method Details

### add

public boolean add(String gene, int rank)
Add a 'ranked' gene (to every corresponding GeneSet in this collection)

Parameters:
  `gene` - : symbol's ID
  `rank` - : symbol's rank

### checkInterestingGenes

public void checkInterestingGenes(Set<String> intGenes)
Checks that every symboolID is in the set (as 'interesting' genes)

Overrides:
  `checkInterestingGenes` in class `GeneSets`
Parameters:
  `intGenes` - : A set of interesting genes Throws an exception on error

### getMaxRank

public int getMaxRank()
Get maximum rank

Returns:

### getRank

public int getRank(String gene)
Get gene's rank

Parameters:
  `gene` -
Returns:

### getRankByGene

public HashMap<String,Integer> getRankByGene()
Get geneId invalid input: '<'-> Rank mapping

Returns:

### getRankedSetsCount

public int getRankedSetsCount()
How many gene sets have ranked genes (i.e. rank sum > 0)

Returns:
  Number of gene set such that rankSum > 0

### isRanked

public boolean isRanked()

Overrides:
  `isRanked` in class `GeneSets`

### isRanked

public boolean isRanked(String geneName)

### isUsed

protected boolean isUsed(GeneSet gs)
Is this gene set used? I.e. is there at least one gene 'used'? (e.g. interesting or ranked)

Overrides:
  `isUsed` in class `GeneSets`
Parameters:
  `gs` -
Returns:

### isUsed

protected boolean isUsed(String geneName)

Overrides:
  `isUsed` in class `GeneSets`

### loadExperimentalValues

public List<String> loadExperimentalValues(String fileName, boolean maskException)
Reads a file with a list of genes and experimental values. Format: "gene \t value \n"

Overrides:
  `loadExperimentalValues` in class `GeneSets`
Parameters:
  `fileName` -
Returns:
  A list of genes not found

### rankByValue

public int rankByValue(boolean orderAscending)
Rank genes by value

### reset

public void reset()
Reset every 'interesting' gene or ranked gene (on every single GeneSet in this GeneSets)

Overrides:
  `reset` in class `GeneSets`