grep
; the basic usage is:grep(pattern, x)
Here's a very simple example:
We might use this in
ape
to color the labels for the tips of a tree depending on the origin of the sequence (say, database or patient sample).In Python, you'd probably do something like this: