Turbulent flow over a surface with streamwise-elongated rough and smooth stripes is studied by means of direct numerical simulation (DNS) in a periodic plane open channel with fully resolved roughness. The goal is to understand how the mean height of roughness affects the characteristics of the secondary flow formed above a spanwise-heterogeneous rough surface. To this end, while the statistical properties of roughness texture as well as the width and spacing of the rough stripes are kept constant, the elevation of the smooth stripes is systematically varied in different simulation cases. Utilizing this variation three configurations representing protruding, recessed and an intermediate type of roughness are analysed. In all cases secondary flows are present and the skin friction coefficients calculated for all the heterogeneous rough surfaces are meaningfully larger than what would result from the area-weighted average of those of homogeneous smooth and rough surfaces. This drag increase appears to be linked to the strength of the secondary flow. The rotational direction of the secondary motion is shown to depend on the relative surface elevation. The present results suggest that this rearrangement of the secondary flow is linked to the spatial distribution of the spanwise-wall-normal Reynolds stress component which carries opposing signs for protruding and recessed roughness.