A semi-infinite sample of a nematic liquid crystal in contact with a flat solid substrate, possessing an alternating stripe pattern of planar and homeotropic anchoring, is studied in the framework of the Frank-Oseen model. The case of strong anchoring on one of the stripes is treated by means of bifurcation analysis, whereas the case of weak anchoring is studied by means of numerical minimization of the free energy functional. We find a second order phase transition between the uniform homeotropic or planar alignment and a distorted director configuration. The effect of the stripe width and the anchoring strength on the location of this transition and on the bulk orientation of the nematic director is also studied.