Package org.biopax.paxtools.controller
Class IdFetcher
java.lang.Object
org.biopax.paxtools.controller.IdFetcher
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchemDbStartsWithOrEquals(String dbStartsWithOrEquals) Set to prefer collecting chemical IDs of such Xrefs where the small molecules db starts with or equals given string, ignoring case.fetchID(BioPAXElement ele) seqDbStartsWithOrEquals(String dbStartsWithOrEquals) Set to prefer collecting gene/sequence IDs of such Xrefs where the db starts with or equals given string, ignoring case.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).
-
Constructor Details
-
IdFetcher
public IdFetcher()Constructor.
-
-
Method Details
-
seqDbStartsWithOrEquals
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
-
chemDbStartsWithOrEquals
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
-
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
-