# Class GoTerm

java.lang.Object
org.snpeff.geneOntology.GoTerm

All Implemented Interfaces:
  `Serializable, Comparable<GoTerm>, Iterable<String>`

public class GoTerm extends Object implements Comparable<GoTerm>, Iterable<String>, Serializable
An instance of a GO term (a node in the DAG)

Author:
  Pablo Cingolani
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static boolean`
`debug`

## Constructor Summary

Constructors
Constructor
Description
`GoTerm(String acc, GoTerms goTerms, String nameSpace, String description)`
`GoTerm(List<GoTerm> goTermList, GoTerms goTerms)`
Create a new GOTerm by joining all GOTerms in the list

## Method Summary

Modifier and Type
Method
Description
`void`
`addChild(GoTerm childGoTerm)`
Add a goTermId as a child of this GOTerm Also adds 'this' as parent of 'goTerm'
`void`
`addInterestingSymbolId(String symbolId)`
Add one gene to interestingGenesSet
`void`
`addSymbolId(String symbolId)`
Add one gene to genesSet
`void`
`addSymbolsFromChilds(GoTerm goTerm)`
Add all symbols from childs to goTerm
`int`
`compareTo(GoTerm goTerm)`
`String`
`getAcc()`
`HashSet<GoTerm>`
`getChilds()`
`String`
`getDescription()`
`GoTerm`
`getFirstChild()`
Return first child in the list
`GoTerm`
`getFirstParent()`
Return first parent in the list
`GoTerms`
`getGoTerms()`
`HashSet<String>`
`getInterestingSymbolIdSet()`
`int`
`getInterestingSymbolIdsSize()`
Number of 'interesting' symbols
`int`
`getLevel()`
Calculate node's level
`int`
`getMaxRank()`
`String`
`getNameSpace()`
`HashSet<GoTerm>`
`getParents()`
`int`
`getRankedSymbols()`
`Set<String>`
`getSymbolIdSet()`
Number of symbols in this node (total = interesting + not-interesting)
`int`
`getTotalCount()`
Number of symbols in this node (total = interesting + not-interesting)
`void`
`intersection(GoTerm goTerm)`
Intersects this term with 'goTerm' (intersects 'symbolIdSet' and 'interestingSymbolIdSet').
`boolean`
`isLeave()`
Is this GOTerm a leave?
`Iterator<String>`
`iterator()`
`GoTerm`
`rootNode()`
Get the root node
`void`
`setAcc(String go)`
`void`
`setChilds(HashSet<GoTerm> childs)`
`void`
`setGenesSet(HashSet<String> genesSet)`
`void`
`setGoTerms(GoTerms goTerms)`
`void`
`setInterestingSymbolIdSet(HashSet<String> interestingSymbolIdSet)`
`void`
`setLevel(int level)`
`void`
`setMaxRank(int maxRank)`
`void`
`setMinus(GoTerm goTerm)`
Perform a 'set minus' between this term and 'goTerm' (set minus for 'symbolIdSet' and 'interestingSymbolIdSet').
`void`
`setNameSpace(String goTermType)`
`void`
`setParents(HashSet<GoTerm> parents)`
`void`
`setRankedSymbols(int rankedSymbols)`
`void`
`setRankSum(int rankSum)`
`void`
`setSescription(String description)`
`void`
`setSymbolIdSet(HashSet<String> symbolIdSet)`
`String`
`toString()`
`String`
`toStringAll()`
`String`
`toStringAll(boolean showSymbols)`
`void`
`union(GoTerm goTerm)`
Union this term with 'goTerm' (union for 'symbolIdSet' and 'interestingSymbolIdSet').

### Methods inherited from class Object

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

### Methods inherited from interface Iterable

`forEach, spliterator`

## Field Details

### debug

public static boolean debug

## Constructor Details

### GoTerm

public GoTerm(List<GoTerm> goTermList, GoTerms goTerms)
Create a new GOTerm by joining all GOTerms in the list

Parameters:
  `goTermList` -

### GoTerm

public GoTerm(String acc, GoTerms goTerms, String nameSpace, String description)

## Method Details

### addChild

public void addChild(GoTerm childGoTerm)
Add a goTermId as a child of this GOTerm Also adds 'this' as parent of 'goTerm'

Parameters:
  `goTermAcc` -

### addInterestingSymbolId

public void addInterestingSymbolId(String symbolId)
Add one gene to interestingGenesSet

Parameters:
  `symbolId` -

### addSymbolId

public void addSymbolId(String symbolId)
Add one gene to genesSet

Parameters:
  `symbolId` -

### addSymbolsFromChilds

public void addSymbolsFromChilds(GoTerm goTerm)
Add all symbols from childs to goTerm

### compareTo

public int compareTo(GoTerm goTerm)

Specified by:
  `compareTo` in interface `Comparable<GoTerm>`

### getAcc

public String getAcc()

### getChilds

public HashSet<GoTerm> getChilds()

### getDescription

public String getDescription()

### getFirstChild

public GoTerm getFirstChild()
Return first child in the list

Returns:
  First child (or null if there are no children)

### getFirstParent

public GoTerm getFirstParent()
Return first parent in the list

Returns:
  First parent (or null if there are no parents)

### getGoTerms

public GoTerms getGoTerms()

### getInterestingSymbolIdSet

public HashSet<String> getInterestingSymbolIdSet()

### getInterestingSymbolIdsSize

public int getInterestingSymbolIdsSize()
Number of 'interesting' symbols

Returns:

### getLevel

public int getLevel()
Calculate node's level

Returns:

### getMaxRank

public int getMaxRank()

### getNameSpace

public String getNameSpace()

### getParents

public HashSet<GoTerm> getParents()

### getRankedSymbols

public int getRankedSymbols()

### getSymbolIdSet

public Set<String> getSymbolIdSet()
Number of symbols in this node (total = interesting + not-interesting)

Returns:

### getTotalCount

public int getTotalCount()
Number of symbols in this node (total = interesting + not-interesting)

Returns:

### intersection

public void intersection(GoTerm goTerm)
Intersects this term with 'goTerm' (intersects 'symbolIdSet' and 'interestingSymbolIdSet').

Parameters:
  `goTerm` - : GOTerm to intercept

### isLeave

public boolean isLeave()
Is this GOTerm a leave?

Returns:

### iterator

public Iterator<String> iterator()

Specified by:
  `iterator` in interface `Iterable<String>`

### rootNode

public GoTerm rootNode()
Get the root node

Returns:

### setAcc

public void setAcc(String go)

### setChilds

public void setChilds(HashSet<GoTerm> childs)

### setGenesSet

public void setGenesSet(HashSet<String> genesSet)

### setGoTerms

public void setGoTerms(GoTerms goTerms)

### setInterestingSymbolIdSet

public void setInterestingSymbolIdSet(HashSet<String> interestingSymbolIdSet)

### setLevel

public void setLevel(int level)

### setMaxRank

public void setMaxRank(int maxRank)

### setMinus

public void setMinus(GoTerm goTerm)
Perform a 'set minus' between this term and 'goTerm' (set minus for 'symbolIdSet' and 'interestingSymbolIdSet').

Parameters:
  `goTerm` - : GOTerm to use for 'set minus' operation

### setNameSpace

public void setNameSpace(String goTermType)

### setParents

public void setParents(HashSet<GoTerm> parents)

### setRankedSymbols

public void setRankedSymbols(int rankedSymbols)

### setRankSum

public void setRankSum(int rankSum)

### setSescription

public void setSescription(String description)

### setSymbolIdSet

public void setSymbolIdSet(HashSet<String> symbolIdSet)

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### toStringAll

public String toStringAll()

### toStringAll

public String toStringAll(boolean showSymbols)

### union

public void union(GoTerm goTerm)
Union this term with 'goTerm' (union for 'symbolIdSet' and 'interestingSymbolIdSet').

Parameters:
  `goTerm` - : GOTerm to use for union