Basic Trope: A character uses magic and / or science to create a duplicate of his / her opposite sex.
Straight: Alex Wiseman, consummate Mad Scientist, creates a female clone of himself named Alice to become his right-hand woman and future successor.
Exaggerated: Alex creates dozens of female clones of himself to work as his lab assistants and personal bodyguard squad.
Downplayed: A hermaphrodite/inter-sex clone of a male or female character
Alex was aiming to create a perfect duplicate of himself on the beginning. But the first clones based on male test subjects started to deteriorate really fast, both on health and intellect, rendering them useless for his purpose. However, he discovered that the female test subjects' clones didn't present such anomalies, so he manipulated his DNA to create a female instead.
Theoretically, this degredation could be exclusive to the Y-chromosome, so you just remove it and copy & paste the X-chromosome.
Alternatively: Alex is a female-to-male Transsexual (or even just a very convincing Crossdresser), and when he clones himself, that clone therefore reflects his genetics.
Alex wants a counterpart, but he knows that two people looking exactly the same would be confusing.
Inverted: Alex creates a clone of himself that's also male.
Alex creates an Opposite Sex Clone of himself named Alice, who eventually grows male genitalia and becomes a hermaphrodite, then loses her female organs and becomes a man, then regrows her female organs becoming a hermaphrodite again, then she loses her male organs and becomes a regular female again.
Alternatively, Alice grow up, become a female mad scientist, an makes and Opposite Sex Clone of herself, which then does the same thing, and so on...
Averted: Despite cloning and genetic manipulation playing a key role on the story's development, no opposite sex clones are ever created.
Enforced: "We don't need two of Alex, let's make his clone a girl. That way we'll have a Ms. Fanservice to provide Fetish Fuel."
"Mom used to say she always wanted a girl. Well, I guess this comes close enough."
"We're like twins, except one of us is an affront to God!" "And the other one's a clone!" "HEY!"
Invoked: Alex is an insufferable narcissist who thinks the only person worthy of him would be his female mirror image. Then he comes up with the technology to create opposite sex duplicates, and he gets an idea...
Defied: Even after finding out about the disadvantages of the male clones when compared to the female ones, Alex decides to continue researching to create a perfect clone of himself; anything else would be unacceptable for him.
Bob: So this is your duplicate. She's actually rather good-looking. Alex: Thanks... I guess. Bob: Do you think I could have one myself? Alex: Eh? Why would you want a female clone? Bob: I've always wonder how would it be... You know... Having some action with myself. Alex: You're revolting! Get out of my sight before I kill you!
Claire: This whole deal with the opposite gender clones actually makes me wonder how would it be to have one myself. It would be freaky, but also kinda cool. Danny: I'd love one for myself, too! I'm sure girl Danny would look great on a dress. Claire:But you already use dresses all the time! Danny: ...Yeah, but that's beside the point!
Despite being an almost perfect duplicate of Alex, Alice turns to be a rather different person when compared to the original. It's not only by the fact of being female; there are other factors that mold her personality and traits into something completely different. Therefore, Alex's plan to create a perfect successor becomes fruitless.
To avoid the previously described scenario, Alex transfers his personality and memories into Alice. However, even when fully aware of his decision and plans, the clone starts to develop serious psychological issues related to her new physiology. After a life of memories as a man, a living on a woman's body would be a strange and confusing experience to anyone.
Despite the fact that it is impossible for Alice to become his mirror image, Alex remains firm on his decision to turn her into his successor, so he starts raising her as if she were his beloved daughter. With the passage of time, Alice starts to develop her own strengths and potential, even surpassing Alex's former expectations, and becoming a worthy successor.
After facing her existential crisis, Alice decides to move on and face her new life as woman with the best disposition.