Run full lengths of housing, or at least sections of thin tubing to isolate the cable from frame on the exposed lengths of cable, or use rubber donuts on the cable if you want to leave it exposed on that section (but if you have a sloping top tube they tend to migrate to the low end and not doing a lot for slap in the middle).