Constructor and Description |
---|
Blacklist()
Constructor for a blank blacklist.
|
Blacklist(InputStream is)
Constructor with resource input stream.
|
Blacklist(String filename)
Constructor with resource file name.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(String id,
int score,
RelType context)
Adds a new blacklisted ID.
|
RelType |
getContext(String id)
Gets the context of the ubiquity of the ID.
|
Set<String> |
getListed()
Gets the IDs of the blacklisted molecules.
|
Set |
getNonUbiqueObjects(Set objects) |
Set<PhysicalEntity> |
getNonUbiques(Set<PhysicalEntity> entities,
RelType ctx)
Gets the non-ubiquitous physical entities in the given set and in the given context.
|
Collection<SmallMolecule> |
getUbiques(Set<PhysicalEntity> entities,
RelType context)
Gets the ubiquitous small molecules among the given set and in the given context.
|
boolean |
isUbique(PhysicalEntity pe)
Checks if the given entity is blacklisted in at least one context.
|
boolean |
isUbique(PhysicalEntity pe,
Conversion conv,
ConversionDirectionType dir,
RelType context)
Checks if the given entity is blacklisted for the given Conversion assuming the Conversion
flows towards the given direction, and the entity is in given context.
|
boolean |
isUbiqueInBothContexts(PhysicalEntity pe)
Checks if the given entity is blacklisted in both context together.
|
void |
write(OutputStream os)
Dumps data to the given output stream.
|
void |
write(String filename)
Dumps data to the given file.
|
public Blacklist()
public Blacklist(String filename)
filename
- file path to import the blacklist entries frompublic Blacklist(InputStream is)
is
- input stream to read/init the blacklist frompublic void addEntry(String id, int score, RelType context)
id
- ID of the blacklisted moleculescore
- the ubiquity scorecontext
- context of ubiquitypublic void write(String filename)
filename
- output file namepublic void write(OutputStream os)
os
- output streampublic RelType getContext(String id)
id
- ID to checkpublic boolean isUbique(PhysicalEntity pe)
pe
- physical entity BioPAX objectpublic boolean isUbiqueInBothContexts(PhysicalEntity pe)
pe
- physical entity BioPAX objectpublic boolean isUbique(PhysicalEntity pe, Conversion conv, ConversionDirectionType dir, RelType context)
pe
- physical entity BioPAX objectconv
- conversion interaction (BioPAX)dir
- conversion directioncontext
- relationship type - contextpublic Collection<SmallMolecule> getUbiques(Set<PhysicalEntity> entities, RelType context)
entities
- left or right of a conversioncontext
- are these entities input or outputpublic Set<PhysicalEntity> getNonUbiques(Set<PhysicalEntity> entities, RelType ctx)
entities
- left or right of a conversionctx
- are these entities input or outputpublic Set getNonUbiqueObjects(Set objects)
Copyright © 2015 BioPAX. All rights reserved.