Genetic engineering, genetic programming, or genetic manipulation was a process in which the DNA of an organism was selectively altered through artificial means. Genetic engineering was often used to produce "custom" organisms, such as for agricultural or medical purposes, as well as to produce biogenic weapons. The most common application of genetic engineering on intelligent beings in the Federation was corrective DNA resequencing for genetic disorders. A far more dubious application of genetic engineering was the genetic enhancement of individuals to produce improved senses, strength, intelligence, etc.
During Earth's 20th century, the efforts of ambitious scientists' to produce "superhumans" known as Augments eventually resulted in the Eugenics Wars. Genetically engineered individuals such as Khan Noonien Singh attempted to seize power. (TOS: "Space Seed")
This lead to the banning of genetic engineering on Earth decades before the mid-22nd century, even research which could be used to cure critical illnesses. The ban was implemented because of the general fear of creating more tyrants such as Khan. It was also felt that parents would feel compelled to have their children genetically engineered, especially if "enhanced" individuals were allowed to compete in normal society.
However, certain individuals, including geneticist Arik Soong, argued that it was simply convenient for Humanity to denounce the attempts at genetic "improvement" of Humanity, and that it was inherently evil because of the Eugenics Wars. He argued that the source of the problem was not, in fact the technology, but Humanity's own inability to use it wisely. Imprisoned for, among other crimes, stealing the embryos of a number of Augment children, Soong wrote long treatises on the subject of genetic augmentations and improvements. His works were routinely taken and placed into storage (although his jailers often told him that his work was vaporized). Though Soong himself gave up genetics to begin research in cybernetics, Captain Jonathan Archer expressed his hope to Soong that research into genetic engineering could cure life-threatening diseases would someday be resumed. (ENT: "Borderland", "The Augments")
Others, however, chose to establish isolated colonies, as became the case with the Genome colony on Moab IV, which was established in 2168. It became a notable and successful example of Human genetic engineering in which every individual was genetically tailored from birth to perform a specific role in society. However, after a five-day visit by the USS Enterprise-D – when the ship came to the colony in an effort to save it from an approaching neutron star which, eventually, the craft was able to effectively redirect – twenty-three colonists left the colony aboard the craft, possibly causing significant damage to the structure of their society. The reason for the societal split was that those who left the colony had realized their organized, pre-planned world had certain limitations, lacking the opportunities to grow that were offered by the Enterprise, and by extension, the Federation. (TNG: "The Masterpiece Society")
By the 24th century, the United Federation of Planets allowed limited use of genetic engineering to correct existing genetically related medical conditions. Genetic enhancement or augmentation, however, was forbidden by Federation law. Persons known to be genetically enhanced were not allowed to serve in Starfleet, and were especially banned from practicing medicine, specifically to avoid a recurrents of the Eugenics Wars and the creation of more Augments like Khan Noonien Singh. Those found guilty of practicing genetic enhancement could face prison for violating eugenics laws. (TNG: "Genesis"; DS9: "Doctor Bashir, I Presume")
Nevertheless, some parents attempted to secretly have their children genetically modified. (DS9: "Doctor Bashir, I Presume") Unfortunately, most of these operations were performed by unqualified physicians, resulting in severe psychological problems in the children due to their enhancements being only partially successful, such as a patient's senses being enhanced while their ability to process the resulting data remained at a Human norm. (DS9: "Statistical Probabilities")
One notable exception to advanced genetic research in Human genetics was that allowed at the Darwin Genetic Research Station, under the purview of Dr. Kingsley. In the case of their research, the resulting products were said to have not been genetically engineered, but genetically "created." The children created were "perfect in every way," that was, "their body structure, their musculature, their minds." They also had extremely aggressive immune systems and possessed telepathy and telekinesis. (TNG: "Unnatural Selection")
In some cases, genetic engineering can be permitted to be performed in utero when dealing with a developing fetus to correct any potential genetic defects that could handicap the child as they grew up. Chakotay's family history included a defective gene that made those who possessed it prone to hallucinations, the gene afflicting his grandfather in Chakotay's youth, although the gene was suppressed in Chakotay himself. (VOY: "The Fight") In 2377, The Doctor performed prenatal genetic modification on Miral Paris to correct a spinal deviation, a congenital defect that tended to run in Klingon families; Miral's mother and grandmother had undergone surgery to correct the defect at a young age, but the modification meant Miral would not need surgery herself. Unfortunately, learning of this capability, B'Elanna briefly became obsessed with having her child modified to remove all Klingon DNA traits to try to "protect" her daughter from the discrimination she had experienced as a child, even going so far as to reprogram The Doctor so that he would believe these changes were necessary to prevent later illness, but she was talked out of it by her husband. (VOY: "Lineage")
The Founders of the Dominion performed extensive genetic modifications on their two servant races, the Jem'Hadar and the Vorta, in order for them to better serve their roles and to ingrain a fanatical devotion to the Founders. (DS9: "The Abandoned", "Ties of Blood and Water") As a result of these modifications, neither species reproduced in the traditional biological sense. (DS9: "To the Death")
According to Vorta legend, they were originally ape-like creatures who were gifted sentience by the Founders after they helped a Changeling escape pursuit. (DS9: "Treachery, Faith and the Great River")
During the 22nd century, the Suliban were no more evolved than Humans. However, a number of Suliban, from a faction known as the Cabal, became recipients of some very sophisticated genetic engineering thanks to a mysterious humanoid from the 28th century. These enhancements included subcutaneous pigment sacs, a bio-mimetic garment, modified alveoli, more bronchial lobes, and eyes with compound retinas – which allowed them to see things starship sensors likely could not detect. The Suliban considered these "enhancements" as "progress". (ENT: "Broken Bow")
When they were captured by a pre-warp civilization in 2152, Jonathan Archer and Malcolm Reed claimed to be prototypes of a new breed of supersoldiers to conceal the existence of alien life from the civilization. (ENT: "The Communicator")
Genetic engineering had been employed on Denobula since the twentieth century, to generally positive effect. Dr. Phlox indicated that unlike Soong, the Denobulans had not attempted to redesign their species, a significant ethical counterpoint. (ENT: "Borderland")
The Brunali were proficient at genetic engineering, which they used to create modified crops capable of surviving on their Borg-devastated homeworld. However, they also genetically engineered some of their children to produce a pathogen deadly to Borg. These children were then allowed to be assimilated, so that they could spread the infection to their Borg vessels. Icheb was one such child, the pathogen causing the cube that he was on to break down, killing all of the active drones and causing the young drones in their maturation chambers to activate before they were fully processed into the Collective. (VOY: "Child's Play")
The Taresians used genetic engineering in tandem with a form of biological weaponry to manipulate the DNA of other species. This occurred to Ensign Harry Kim in 2373, who was infected with a virus that altered his DNA to make him a potential Taresian mate. (VOY: "Favorite Son")