Computational Methods in Systems Biology

(Ann) #1
Quantitative Regular Expressions for Arrhythmia Detection Algorithms 31

Fig. 2.QREs and their combinators. (a) Basic QREφ?λmatches one data itemd
and evaluates toλ(d)ifφ(d)isTrue.(b)QREop(f 1 ,...,fk) evaluates thekQREs
f 1 ,...,fkon the same streamwand combines their outputs using operationop(e.g.,
addition).fioutputsavalueoftypeTi.(c)QREfelsegevaluates tofiffmatches
the input stream; else it evaluates tog.(d)QREsplit−op(f, g) splits its input stream in
two and evaluatesfon the prefix andgon the suffix; the two results are then combined
using operationop.(e)QREiter[p〉(f) iteratively appliesfon substreams that match
it, analogously to the Kleene-∗operation for REs. Results are passed between iterations
using parameterp.(f)QREfgfeeds the output of QREfinto QREgasfis being
computed.


The declarative nature of QREs will be important when writing complex
algorithms, without having to explicitly maintain state and low-level data flows.
But as with any new language, QREs require some care in their usage. Space
limitations preclude us from giving the formal definition of QREs. Instead, we
will describe what each QRE does in the context of peak detection to give the
reader a good idea of their ease of use and capabilities. Figure 2 illustrates how

Free download pdf