Code for generating genome object from an annotation and a template model from a mapping