An Introduction to Kappa Syntax
The syntax is used to write rules in Kappa is quite simple and elegant.
Rule in English: "Unphosphorylated Site1 of A binds to Site1 of B"
Agent Names
Agents (typically proteins) have names. The name can be as specific or as broad as you want. The user can use alpha-numeric strings. In the rule above, A and B are two different Agents that occur in the rule.
Agent Sites
Sites are capabilities of interaction. They are listed in parentheses following the agent name. Multiple sites are separated by a comma (,). The user can use alpha-numeric strings to name sites. In A(Site1), Site1 is one of the sites on Agent A. Same thing with B(Site1). The user should note that two sites on the same agent cannot have the same name. Also, not all sites of an agent need to be specified in a rule. If a site is mentioned at all, its internal state may be left unspecified.
Site States
~value specifies the internal state of a site on the agent. Value can be any alpha-numeric string. Typically, we use ~u to denote an unphosphorylated state and ~p to denote a phosphorylated state. In the rule above, Site1 of A has value ~u.
Bonds
! specifies the physical bonds using shared indices across agents to indicate the two endpoints of a link. In the example above, A and B are unbound on the LHS of the rule, and become bound on the RHS. The binding is indicated by "!1" following each site involved in the bond. If two different bindings were present, the second binding would be specified with a !2 following the sites involved. The user should note that one site can only bind one other site.
!_ specifies that a site is bound, but we don't care to whom. This type of bond is called an any bond.
? specifies that we do not care whether the site is bound to anything at all. This type of bond is called a wildcard bond. This notation is generally used when one is tracking modification sites.
For example, when tracking a certain agent when it's unphosphorylated, this notation can be used if the user does not care to differentiate between e.g. unphosphorylated, bound agents and unphosphorylated, unbound agents. Using this on an unmodified site is the equivalent to not showing the site at all. This follows the "Don't care, Don't write" philosophy (see below under Key things to note)
Key things to note
- The left hand side of a rule specifies a condition to trigger the rule, while the right hand side specifies changes to agents mentioned on the left.
- Don't care, don't write: only information that specifies what has to be the case for a rule to trigger needs to be represented. Irrelevant context is thus omitted.
