Skip to content

Commit

Permalink
Added a new JVM/system property: paxtools.pattern.blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorRodchenkov committed May 16, 2024
1 parent d91cb57 commit 18a19cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Paxtools can be build and run with JDK-17 or newer, e.g. Temurin-21. Add these J
- `-Dpaxtools.CollectionProvider=org.biopax.paxtools.trove.TProvider` to use a high-performance collections provider for BioPAX elements Map or Set (recommended).
- `-Dpaxtools.normalizer.use-latest-registry=true` (if using Normalizer/Resolver) to use the latest registry.json from bioregistry.io.
- `-Dpaxtools.core.use-latest-genenames=true` for the HGNC utility class use id mapping data from genenames.org instead of built-in older file.
- `-Dpaxtools.pattern.blacklist=<path>` path to "ubique molecules blacklist" file to use with SIF searcher.

If you have [homebrew](http://brew.sh/) installed on your system (Mac OS X), you can install the latest release of Paxtools via the following brew command (could be old version):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private String getSMRID(PhysicalEntity pe)
*/
public Collection<SmallMolecule> getUbiques(Set<PhysicalEntity> entities, RelType context)
{
Map<String, SmallMolecule> ubiques = new HashMap<String, SmallMolecule>();
Map<String, SmallMolecule> ubiques = new HashMap<>();
boolean allUbiques = true;

for (PhysicalEntity pe : entities)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ static void toSifnx(String[] argv) throws IOException {
SIFSearcher searcher = new SIFSearcher(idFetcher, sifTypes.toArray(new SIFEnum[]{}));
log.info("toSIF: using SIFTypes: " + sifTypes);
//load and set blacklist.txt file if exists
File blacklistFile = new File("blacklist.txt");
String blacklistPath = System.getProperty("paxtools.pattern.blacklist", "blacklist.txt");
File blacklistFile = new File(blacklistPath);
if(blacklistFile.exists()) {
log.info("toSIF: using blacklist.txt from current directory");
searcher.setBlacklist(new Blacklist(new FileInputStream(blacklistFile)));
Expand Down

0 comments on commit 18a19cb

Please sign in to comment.