Class IdFetcher

java.lang.Object
org.biopax.paxtools.controller.IdFetcher

public class IdFetcher extends Object
Tries to get preferred type IDs of an entity reference. Could be used, e.g., as part of a BioPAX to plain text (or SIF, GMT) converter.
  • Constructor Details

    • IdFetcher

      public IdFetcher()
      Constructor.
  • Method Details

    • seqDbStartsWithOrEquals

      public IdFetcher seqDbStartsWithOrEquals(String dbStartsWithOrEquals)
      Set to prefer collecting gene/sequence IDs of such Xrefs where the db starts with or equals given string, ignoring case. You can chain this method calls like seqDbStartsWithOrEquals(A).seqDbStartsWithOrEquals(B)... - it will try to match a xref.db and collect xref.id in the given order/priority.
      Parameters:
      dbStartsWithOrEquals - the Xref.db value or prefix (case-insensitive)
      Returns:
      this id-fetcher instance
    • getSeqDbStartsWithOrEquals

      public List<String> getSeqDbStartsWithOrEquals()
    • chemDbStartsWithOrEquals

      public IdFetcher chemDbStartsWithOrEquals(String dbStartsWithOrEquals)
      Set to prefer collecting chemical IDs of such Xrefs where the small molecules db starts with or equals given string, ignoring case. You can chain this method calls like chemDbStartsWithOrEquals(A).chemDbStartsWithOrEquals(B)... - it will try to match a xref.db and collect xref.id in the given order/priority.
      Parameters:
      dbStartsWithOrEquals - the Xref.db value or prefix (case-insensitive)
      Returns:
      this id-fetcher instance
    • getChemDbStartsWithOrEquals

      public List<String> getChemDbStartsWithOrEquals()
    • useNameWhenNoDbMatch

      public IdFetcher useNameWhenNoDbMatch(boolean useNameWhenNoDbMatch)
      Set the flag to use the entity reference's names when no desired ID type can be found (none of xref.db matched before, or there're no xrefs at all).
      Parameters:
      useNameWhenNoDbMatch - true/false (default is 'true' - when this method's never been called)
      Returns:
      this id-fetcher instance
    • fetchID

      public Set<String> fetchID(BioPAXElement ele)