a | Transgenic mice constitutively expressing an opsin gene from their genome allow simple experiments that only require addition of light delivery apparatus. Promoter ‘A’ activity (indicated by A) will lead to transgene expression (green). b | Transgenic animal expressing a recombinase such as Cre under control of a cell type-specific promoter is crossed with a second line carrying a conditional expression cassette encoding the desired opsin. Dual transgenic offspring will then show organism-wide expression of the opsin in all cells that underwent promoter activation at any stage of development (green). Cre expression (indicated by A) is unnecessary once the conditional expression cassette was activated. c | Where a short minimal promoter sequence is available, targeted viral vector injections can be used to restrict expression spatially as well as by the gene expression profile. A viral vector containing the specific minimal promoter sequence upstream of the opsin gene will lead to expression in specific cells expressing the promoter (indicated by A), only in the region targeted with the injection (blue box). d | Approaches in parts a and b can be combined to achieve both spatial and gene expression specificity in cases where short specific promoters are not available, or where promoter activity is not specific during development. e | Projection neurons can be addressed by injection of an axon terminal-transducing, retrograde travelling viral vector encoding for the opsin or a recombinase into the target region. Recombinase-encoding viral vector is injected in a projection target (area B, red box) and travels retrogradely. A second viral injection of conditional expression cassette encoding the desired opsin into an upstream region (area A, blue box) will then lead to opsin expression only in neurons within area A that project to area B. f | Adeno-associated virus (AAV) capsids engineered for improved blood–brain barrier penetration allow brain-wide (mostly sparse) expression of an opsin through intravenous injection of the viral vector. IV, intravenous.