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:
  • 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