How can I delete photos from my iPhone and still retain them on my desktop?
I suggest you to firstly disable My Photo Stream then sync your iPhone with your Mac library (using cable for instance).

In this way you can keep update the photos in your library by importing recent photos from iPhone and at the same time you can remove the pics from your iPhone without losing the copy pic in the Mac.