From runs to patterns