Cellular compartmentalization is vital for the evolution of all living organisms. Cells keep together the genes, the RNAs and proteins that they encode, and the products of their activities, thus linking genotype to phenotype. We have reproduced this linkage in the test tube by transcribing and translating single genes in the aqueous compartments of water-in-oil emulsions. These compartments, with volumes close to those of bacteria, can be recruited to select genes encoding catalysts. A protein or RNA with a desired catalytic activity converts a substrate attached to the gene that encodes it to product. In other compartments, substrates attached to genes that do not encode catalysts remain unmodified. Subsequently, genes encoding catalysts are selectively enriched by virtue of their linkage to the product. We demonstrate the linkage of genotype to phenotype in man-made compartments using a model system. A selection for target-specific DNA methylation was based on the resistance of the product (methylated DNA) to restriction digestion. Genes encoding HaeIII methyltransferase were selected from a 10(7)-fold excess of genes encoding another enzyme.