An example of simile (and punning) in popular science writing:
"The technique was crude: they mushed fly bodies into a paste, isolated their DNA, put the mixture in a gel, and added their gene with a dye. The idea was that the gene would act like molecular flypaper and attach to every gene with a similar sequence."
Neil Shubin
Shubin, N. (2020). Some Assembly Required. Decoding four billion years of life, from ancient fossils to DNA. Oneworld Publications.
Read about examples of science similes
Many examples of science similes are listed in 'Creative Comparisons: Making Science Familiar through Language. An illustrative catalogue of figurative comparisons and analogies for science concepts'. Free Download.