The present invention provides compositions and methods for producing flocculation moieties in photosynthetic organisms. The photosynthetic organisms are genetically modified to effect production, secretion, or both, of the flocculation moieties. Also provided are methods of flocculating organisms.