An example of an analogy used in popular science writing:
"We may think of the gene as a long chain composed of periodically repeating atomic groups with various other groups attached to it, as pendants are attached on a charm bracelet; indeed, recent advances in biochemistry permit us to draw an exact diagram of that hereditary charm bracelet."
George Gamow (1961) One, Two, Three…Infinity. Facts and speculations of science, Revised Edition, Dover Publications, Inc., New York.
Read examples of scientific analogies
To refer to the gene as a hereditary charm bracelet, is of itself a metaphor (which by itself would have an implicit meaning for a reader to infer), but here the metaphor is only used after the analogy is presented.