Annotations and filtering
In ProCope both proteins and protein network edges can be annotated
with arbitary key/value pairs. For the values, strings (text), integer
and decimal values are allowed.
You could, for instance, annotate different scores to a single edge in the network (decimal values):
score1 = 0.5
score2 = 0.8
score3 = 0.3
For protein annotations, you could store functional information for each protein (string values):
func = transcription
or
func = cell cycle, apoptosis
ProCope implements a filtering
algorithm which matches a boolean expression against the annotations of
a protein or edge.
The filtering feature is used in the graphical user interface (for
filtering annotated edges in networks or protein annotations) and can
be accessed from the Java API.
Boolean expressions
The boolean expressions in ProCope support the following comparison
operators:
==
- equality
!=
- inequality
>
- greater than
>=
- greater than or equal
<
-
less than
<=
- less than or equal
The following logical operators are supported:
Note: If an annotation
does not exist for an edge or protein or if different datatypes are
mixed (e.g. strings compared to numeric values), the expression will
always evaluate to false
.
Examples
Some examples of boolean expressions and their effect (networking filtering examples).
score1 > 0.5 | score2 > 0.7
Matches all edges of a network where the numeric value of the score1
annotation is larger than 0.5 or the numeric value of score2
is larger then 0.7.
(source == "database1" | source == "database2") & @weight >= 0.5
Matches all edges which come from "database1" or "database2" and the
edge weight is at least 0.5. Note that the edge weight is accessed
using the variable name @weight
.
!source == "database1" & confidence <= 0.2
Matches alle dges which are not from "database1" and the "confidence" annotation has a numeric value smaller than 0.2.
For an example of how to use filtering with the Java API, check out Sample Use Case 2: Working with score networks or the protein manager documentation.