He helped to reveal the structure of life’s code, transformed science education and research, and remained a deeply controversial figure to the end.