Yes, and it has been done! There was a research article in 2002 in which scientists had build a virus from just the genome sequence of the polio virus. They also showed that the virus was active.
Nowadays, scientists are trying to generate artificial viruses to be used for gene therapy. In 2015, researchers in Spain synthesised an artificial virus from scratch. The idea is that the ‘head’ of the virus will contain therapeutic DNA which will help treat and possibly cure some genetic diseases.
Comments