As far as I can tell, there is no difference in the meaning of both phrases.
While "ja" means more a form of approval, "doch" is commonly being used to express some form contradiction. So in terms of connotation I would say there is a slight difference between the words. "Ja" does seem to explain an obvious fact, for example Holmes not being deaf, and it implies that he said this or proved this before in some way whereas "doch" is more an explanation of a fact that hasn't been proven, but can be realized without any form of explanation.
Even though this difference is so tiny that both words can be used in all occasions more or less equally and I would the sound of the sentence has more influence on the right usage than the meaning of the word you use.