An example of analogy in popular science writing,
"At either end [of show laces] there is a little cap made from metal or plastic. This is called the aglet, and it stops the lace from unravelling and fraying. Our chromosomes have their own aglets, and these are extremely important for maintaining the integrity of our genome.
These chromosomal aglets are called telomeres and they are made from a form of junk DNA that we have known about for many years, plus complexes of various proteins."
Nessa Carey (2015) Junk DNA. A journey through the dark matter of the genome. London: Icon Books Ltd.
By itself the reference to aglets in the chromosome would be a metaphor, but in the context this is clearly presented as an analogy.
Read examples of scientific analogies
Many examples of science analogies are listed in 'Creative comparisons: Making science familiar through language. An illustrative catalogue of figurative comparisons and analogies for science concepts'. Free Download.