This would probably be best as a World of Sand variant. You would have different materials for membranes, DNA, glucose, etc. which would react in a similar fashion to the real substances. I would make DNA a special (i.e. not a normal material) object, which can be scripted to perform a sequence of operations such as:
Produce outer membrane
Wait a bit, die if no sugar etc.
Add antigens
Wait a bit, die if no sugar etc.
Produce nucleus membrane
Wait a bit, die if no sugar etc.
Duplicate self, evict duplicate.
You could write your own viruses to attack things without their antigen, and convert the matter into its own type.
I fail at life. No, really.