For your modification and to make the perfect bee, you must first already be producing Royal Jelly from an Imperial Bee. You need an Isolator, Synthesizer, Purifier, and an Inoculator. These are the HIGHEST TIER MACHINES.(Keep in mind to run the purifier and synthesizer you need Liquid DNA from a Genepool)
So, first you will have to create 2 Empty Serum Vials from some Royal Jelly. Then you take your bee you want to extract a gene from and put it into your Isolator, along with an Empty Serum Vial. However, there is a 30% chance you may lose your bee, and you cannot change it so there is a higher or lower percentage. While trying to get a gene, you may run into getting other genes you do not need. Simply throw them into a furnace and you will delete the gene from the vial. Once you are done, you will need your Synthesizer to add charges to the gene vial. On the vial it says "Average Quality". The quality will degrade while adding charges to it. Once the vial has 16 charges, use your purifier to bring it to excellent quality.
Adding the Gene to your BeeEdit
The hardest part of the process, and also the easiest, is adding the gene to the bee. You take your inoculator(Be sure to fill it with 'M J' or Minecraft Joules) and place your bee in the top right corner. If the quality of the serum is NOT excellent, you may kill your bee. Keeping this in mind, you put the vial into the inoculator's left slot. The injection may fail, but if it does(In Excellent Quality) your bee will not die and it will just use up 1 charge. The most charges that have been seen are about 6 used before the injection worked. Once you have injected your bee, it is advised that you inject a princess or drone of the same species and breed them together. This works even better if you have added the Max Fertility Serum to your bee(Max Fertility is commonly found on Wintry Princesses and Drones).