Molecular Biology By silencing transposons, Piwi-interacting RNAs (piRNAs) protect the stability of animal genomes in germ lines. However, many piRNAs do not map to transposons, and their functions have remained undefined. Zhang et al. described the piRNA targeting logic in Caenorhabditis elegans and identified an intrinsic sequence signal in endogenous germline genes that confer resistance to piRNA silencing. Thus, diverse piRNAs silence foreign nucleic acids but spare self genes to defend the C. elegans genome. In addition, multiple foreign transgenes can be engineered to escape piRNA targeting, allowing successful expression in the germline. Science , this issue p. [587][1] [1]: /lookup/doi/10.1126/science.aao2840