You can write a novel in any genre you want, as long as you know what it is. To me, a "genre" is anything that comes with a certain set of expectations. If you tell me your story is a hard-boiled mystery, then I'll know what to expect. If you tell me it's a time-travel romance, I know what to expect. But if you tell me your story is so original that it defies all genres, I just scratch my head, because I have no idea what to expect.
With an editor, it's a little more cut and dried. Genres have very specific definitions. Mystery is one thing, Fantasy is another. Tell an editor that your book doesn't fit into a genre and you're doomed.
For example, meet George. George doesn't have a genre.
EDITOR: What genre is this?
GEORGE: It's not really in one particular genre, it's set in ancient Egypt, and it's got vampires, and there's a time-traveling robot who falls in love with a detective from Brooklyn, and--
EDITOR: PASS, thanks. Now scram.
Don't be George! Pick a genre that the publisher can sink their teeth into. By that, I mean "Science Fiction" is a genre. "Cyberpunk" is not. I love William Gibson as much as the next guy, but there isn't an actual Cyberpunk section at Barnes and Noble, so don't shoot yourself in the foot by calling it that.
A friend of mine once had a manuscript catch the eye of the editor-in-chief of a major publisher. He took it to the marketing meeting, it was discussed, and the consensus was that his book was too much of this genre and too much of that, and not enough to fit squarely into one or the other. So they passed. He went from hero to zero in the course of one meeting. Ouch.
Don't let that crash and burn happen to you. If you want to get published, pick your genre carefully! How? Stay tuned, and I'll walk you through it, step by step!