Chloroplast genomes have retained a core set of genes from their cyanobacterial ancestor, most of them required for the light reactions of photosynthesis or functions connected with transcription and translation. Other genes have been transferred to the nucleus or were lost in a lineage-specific manner. The genomes are distinguished by the selection of genes retained, whether or not transcripts are edited, presence/absence of introns and small repeats and their physical organization. Plants and green algae have kept fewer plastid genes than either the red algae or the chromistan algae, which obtained their plastids from red algae by secondary endosymbiosis. Photosynthetic dinoflagellates have the fewest (fewer than 20), but still grow photoautotrophically. All chloroplast genomes map as a circle, but there have been extensive rearrangements of gene order even between related species. Genome sizes vary much more than gene content, depending on the extent of gene duplication and small repeats and the size of intergenic spacers.