Most scientists have dreamed of transferring biosynthetic pathways to a more efficient vector. The commercial opportunity is mind blowing! Most soon find out…
The reality is protein production is complex and initiated, controlled and limited by many external and autonomous genomic initiators. Further, the complete 'gene' for cocaine per se (and most others) is split up and spread over different loci of the genome; and only produce the specific end product when all
the pieces of the biosynthesis pathway align. Thats the hard part
The first step is understanding the biosynthetic reaction mechanism. The second step is to sequence the organism (coca plant). The third and annoying step is to work out which parts of the genome and environmental stimuli are activated/required during each individual biosynthetic step. The last and annoying step is deducing, isolating and transferring the genes to a more efficient system and replicating the stimuli needed for maximum protein production.
Not an easy task... However, modern biotechnologies are making this process easier. Ask your original question in 10yrs time and you'll get a more satifying answer