Whether a plant is male, female or hermaphrodite depends on genes, epigenetics and hormones. EU research has investigated various sex determination systems in the melon and the model plant thale cress, Arabidopsis thaliana.
For the melon, interaction of two genes determines sex of the flower. Gene a codes for an enzyme that represses stamen development in female flowers. The g gene encodes a transcription factor, tryptophan proline proline domain interacting protein (WIP) protein, that blocks the enzyme and the stamens develop.
Further information: Gender issues in the plant world