Glycogen synthesis prevents metabolic imbalance and disruption of photosynthetic electron transport from photosystem II during transition to photomixotrophy in Synechocystis sp. PCC 6803.