Marine mussels brave their constantly changing environment by switching on and off genes so they can perform necessary life tasks when its best to do so. Karen Hopkin reports