Opsin gene content in ancestral mammals
Based on genomic analyses, we detected that the RH2, VA, PARA, PARIE and OPN4x (and possibly PIN and TMT2) opsins were absent in mammals, suggesting that ancestral mammals evolved with a reduced number of opsins. The extensive loss of opsins from the mammalian genomes indicates that early mammals should have inhabited environments where relevant photic stimuli were absent, permitting the corresponding opsins to become pseudogenized with none (or minor) effect on species fitness. A nocturnal phase (or a progressively nocturnal phase) in the early mammals would be concordant with the loss of the RH2, VA, PARA, PARIE and OPN4x opsins.
The RH2 photoreceptor responds to the green range of the light spectrum  and its loss represented a decrease in the ability of mammals to discriminate colours. While the RH2 loss does not imply that colour vision was compromised in ancestral mammals since they most probably had a trichromatic visual system with the OPN1sw1, OPN1sw2 and OPN1lw conopsins, it is suggestive that visual acuity was being reduced, which constitutes a plausible adaptation to scotopic or mesopic environments. Moreover, the RH2 pseudogenization was reported in other nocturnal species, as the barn owl, indicating that the loss of the RH2 pigment must be common in scotopic environments .
The loss of the OPN4x opsin suggests that mammals have simplified their circadian responses. However, they were not compromised because the m-type melanopsin (OPN4m) is still present in the mammalian retina. Melanopsins are expressed in a particular group of retinal cells localized in the ganglion cell layer, where they performed non-image forming tasks . Notably, this cell layer was reported to be very reduced in the nocturnal-type retina  which could have potentiated the loss of the OPN4x in mammals. Nevertheless, further studies in the melanopsin gene family are still necessary to understand the consequences of losing OPN4x and maintaining OPN4m in the circadian response. The same applies to the TMT gene family, for which a possible loss was reported (TMT2): not only the TMT opsins have an undifferentiated expression (both were reported to be expressed in the eyes, brain and other internal organs of vertebrates) but also their photoreceptive roles remain, particularly for Tetrapoda, unknown .
We have evidence that all the pineal opsins (PARA, PARIE, VA and PIN) were lost from the mammalian genomes. Pineal opsins are expressed in the third eye of vertebrates, which is responsible for the regulation of circadian rhythms and hormone production for thermoregulation . The mammalian third eye, in contrast with other vertebrates, lacks a parietal organ and has a pineal organ with secretory functions only (pineal gland) . We propose that the extensive loss of pineal opsins is correlated with the simplification of the third eye in mammals due to their nocturnal emergence. In nocturnal environments, which are less energetic environments, nocturnal mammals have to develop new thermoregulation strategies to become less reliant on external sources of energy to maintain body temperature: indeed, in contrast with their ancestors, mammals are endothermic [37, 38]. Thus, we propose that the third eye, which most certainly had a role in the ectothermic response , partly degenerated when mammals evolved to depend on endothermic metabolism, leading to the loss of the pineal opsins. Likewise, the loss of two pineal opsins (PARA and PARIE) has also been reported in birds, which like mammals, are endothermic .
The syntenic analyses showed global (RH2, OPN4x, TMT2, PIN and VA and possibly PIN and TMT2 were all absent in mammals) but also lineage-specific losses of opsins among mammals (monotremes were the only lineage with OPN1sw2; OPN1sw1 and OPN3 were present only in therians; TMT was only present in marsupials; the RGR gene was absent in marsupials) thus suggesting that the nocturnal period continued after the mammalian lineages diverged, affecting both the most recent common ancestor of mammals [215.5 million years ago (mya), which corresponds with the emergence of mammals ] and the earliest emerging lineages. Hence, we propose a mesopic-to-scotopic bottleneck: in an initial mesopic period the RH2, OPN4x, TMT2, PIN and VA were lost, but OPN1sw1, OPN1sw2 and TMT were retained, and subsequently differentially segregated among monotremes, marsupials and placentals in a scotopic period. Indeed, the progressive decrease of visual acuity, expected by the initial loss of RH2 in all mammals and then the loss of OPN1sw1 in monotremes and OPN1sw2 in therians, suggests that mammals went through photic environments with progressively lower luminance levels.
Recent evidence revealed that the majority of therapsids were mesopic or scotopic , suggesting that the occupation of nocturnal niches may have started before the divergence of therapsids and mammals. However, the same study also showed that the nocturnal activity appeared early in the synapsid history, evolving independently several times . Without knowing which were the opsin syntenic patterns in therapsids, we can only advance that the beginning of the nocturnal bottleneck was before the emergence of mammals, i.e. > > 215.5 mya. While the beginning of the nocturnal bottleneck cannot be stated precisely, the end of the nocturnal bottleneck is generally agreed to have occurred during the Cretaceous/Paleogene boundary (66 mya), in which the mass extinction of the large reptiles, provided mammals with the opportunity to occupy diurnal niches [38, 42]. In agreement, the predominant diurnal mammalian orders were shown to evolve at <66 mya (anthropoid primates, artiodactyls and perissodactyls evolved at 31.3, 65.4 and 57.0 mya , respectively).
Scotopic and UVS vision in ancestral mammals
In this study, we found evidence that RH1 evolved under purifying selection and associated with the activity pattern of mammals, suggesting they had a nocturnal lifestyle for most of their evolutionary history. It is expected that a nocturnal lifestyle would rely on the role of the rhodopsin (RH1), which is expressed in the rods that are photoreceptive cells activated at low luminance levels [5, 6]. Thus, we advance that the preservation of the RH1 functions relates to the retention of the rods in the mammalian retina (which is rod-dominated) to guarantee dim-light photic responses at higher levels in the brain (e.g. increased visual sensitivity) . A completely different scenario of RH1 adaptive evolution was observed in birds, which evolved with evidence of site-specific positive selection . Birds, distinct from mammals, are more-highly visual, and with the exception of some specific lineages (e.g. strigiformes and apterygiformes), generally occupy diurnal niches . Thus, the selective signatures on the RH1 gene appear to correlate with nocturnal/diurnal lifestyles. Recent evidence suggests that the conservative evolution of the NRL eye development gene in mammals is associated with the augment of rod photoreceptors in the mammalian retina . These results provide evidence of an evo-devo mechanism for the activity pattern evolution in mammals and birds.
Evidence of diversifying selection was detected in the OPN1sw1 opsin, particularly in the 93 spectral tuning site, indicating that mammals evolved adaptive strategies that included the retuning of the OPN1sw1 sensitivity. Site 93 has been previously reported to be involved in the OPN1sw1 tuning: the P93T substitution significantly shifts the OPN1sw1 into the UVS in aye-aye primate , and also it is involved in synergistic effects with other sites (46, 49, 52, 81, 86, 114 and 118) . We observed that the amino acid variability at site 93 was related to the activity pattern of mammals, where the 93 T (which provides UVS) is mostly associated with nocturnal lineages and the 93P (which provides VS) with diurnal. The scotopic/UVS and photopic/VS associations were expected since many nocturnal mammals have lost mechanisms of ultra-violet-blocking and are ultra-violet-sensitive . In addition, our findings are congruent with Hunt et al. (2009) who stated that the OPN1sw1 opsin was firstly adapted to respond to ultra-violet light and later evolved to become more sensitive to light within the violet range : we could infer that ancestral mammals, including the most recent common ancestor of eutherians, placentals and marsupials (and for which we have inferred a nocturnal lifestyle) possessed UVS vision. Evolving a UVS OPN1sw1 in nocturnal environments suggests ancestral mammals would benefit from having this sensitivity while in dim-light; however, a photo-biological reason for such adaptation remains elusive. Maybe, ancestral mammals would benefit from the ultraviolet vision during the twilight periods of the day, which would provide the necessary luminance for the activation of the sw1 pigment .
Ecology of the mammalian ancestral eye
Ancestral character reconstructions showed that ancestral mammals (including the early monotremes, therians, marsupials and placentals) possessed low visual acuity and low orbit convergence. The inferred phenotypes are compatible with the general conformation of the extant nocturnal mammals.
Evidence of lower visual acuity in early mammals supports a scotopic-adapted retina. Indeed, in nocturnal environments it is more important to maximize the amount of light one can capture, regardless of being able to distinguish among spectral wavelengths [7, 8]. Veilleux et al. (2014) demonstrated that lower visual acuity is associated with nocturnal species ; in addition, it has been shown that adaptations which enhance visual sensitivity in low-light are generally incompatible with high acuity [1, 46]. This is partially from the differentiated number of rods (more sensitive to small quantities of light; more common in scotopic retinas) and cones (less sensitive but more accurate for detail, i.e. better performance distinguishing between different colours; more common in photopic retinas) in scotopic and photopic adapted retinas ([43, 47] and reviewed in ). Thus, lower visual acuity is associated with rod-dominated retinas specialized for enhancing visual sensitivity, characteristics that we assign to the ancestral mammals. Two pieces of evidence corroborate this statement: (i) the preponderance of rods and (ii) the absence of the RH2 opsin in extant mammals [5, 6].
Our analysis also revealed that early mammals had a lateral disposition of their orbits, thus suggesting the possession of panoramic vision. Presumably, nocturnal animals would benefit from a frontal disposition of the orbits (binocularity) because it maximizes the sensitivity to low-light levels by doubling the chance of registering a photon on the visual field . Birds are a clear example: while most of the diurnal birds possess a divergent pattern of orbit disposition, the nocturnal ones (e.g. owls) have frontally placed eyes in order to increase visual sensitivity . In mammals, this tendency appears to be inverted: our results showed that extant nocturnal mammals tend to have panoramic vision. It must be noted that Walls (1942) reported that binocular contrast sensitivity is only slightly more effective than monocular sensitivity in a normal visual system , and thus panoramic vision, while not being the optional phenotype one would expect in scotopic environments, does not necessarily imply a decreased visual sensitivity. However, if mammals could have developed strategies that increased visual sensitivity with both binocular and panoramic vision, why did early mammals evolve with a clear pattern of divergent orbits? An alternative hypothesis to explain the role of panoramic vision in ancestral mammals may be related to differences in prey/predator lifestyle. Panoramic visual fields have been associated with taxa subjected to predation (such as artiodactyls, equids and lagomorphs) and often is considered to be an advantage for identifying approaching predators [1, 46]. A divergent configuration of the orbits would provide a wider field of vision and a broader view of the surrounding area, thus simultaneously allowing the detection of photic stimuli from different directions. In addition, it was shown that predators have generally higher visual acuity , which decreases the likelihood of ancestral mammals (for which we inferred low visual acuity) being highly-efficient predators. Therefore, we hypothesize that panoramic vision in ancestral mammals facilitated the identification of potential predators. This hypothesis is consistent with both the predation pressures imposed by the successful reptiles during the Mesozoic, and the paleontological evidence, which suggests ancestral mammals were small arboreal animals and most likely, easy prey [50, 51].
More-recent photic adaptations in mammals
The removal of the predation pressures imposed by the large dinosaurs during the Mesozoic (66 mya), left mammals with the opportunity to explore other photic environments [38, 42]. We showed that three mammalians species (platypus, beard seal and Sowerby’s beaked whale) have undergone more-recent adaptations for some of the studied opsins. The platypus lineage showed conserved adaptive evolution for the OPN4m and RRH opsins, suggesting it has maintained the same circadian responses as the ancestral mammals. In agreement with this result, and considering the platypus possess several characteristics of a scotopic/mesopic-adapted eye (low visual acuity and a large optic tectum ), we suggest that platypus may be an efficient model-organism to study the ancestral mammalian photic system. The RH1 opsin showed accelerated evolution in the bearded seal and Sowerby’s beaked whale lineages. The bearded seal and Sowerby’s beaked whale species occupy the cold waters of the North Atlantic, where the low luminosity together with the necessity to dive in deep to feed, may have favoured the retuning of RH1. Fasick et al. (2000) and Zhao et al. (2009) showed that RH1 amino acid substitutions and spectral tuning shifts were correlated with foraging depth in marine mammals [22, 53]. Notice that an acceleration of the RH1 opsins was also found in the North Atlantic right whale (Eubalaena glacialis) lineage; however, it was not significant after the Bonferroni correction (p-value = 0.0029/0.002, Additional file 4: Table S3).