Class ConfigurableIDFetcher
java.lang.Object
org.biopax.paxtools.pattern.miner.ConfigurableIDFetcher
- All Implemented Interfaces:
IDFetcher
Tries to get preferred type IDs of an entity reference.
This id-fetcher can be optionally used
when converting (reducing) BioPAX to the binary SIF format.
-
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) Finds a String ID for the given element.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
-
ConfigurableIDFetcher
public ConfigurableIDFetcher()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
Description copied from interface:IDFetcherFinds a String ID for the given element.
-