Pati-Salam explanations of the $B$-meson anomalies