I've definitely heard about the possibility of a 'gay or trans gene,'
My mother personally thinks that being trans is related to being autistic (I don't really know why, but this is just her own personal theory)
...But she also thinks that I'm autistic, and a doctor or therapist (Which I've been to plenty) have never mentioned the possibility.
But anyway, back on topic.
I personally don't believe in it, namely because no one that I've ever known in my family; immediate, extended, or otherwise...Has never come forward as being gay, trans, or even bi. Then again, that doesn't mean that none of them are, maybe there's someone hiding it?
Either way, I don't think there's a hereditary connection to being gay or trans...or anything else covered by the LGBT community...
But I could definitely be wrong.