Carminic acid
Carminic acid (C22H20O13) is a red glucosidal hydroxyanthrapurin that occurs naturally in some scale insects, such as the cochineal, Armenian cochineal, and Polish cochineal. The insects produce the acid as a deterrent to predators. An aluminum salt of carminic acid is the coloring agent in carmine, a pigment.  Natives of Peru had been producing cochineal dyes for textiles since at least 700 CE.  Synonyms are C.I. 75470 and C.I. Natural Red 4.

The chemical structure of carminic acid consists of a core anthraquinone structure linked to a glucose sugar unit.  Carminic acid was first synthesized in the laboratory by organic chemists in 1991. In 2018, researchers genetically engineered the microbe Aspergillus nidulans to produce carminic acid.

It was previously thought that it contains α-D-glucopyranosyl residue, which was later redetermined to be the β-D-glucopyranosyl anomer.

Harvesting from cochineals 
Carminic acid is commonly harvested from an American species scaled insects called Dactylopius coccus (or cochineals). Cochineals are parasitic scaled insects which are abundantly found on their host plants, the prickly pear cactus native to Mexico and South America. The insects are either cultivated or harvested from wild populations, mainly for the wingless females of the species which attach themselves to the cactus and outnumber the winged males of the species two hundred to one. Classically, cultivated species were grown from eggs placed by workers onto the cactus leaves and left to grow. There the female cochineals would remain immobile for about 3 months until being brushed off, collected, and dried for shipping. Females possess concentrations of about 1.5% bodyweight of carminic acid and newborns about 3.0%. The carminic acid is then extracted by soaking the dried cochineals in water, and additives are then added to alter dye colour and enable the dye to adhere to objects.

Use as a deterrent 
For many scaled insects of the genus Dactylopius, carminic acid, thoroughly documented by Thomas Eisner, has been shown to be a highly potent feeding deterrent against ants. In Eisner's 1980 paper, he notes that the red colour of the carminic acid released when the cochineals are crushed could also be a visual aposematic deterrent for predators as well. However, he notes that tests have not been done on vertebrates to provide any support to that theory. In the same paper however, Eisner mentions that cochineals were bitter when tasted by humans.

Like other compounds housed in various plants, predators which are able to overcome the deterrent are able to sequester carminic acid in their flesh and utilize the deterrent for their own defense. The pyralid moth (Laetilia coccidivora) is one such predator which feeds on cochineals, sequestering their prey's carminic acid in their own body for defense against predators. The ability to sequester carminic acid has also been seen in several other larval bearing species (Hyperaspis, Leucopis, etc.). Eisner remarks that the ability to sequester the compound likely arose due to ants being a common predator amongst larvae

Biosynthesis of carminic acid 

Carminic acid is a polyketide secondary metabolite produced by the scale insect Dacylopius coccus. In terms of its biosynthetic origin, the structure of carminic acid was speculated to be either from type ll polyketide or shikimate pathways. This claim was not disputed until a key intermediate exclusive to the polyketide pathway was isolated. Until then, a detailed biosynthetic mechanism had not been formally proposed.

The biosynthesis of carminic acid can be divided into three stages. The initiation stage involves transferases that load acetyl (AT) and malonyl-CoA (MCAT) to the acyl carrier protein (ACP) forming acetyl and malonyl-ACP, respectively. The acetyl-ACP acts as a priming unit for the decarboxylative condensation with malonyl-CoA catalyzed by a ketoacyl synthase (KS) protein. The resulting acetoacetyl ACP is the simplest polyketide produced by this pathway, and it is subsequently condensed with six more malonyl-ACP units before cyclizing.

The elongation stage consists of the repeated decarboxylative condensation by a ketoacyl synthase/chain length factor heterodimer that monitors the length of the growing polyketide. The resulting octaketide is then aromatized by a cyclase domain which catalyzes an aldol-like cyclization reaction resulting in the formation of a flavokermesic acid anthrone (FKA). In any polyketide-based pathway, flavokermesic acid anthrone is the first cyclic intermediate. It was the successful isolation and characterization of FKA in wild type coccids that strengthened the evidence of a polyketide mediated biosynthetic pathway.

The reactions that follow the formation of FKA consist of the aromatization and functionalization stages. FKA is subjected to two rounds of hydroxylation catalyzed by two distinct P450 monooxygenases forming flavokermesic acid and kermesic acid, respectively. Whether these monooxygenases are oxygen or flavin dependent is to be determined. The first monooxygenation occurs in the central aromatic ring carbon, C10 while the second occurs in the C4 position. The final attachment of a carbohydrate onto the C2 position C-glycosylation reaction is catalyzed by a UDP-glucose dependent membrane bound glucosyltransferase. The order of the last two steps has not been determined due to lack of experimental kinetic data.

References 

Anthraquinone dyes
Anthraquinone glucosides
Hydroxyquinols