Star Trek arrived in an era when the Western was ... which often contained stories in both genres without blinking an eye.
In a canonical piece of Star Trek dialogue, Spock quotes Sherlock Holmes. But is the Vulcan actually related to Sir Arthur Conan Doyle's fictional hero?