Chloroplasts in eukaryotes such as plants and algae likely originated from cyanobacteria (this is called the endosymbiotic theory), but it may not have been a single event where the eukaryotes took up cyanobacteria and may have involved a lot of genetic exchange. The way how both chloroplasts and cyanobacteria have a thylakoid membrane is evidence that chloroplasts may have originated from cyanobacteria. One problem with this theory is that some important enzymes involved in making the thylakoid membrane do not appear to have originated from cyanobacteria. The way how chloroplasts have their own DNA is evidence of the endosymbiotic theory. The discovery of horizontal gene transfer however came after the endosymbiotic theory and not much work has been done on the possibility that the origin of chloroplast DNA could be from horizontal gene transfer rather than because they evolved from cyanobacteria. Chloroplasts and cyanobacteria have a lot of genes in common, but there are also many genetic differences making it hard to determine the origin of chloroplasts. One piece of evidence for the endosymbiotic theory is that chloroplasts in all types of archaeplastida(the type of eukaryote with chlorophyll including plants and algae) appear to have branched off from cyanobacteria all at one point. Fatty acid synthesis in the chloroplasts that is not present in cyanobacteria could be evidence against the endosymbiotic hypothesis.