There are heaps of pros and cons between both of them and many different factors that can influence which phone too buy.
Build quality: Obviously hands down the HTC one has the best build quality with its aluminum body. Although the s4's glossy plastic back and bezels means its very light and it gives it the option to have expandable memory and removable battery. A trade off is necessary between either of them. The question is which features are more important to you.
Processor: it depends on what s4 you get but if you get the international version it comes with its octa core exynos processor which is hard to beat. If you get the 4g version it comes with a snapdragon 600 processor which is the same as the HTC ones processor. Either way both will be very fast.
Camera: obviously both cameras are vastly different. With its 4 megapixel and much larger pixels the HTC one performs exceptionally well in low light. Although in bright conditions the lack of detail is apparent when compared to a higher pixel camera. The s4's camera with its 13 megapixel camera performs exceptionally well in bright conditions with very rich detail. However it does not perform so well in low light conditions. Both are very good. The one has a much better camera for low light but the s4 has very sharp detail in bright conditions
Expandable memory: The s4 has expandable memory whereas the One does not. Something to keep in mind.
Display: The s4s full HD 5 inch AMOLED display has very rich contrast and an extremely high pixel density at 441 ppi. The ones full HD 4.7 inch ips display has the highest pixel density display in the world (I think) at 468 ppi. Being an ips display the contrast isnt as aggressive as the s4's and it is exceptionally bright. Both have very good displays. The main difference being the s4 has higher contrast and the One has a much brighter display.
Battery: The s4 has a larger battery than the One and the s4 will generally last longer. (Not sure about the exact specifications, I'm just saying all of this off the top of my head

)
It all comes down to personal preference but personally I would choose the One because it has amazing build quality and HTC's sense UI is much smoother than the s4's UI. (from what I've heard). But remember that there are many other factors that could influence your decision between either phone. I'm sure you knew all of this already. Just in case it could help you make an informed decision
